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

java.net.ConnectException: Connection refused
at sun.nio.ch.Net.connect0(Native Method)
at sun.nio.ch.Net.connect(Net.java:454)
at sun.nio.ch.Net.connect(Net.java:446)
at sun.nio.ch.SocketChannelImpl.connect(SocketChannelImpl.java:648)
at com.santaba.agent.agentmonitor.PeerSocketChannel.(PeerSocketChannel.java:44)
at com.santaba.agent.agentmonitor.AgentStatus._checkPeerStatus(AgentStatus.java:140)
at com.santaba.agent.agentmonitor.AgentStatus.checkAgent2(AgentStatus.java:99)
at com.santaba.agent.agentmonitor.AgentStatus.checkAgentRunning(AgentStatus.java:504)
at com.santaba.agent.watchdog.WatchdogMain.main(WatchdogMain.java:377)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:497)
at org.rzo.yajsw.app.WrapperJVMMain.executeMain(WrapperJVMMain.java:126)
at org.rzo.yajsw.app.WrapperJVMMain.main(WrapperJVMMain.java:66)

Users with the same issue

Samebug visitor profile picture
Unknown user
Once, 1 year ago
Samebug visitor profile picture
Unknown user
Once, 1 year ago
Samebug visitor profile picture
Unknown user
Once, 1 year ago
Samebug visitor profile picture
Unknown user
Once, 1 year ago
Samebug visitor profile picture
Unknown user
Once, 2 years ago
22 more bugmates

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