we have an application where one part uses the jetty httpclient to communicate with another part that runs a jetty http server.
Both run version 9.4.2.v20170220.
What I observe is that we very occasionally get an earlyEOF exception (see example stacktrace below).
What can I do to fix this? Is it safe to just retry and assume the request has not reached the server?
- client and server are running "close" to each other (both machines in the same office)
java.lang.RuntimeException: Failed to perform request.
at com.clear2pay.na.cucumber.stepdefinitions.RequestSteps$RequestAction.perform(RequestSteps.java:141)
at com.clear2pay.na.cucumber.stepdefinitions.ResponseSteps.lambda$eventuallyResponseBodyContainsList$3(ResponseSteps.java:167)
at org.awaitility.core.AssertionCondition$1.eval(AssertionCondition.java:55)
at org.awaitility.core.ConditionAwaiter$ConditionPoller.run(ConditionAwaiter.java:215)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
at ?.Then eventually the response body contains an items list with only the following elements(features/paymentReturn/fetchPaymentReturns.feature:32)
Caused by: java.util.concurrent.
ExecutionException: java.io.EOFException: HttpConnectionOverHTTP@5c17fbe2(l:/10.58.232.33:37384 <-> r:/10.58.233.142:8787,closed=false)=>HttpChannelOverHTTP@da6d7d(exchange=HttpExchange@46cb4904 req=TERMINATED/null@null res=PENDING/null@null)[send=HttpSenderOverHTTP@1287e118(req=QUEUED,snd=COMPLETED,failure=null)[HttpGenerator@499f9114{s=START}],recv=HttpReceiverOverHTTP@1afdbcdf(rsp=IDLE,failure=null)[HttpParser{s=CLOSED,0 of -1}]]<-SocketChannelEndPoint@66255ed{/10.58.233.142:8787<->/10.58.232.33:37384,ISHUT,fill=-,flush=-,to=0/0}{io=0/0,kio=0,kro=1}->HttpConnectionOverHTTP@5c17fbe2(l:/10.58.232.33:37384 <-> r:/10.58.233.142:8787,closed=false)=>HttpChannelOverHTTP@da6d7d(exchange=HttpExchange@46cb4904 req=TERMINATED/null@null res=PENDING/null@null)[send=HttpSenderOverHTTP@1287e118(req=QUEUED,snd=COMPLETED,failure=null)[HttpGenerator@499f9114{s=START}],recv=HttpReceiverOverHTTP@1afdbcdf(rsp=IDLE,failure=null)[HttpParser{s=CLOSED,0 of -1}]] at org.eclipse.jetty.client.util.FutureResponseListener.getResult(FutureResponseListener.java:118)
at org.eclipse.jetty.client.util.FutureResponseListener.get(FutureResponseListener.java:110)
at org.eclipse.jetty.client.HttpRequest.send(HttpRequest.java:654)
at com.clear2pay.na.cucumber.stepdefinitions.RequestSteps$RequestAction.perform(RequestSteps.java:139)
at com.clear2pay.na.cucumber.stepdefinitions.ResponseSteps.lambda$eventuallyResponseBodyContainsList$3(ResponseSteps.java:167)
at org.awaitility.core.AssertionCondition$1.eval(AssertionCondition.java:55)
at org.awaitility.core.ConditionAwaiter$ConditionPoller.run(ConditionAwaiter.java:215)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
Caused by: java.io.EOFException: HttpConnectionOverHTTP@
5c17fbe2(l:/10.58.232.33:37384 <-> r:/10.58.233.142:8787,closed=false)=>HttpChannelOverHTTP@da6d7d(exchange=HttpExchange@46cb4904 req=TERMINATED/null@null res=PENDING/null@null)[send=HttpSenderOverHTTP@1287e118(req=QUEUED,snd=COMPLETED,failure=null)[HttpGenerator@499f9114{s=START}],recv=HttpReceiverOverHTTP@1afdbcdf(rsp=IDLE,failure=null)[HttpParser{s=CLOSED,0 of -1}]]<-SocketChannelEndPoint@66255ed{/10.58.233.142:8787<->/10.58.232.33:37384,ISHUT,fill=-,flush=-,to=0/0}{io=0/0,kio=0,kro=1}->HttpConnectionOverHTTP@5c17fbe2(l:/10.58.232.33:37384 <-> r:/10.58.233.142:8787,closed=false)=>HttpChannelOverHTTP@da6d7d(exchange=HttpExchange@46cb4904 req=TERMINATED/null@null res=PENDING/null@null)[send=HttpSenderOverHTTP@1287e118(req=QUEUED,snd=COMPLETED,failure=null)[HttpGenerator@499f9114{s=START}],recv=HttpReceiverOverHTTP@1afdbcdf(rsp=IDLE,failure=null)[HttpParser{s=CLOSED,0 of -1}]] at org.eclipse.jetty.client.http.HttpReceiverOverHTTP.earlyEOF(HttpReceiverOverHTTP.java:310)
at org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:1418)
at org.eclipse.jetty.client.http.HttpReceiverOverHTTP.shutdown(HttpReceiverOverHTTP.java:196)
at org.eclipse.jetty.client.http.HttpReceiverOverHTTP.process(HttpReceiverOverHTTP.java:143)
at org.eclipse.jetty.client.http.HttpReceiverOverHTTP.receive(HttpReceiverOverHTTP.java:70)
at org.eclipse.jetty.client.http.HttpChannelOverHTTP.receive(HttpChannelOverHTTP.java:130)
at org.eclipse.jetty.client.http.HttpConnectionOverHTTP.onFillable(HttpConnectionOverHTTP.java:116)
at org.eclipse.jetty.util.thread.Invocable.invokePreferred(Invocable.java:122)
at org.eclipse.jetty.util.thread.strategy.ExecutingExecutionStrategy.invoke(ExecutingExecutionStrategy.java:58)
at org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume.produceConsume(ExecuteProduceConsume.java:201)
at org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume.run(ExecuteProduceConsume.java:133)
at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:672)
at org.eclipse.jetty.util.thread.QueuedThreadPool$2.run(QueuedThreadPool.java:590)
... 1 more