What is the difference between connection timeout and socket timeout




















Am I misunderstanding the difference between a socket and a connection time-out? The library is here not officially realsed yet. A connection timeout occurs only upon starting the TCP connection. This usually happens if the remote machine does not answer. A socket timeout is dedicated to monitor the continuous incoming data flow.

If the value is set to infinity, you will not wait forever. However, the timeouts on OS may be really long. On some slow network, I've seen timeouts as long as 6 minutes. Even if you set the timeout value for socket, it may not work if the timeout happens in the native code. We can reproduce the problem on Linux by connecting to a host blocked by firewall or unplugging the cable on switch.

The only safe approach to handle TCP timeout is to run the connection code in a different thread and interrupt the thread when it takes too long. Login Sign Up. Can you ping the remote host? Is the target machine running the relevant Hadoop processes? Can you telnet to the target host and port? Can you telnet to the target host and port from any other machine?

On the target machine, can you telnet to the port using localhost as the hostname. If this works but external network connections time out, it's usually a firewall issue. If it is a remote object store: is the address correct? Does it go away when you repeat the operation? Does it only happen on bulk operations? If the latter, it's probably due to throttling at the far end. No labels. Content Tools. Powered by Atlassian Confluence 7.



0コメント

  • 1000 / 1000