B4J Question java.io.IOException: unexpected end of stream on okhttp3.Address@2c98c95e


Licensed User
Hi all,
today I'm encountering this error message while connecting to my VPS where a B4J module is listening in order to serve back data from a MySQL DB.

Yes, I'm aware of RDC2 but this system was built before its availability and I can't rewrite it from scatch.

What I'd like to know is where to look for problems: server, b4j program on server, firewall somewhere (remote or local), local code posting to server.

On Github I found a reply like the following:
"The error occurs when OkHttp try to reuse a connection that is in FIN_WAIT2 state in server, because the server keep_alive timeout is lesser than the client timeout."
If it applies to my case, could it indicate that the server its really slow so it timeouts before being able to reply to the client?

Note that I used this same components for years and the error just appeared today.


Licensed User
Not yet. I restarted the service. Even stopped and started again.
Do you think it could be some general problem at the server?
I'm gonna try the full reset...finger crossed..eheh

Update: stopping and the restarting the server cured the problem. I'm still curious to understand what happened but at least now I can prepare my lunch not thinking about it..eheh
Last edited: