java.net.ConnectException: 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 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.SocksSocketImpl.connect(java.base@9-internal/SocksSocketImpl.java:402) at java.net.Socket.connect(java.base@9-internal/Socket.java:591) at sun.security.ssl.SSLSocketImpl.connect(java.base@9-internal/SSLSocketImpl.java:652) at sun.security.ssl.SSLSocketImpl.<init>(java.base@9-internal/SSLSocketImpl.java:436) at sun.security.ssl.SSLSocketFactoryImpl.createSocket(java.base@9-internal/SSLSocketFactoryImpl.java:137)

Searched on Google with the first line of a JAVA stack trace?

We can recommend more relevant solutions and speed up debugging when you paste your entire stack trace with the exception message. Try a sample exception.

Recommended solutions based on your search

Solutions on the web

via JDK Bug System by Amy Lu, 1 year ago
java.net.Socket.connect(java.base@9-internal/Socket.java:591) at sun.security.ssl.SSLSocketImpl.connect(java.base@9-internal/SSLSocketImpl.java:652) at sun.security.ssl.SSLSocketImpl.<init>(java.base@9-internal/SSLSocketImpl.java:436) at sun.security.ssl.SSLSocketFactoryImpl.createSocket(java.base@9-internal/SSLSocketFactoryImpl.java:137)
java.net.ConnectException: 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 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.SocksSocketImpl.connect(java.base@9-internal/SocksSocketImpl.java:402) at java.net.Socket.connect(java.base@9-internal/Socket.java:591) at sun.security.ssl.SSLSocketImpl.connect(java.base@9-internal/SSLSocketImpl.java:652) at sun.security.ssl.SSLSocketImpl.<init>(java.base@9-internal/SSLSocketImpl.java:436) at sun.security.ssl.SSLSocketFactoryImpl.createSocket(java.base@9-internal/SSLSocketFactoryImpl.java:137)
at undefined.SocketCreation.connectNormally1(SocketCreation.java:318)
at undefined.SocketCreation.doClientSide(SocketCreation.java:275)
at undefined.SocketCreation.startClient(SocketCreation.java:508)
at undefined.SocketCreation.(SocketCreation.java:440)
at undefined.SocketCreation.main(SocketCreation.java:413)

Users with the same issue

You are the first who have seen this exception. Write a tip to help other users and build your expert profile.

Know the solutions? Share your knowledge to help other developers to debug faster.