java.net.ConnectException: Connection refused

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

Samebug tips

,
Expert tip

Check if your firewall is not blocking your connection. If it's not, you might need to explicitly set advertised.host.name to advertised.host.name = yourIpAddress, this forces the hosts returned to be the resolvable IP address of your VM.

Solutions on the web

via GitHub by junrao
, 2 years ago
Connection refused
via netbeans.org by Unknown author, 2 years ago
via Oracle Community by 843790, 1 year ago
Connection refused: connect
via rssing.com by Unknown author, 2 years ago
Connection refused
via hadoop-zookeeper-user by Jean-Daniel Cryans, 1 year ago
java.net.ConnectException: Connection refused
at sun.nio.ch.Net.connect(Native Method)
at sun.nio.ch.SocketChannelImpl.connect(SocketChannelImpl.java:500)
at kafka.network.BlockingChannel.connect(BlockingChannel.scala:57)
at kafka.producer.SyncProducer.connect(SyncProducer.scala:146)

Users with the same issue

Samebug visitor profile picture
Unknown user
Once, 1 year ago

Write tip

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