1

I am doing a POST call in Java to an external device. Sometimes, and only sometimes it fails with EOFException. I increased the timeout value however it keeps thorwing the EOFException. Any idea what could cause that?

Error processing POST 2 request java.util.concurrent.ExecutionException: 
java.io.EOFException: HttpConnectionOverHTTP@1030fd::SocketChannelEndPoint@1bef5c3
{l=/192.168.2.30:53792,r=/192.168.2.27:80,ISHUT,fill=-,flush=-,to=85/0}
{io=1/0,kio=1,kro=1}->HttpConnectionOverHTTP@1030fd(l:/192.168.2.30:53792 <-> r:/192.168.2.27:80,closed=false)
=>HttpChannelOverHTTP@b7ea87(exchange=HttpExchange@e3564c{req=HttpRequest[POST /status.cgi HTTP/1.1]@1231335[TERMINATED/null] 
res=HttpResponse[null 0 null]@15deebf[PENDING/null]})[send=HttpSenderOverHTTP@a3d281(req=QUEUED,snd=COMPLETED,failure=null)
[HttpGenerator@babb2f{s=START}],recv=HttpReceiverOverHTTP@11dbd76(rsp=IDLE,failure=null)[HttpParser{s=CLOSED,0 of -1}]]
Chris
  • 93
  • 8
  • 1
    Hard to answer. It could be many things. You need to identify which requests fail, and if there is a difference between them and the others that do not, if the errors happens to only those requests, or random (Perhaps network issue). It could be the Request/Response payload might be too big for some of them? :) Honestly I would start with logging as much as I can to understand if there is a pattern here or not. – JCompetence Jan 26 '22 at 10:02
  • Thank you. It is always the same call. Basically the call gets the actual status of an IoT device, After a while it sometimes fails, then it works again. In my opion it is a network instability as the device is connected via Wifi. – Chris Jan 26 '22 at 13:58

0 Answers0