Getting ConnectionTimeoutException with the host did not accept the connection within timeout

后端 未结 1 1042
不知归路
不知归路 2021-02-19 21:26

Can Some one Help me, how we can solve the following problem.

nested
exception is org.apache.commons.httpclient.ConnectTimeoutException: The host did
not accept          


        
1条回答
  •  慢半拍i
    慢半拍i (楼主)
    2021-02-19 21:42

    Your program will get a ConnectionTimeoutException whenever the server side does not "exist". A timeout of 10 seconds (10000 ms) is sufficient to work in most cases to connect between any processes even when located far apart (high latency).

    There are many reasons why the client cannot get a connection:

    • The server process is not running.
    • The server process is not accepting connections.
    • The address or port that the client process used to connect is not correct.
    • Route to the server is not valid

    Typically, though these result in quick failure responses because the server operating system or some router is able to respond with a failure. Here are some more that may apply directly to your situation:

    • Server physically off
    • Server or server process hung
    • Server physically disconnected from the network
    • Invalid destination address and the address does not exist on the network
    • Firewall rules blocking the outgoing route from the client
    • Firewall rules blocking the incoming route to the server

    These kinds of problems usually result in the time out exception because there is no return message (the client operating system just has to give up and that is the reasons for having a timeout).

    This list may not be complete but may help you in troubleshooting your problem. If you can provide additional information about your configuration and network and what you specifically would like help resolving, someone here should be able to give you more specific assistance.

    0 讨论(0)
提交回复
热议问题