java.net.ConnectException

Operation timed out at java.net.PlainSocketImpl.socketConnect(java.base@9-internal/Native Method) at java.net.AbstractPlainSocketImpl.doConnect(java.base@9-internal/AbstractPlainSocketImpl.java:400) at java.net.AbstractPlainSocketImpl.connectToAddress(java.base@9-internal/AbstractPlainSocketImpl.java:243) at java.net.AbstractPlainSocketImpl.connect(java.base@9-internal/AbstractPlainSocketImpl.java:225) at java.net.Socket.connect(java.base@9-internal/Socket.java:591) at sun.net.NetworkClient.doConnect(java.base@9-internal/NetworkClient.java:177) at sun.net.www.http.HttpClient.openServer(java.base@9-internal/HttpClient.java:432) at sun.net.www.http.HttpClient$1.run(java.base@9-internal/HttpClient.java:484) at sun.net.www.http.HttpClient$1.run(java.base@9-internal/HttpClient.java:482) at java.security.AccessController.doPrivileged(java.base@9-internal/Native Method) at sun.net.www.http.HttpClient.privilegedOpenServer(java.base@9-internal/HttpClient.java:481) at sun.net.www.http.HttpClient.openServer(java.base@9-internal/HttpClient.java:522) at sun.net.www.http.HttpClient.<init>(java.base@9-internal/HttpClient.java:211) at sun.net.www.http.HttpClient.New(java.base@9-internal/HttpClient.java:308) at sun.net.www.http.HttpClient.New(java.base@9-internal/HttpClient.java:326) at sun.net.www.protocol.http.HttpURLConnection.getNewHttpClient(java.base@9-internal/HttpURLConnection.java:1163) at sun.net.www.protocol.http.HttpURLConnection.plainConnect0(java.base@9-internal/HttpURLConnection.java:1142) at sun.net.www.protocol.http.HttpURLConnection$6.run(java.base@9-internal/HttpURLConnection.java:986) at sun.net.www.protocol.http.HttpURLConnection$6.run(java.base@9-internal/HttpURLConnection.java:984) at java.security.AccessController.doPrivileged(java.base@9-internal/Native Method) at java.security.AccessController.doPrivilegedWithCombiner(java.base@9-internal/AccessController.java:792) at sun.net.www.protocol.http.HttpURLConnection.plainConnect(java.base@9-internal/HttpURLConnection.java:983) at sun.net.www.protocol.http.HttpURLConnection.connect(java.base@9-internal/HttpURLConnection.java:930) at java.net.HttpConnectSocketImpl.doTunnel(java.base@9-internal/HttpConnectSocketImpl.java:167) at java.net.HttpConnectSocketImpl.access$200(java.base@9-internal/HttpConnectSocketImpl.java:44) at java.net.HttpConnectSocketImpl$2.run(java.base@9-internal/HttpConnectSocketImpl.java:151) at java.net.HttpConnectSocketImpl$2.run(java.base@9-internal/HttpConnectSocketImpl.java:149) at java.security.AccessController.doPrivileged(java.base@9-internal/Native Method) at java.net.HttpConnectSocketImpl.privilegedDoTunnel(java.base@9-internal/HttpConnectSocketImpl.java:148) at java.net.HttpConnectSocketImpl.connect(java.base@9-internal/HttpConnectSocketImpl.java:111) at java.net.Socket.connect(java.base@9-internal/Socket.java:591) at java.net.Socket.connect(java.base@9-internal/Socket.java:540)

Samebug tips0

There are no available Samebug tips for this exception. If you know how to solve this issue, help other users by writing a short tip.

Don't give up yet. Paste your full stack trace to get a solution.

Solutions on the web4188

  • via JDK Bug System by Hamlin Li, 9 months ago
    sun.net.NetworkClient.doConnect(java.base@9-internal/NetworkClient.java:177) at sun.net.www.http.HttpClient.openServer(java.base@9-internal/HttpClient.java:432) at sun.net.www.http.HttpClient$1.run(java.base@9-internal/HttpClient.java:484) at
  • via JDK Bug System by Amy Lu, 10 months ago
    Connection refused at java.net.PlainSocketImpl.socketConnect(java.base@9-internal/Native Method) at java.net.AbstractPlainSocketImpl.doConnect(java.base@9-internal/AbstractPlainSocketImpl.java:400) at
  • via JDK Bug System by Felix Yang, 10 months ago
    Connection refused at java.net.PlainSocketImpl.socketConnect(java.base@9-internal/Native Method) at java.net.AbstractPlainSocketImpl.doConnect(java.base@9-internal/AbstractPlainSocketImpl.java:400) at
  • Stack trace

    • java.net.ConnectException: Operation timed out at java.net.PlainSocketImpl.socketConnect(java.base@9-internal/Native Method) at java.net.AbstractPlainSocketImpl.doConnect(java.base@9-internal/AbstractPlainSocketImpl.java:400) at java.net.AbstractPlainSocketImpl.connectToAddress(java.base@9-internal/AbstractPlainSocketImpl.java:243) at java.net.AbstractPlainSocketImpl.connect(java.base@9-internal/AbstractPlainSocketImpl.java:225) at java.net.Socket.connect(java.base@9-internal/Socket.java:591) at sun.net.NetworkClient.doConnect(java.base@9-internal/NetworkClient.java:177) at sun.net.www.http.HttpClient.openServer(java.base@9-internal/HttpClient.java:432) at sun.net.www.http.HttpClient$1.run(java.base@9-internal/HttpClient.java:484) at sun.net.www.http.HttpClient$1.run(java.base@9-internal/HttpClient.java:482) at java.security.AccessController.doPrivileged(java.base@9-internal/Native Method) at sun.net.www.http.HttpClient.privilegedOpenServer(java.base@9-internal/HttpClient.java:481) at sun.net.www.http.HttpClient.openServer(java.base@9-internal/HttpClient.java:522) at sun.net.www.http.HttpClient.<init>(java.base@9-internal/HttpClient.java:211) at sun.net.www.http.HttpClient.New(java.base@9-internal/HttpClient.java:308) at sun.net.www.http.HttpClient.New(java.base@9-internal/HttpClient.java:326) at sun.net.www.protocol.http.HttpURLConnection.getNewHttpClient(java.base@9-internal/HttpURLConnection.java:1163) at sun.net.www.protocol.http.HttpURLConnection.plainConnect0(java.base@9-internal/HttpURLConnection.java:1142) at sun.net.www.protocol.http.HttpURLConnection$6.run(java.base@9-internal/HttpURLConnection.java:986) at sun.net.www.protocol.http.HttpURLConnection$6.run(java.base@9-internal/HttpURLConnection.java:984) at java.security.AccessController.doPrivileged(java.base@9-internal/Native Method) at java.security.AccessController.doPrivilegedWithCombiner(java.base@9-internal/AccessController.java:792) at sun.net.www.protocol.http.HttpURLConnection.plainConnect(java.base@9-internal/HttpURLConnection.java:983) at sun.net.www.protocol.http.HttpURLConnection.connect(java.base@9-internal/HttpURLConnection.java:930) at java.net.HttpConnectSocketImpl.doTunnel(java.base@9-internal/HttpConnectSocketImpl.java:167) at java.net.HttpConnectSocketImpl.access$200(java.base@9-internal/HttpConnectSocketImpl.java:44) at java.net.HttpConnectSocketImpl$2.run(java.base@9-internal/HttpConnectSocketImpl.java:151) at java.net.HttpConnectSocketImpl$2.run(java.base@9-internal/HttpConnectSocketImpl.java:149) at java.security.AccessController.doPrivileged(java.base@9-internal/Native Method) at java.net.HttpConnectSocketImpl.privilegedDoTunnel(java.base@9-internal/HttpConnectSocketImpl.java:148) at java.net.HttpConnectSocketImpl.connect(java.base@9-internal/HttpConnectSocketImpl.java:111) at java.net.Socket.connect(java.base@9-internal/Socket.java:591) at java.net.Socket.connect(java.base@9-internal/Socket.java:540) at HttpProxy.test(HttpProxy.java:89) at HttpProxy.main(HttpProxy.java:68)

    Write tip

    You have a different solution? A short tip here would help you and many other users who saw this issue last week.

    Users with the same issue

    You’re the first here who have seen this exception.