Why would a “java.net.ConnectException: Connection timed out” exception occur when URL is up?

后端 未结 10 1663
傲寒
傲寒 2020-11-29 18:42

I\'m getting a ConnectException: Connection timed out with some frequency from my code. The URL I am trying to hit is up. The same code works for some users,

10条回答
  •  有刺的猬
    2020-11-29 19:03

    If the URL works fine in the web browser on the same machine, it might be that the Java code isn't using the HTTP proxy the browser is using for connecting to the URL.

提交回复
热议问题