commercetools / commercetools-jvm-sdk

The e-commerce SDK from commercetools running on the Java virtual machine.
https://commercetools.github.io/commercetools-jvm-sdk/apidocs/index.html
Other
62 stars 40 forks source link

Recover from timeouts/check behaviour #26

Closed schleichardt closed 8 years ago

schleichardt commented 10 years ago
WARNING: An exception was thrown by TimerTask.
java.lang.NullPointerException
    at com.ning.http.client.providers.netty.timeout.TimeoutsHolder.cancel(TimeoutsHolder.java:31)
    at com.ning.http.client.providers.netty.timeout.RequestTimeoutTimerTask.run(RequestTimeoutTimerTask.java:34)
    at org.jboss.netty.util.HashedWheelTimer$HashedWheelTimeout.expire(HashedWheelTimer.java:546)
    at org.jboss.netty.util.HashedWheelTimer$Worker.notifyExpiredTimeouts(HashedWheelTimer.java:446)
    at org.jboss.netty.util.HashedWheelTimer$Worker.run(HashedWheelTimer.java:395)
    at java.lang.Thread.run(Thread.java:744)
11:54:08.561 [Sphere-ClientCredentials-refresh-1] ERROR sphere - [oauth] Failed to refresh access token.
java.util.concurrent.ExecutionException: java.net.ConnectException: connection timed out: auth-v1.sphere.io/5.79.36.225:443 to https://auth-v1.sphere.io/oauth/token?grant_type=client_credentials&scope=manage_project%3Ajvm-sdk-integration-tests-1
    at com.google.common.util.concurrent.AbstractFuture$Sync.getValue(AbstractFuture.java:299) ~[guava-17.0.jar:na]
    at com.google.common.util.concurrent.AbstractFuture$Sync.get(AbstractFuture.java:286) ~[guava-17.0.jar:na]
    at com.google.common.util.concurrent.AbstractFuture.get(AbstractFuture.java:116) ~[guava-17.0.jar:na]
    at io.sphere.sdk.client.SphereClientCredentials.lambda$beginRefresh$3(SphereClientCredentials.java:113) ~[classes/:na]
    at io.sphere.sdk.client.SphereClientCredentials$$Lambda$30/62281031.run(Unknown Source) [classes/:na]
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [na:1.8.0]
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [na:1.8.0]
    at java.lang.Thread.run(Thread.java:744) [na:1.8.0]
Caused by: java.net.ConnectException: connection timed out: auth-v1.sphere.io/5.79.36.225:443 to https://auth-v1.sphere.io/oauth/token?grant_type=client_credentials&scope=manage_project%3Ajvm-sdk-integration-tests-1
    at com.ning.http.client.providers.netty.NettyConnectListener.operationComplete(NettyConnectListener.java:103) ~[async-http-client-1.8.7.jar:na]
    at org.jboss.netty.channel.DefaultChannelFuture.notifyListener(DefaultChannelFuture.java:427) ~[netty-3.9.0.Final.jar:na]
    at org.jboss.netty.channel.DefaultChannelFuture.notifyListeners(DefaultChannelFuture.java:418) ~[netty-3.9.0.Final.jar:na]
    at org.jboss.netty.channel.DefaultChannelFuture.setFailure(DefaultChannelFuture.java:380) ~[netty-3.9.0.Final.jar:na]
    at org.jboss.netty.channel.socket.nio.NioClientBoss.processConnectTimeout(NioClientBoss.java:140) ~[netty-3.9.0.Final.jar:na]
    at org.jboss.netty.channel.socket.nio.NioClientBoss.process(NioClientBoss.java:83) ~[netty-3.9.0.Final.jar:na]
    at org.jboss.netty.channel.socket.nio.AbstractNioSelector.run(AbstractNioSelector.java:318) ~[netty-3.9.0.Final.jar:na]
    at org.jboss.netty.channel.socket.nio.NioClientBoss.run(NioClientBoss.java:42) ~[netty-3.9.0.Final.jar:na]
    at org.jboss.netty.util.ThreadRenamingRunnable.run(ThreadRenamingRunnable.java:108) ~[netty-3.9.0.Final.jar:na]
    at org.jboss.netty.util.internal.DeadLockProofWorker$1.run(DeadLockProofWorker.java:42) ~[netty-3.9.0.Final.jar:na]
    ... 3 common frames omitted
Caused by: org.jboss.netty.channel.ConnectTimeoutException: connection timed out: auth-v1.sphere.io/5.79.36.225:443
    at org.jboss.netty.channel.socket.nio.NioClientBoss.processConnectTimeout(NioClientBoss.java:137) ~[netty-3.9.0.Final.jar:na]
    at org.jboss.netty.channel.socket.nio.NioClientBoss.process(NioClientBoss.java:83) ~[netty-3.9.0.Final.jar:na]
    at org.jboss.netty.channel.socket.nio.AbstractNioSelector.run(AbstractNioSelector.java:318) ~[netty-3.9.0.Final.jar:na]
    at org.jboss.netty.channel.socket.nio.NioClientBoss.run(NioClientBoss.java:42) ~[netty-3.9.0.Final.jar:na]
    ... 3 common frames omitted
schleichardt commented 8 years ago

client.execute might throw this: java.util.concurrent.CompletionException: io.sphere.sdk.http.HttpException: java.util.concurrent.TimeoutException: timeout for AHC