Where should I start investigating SocketTimeoutException: Read timed out

后端 未结 3 1210
抹茶落季
抹茶落季 2020-12-30 00:37

Every now and then I see following stacktrace in the log in which, HttpClient socket times out trying to access text/script content from another se

3条回答
  •  误落风尘
    2020-12-30 01:01

    One more aspect that has not been covered here is Firewall.

    I have found that SocketTimeoutExceptions may often be related to a port not being open for communication or a firewall blocking communication from selected machines only.

    In case you are debugging an issue make sure you also investigate if there is a firewall between the two machines trying to communicate and if there is one make sure the ports are available for communication between the two.

    Interesting things about firewall related issues is that it does not let you know if the server is down or not responding. Typical behavior is to let the client wait forever. So you are always left in dark. A simple telnet on the server port should show if its available/open for communication.

    Hope this helps.

提交回复
热议问题