java.net.ConnectException

Connection refused

Samebug tips4

Check if your MongoDB is available.


Check if your server (or a proxy server) is not going up and down. There might be something between a proxy and a client sending intermittent requests to non-functioning hosts as well. There might as well be too many requests in a short amount of time.

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

Solutions on the web13208

  • Connection refused (Connection refused)
  • Connection refused (Connection refused)
  • Connection refused (Connection refused)
  • Stack trace

    • java.net.ConnectException: Connection refused at java.net.PlainSocketImpl.socketConnect(Native Method) at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:350) at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:137) at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:124) at java.net.Socket.<init>(Socket.java:268) at java.net.Socket.<init>(Socket.java:95) at sun.rmi.transport.proxy.RMIDirectSocketFactory.createSocket(RMIDirectSocketFactory.java:20) at sun.rmi.transport.proxy.RMIMasterSocketFactory.createSocket(RMIMasterSocketFactory.java:115) at sun.rmi.transport.tcp.TCPEndpoint.newSocket(TCPEndpoint.java:494) at sun.rmi.transport.tcp.TCPChannel.createConnection(TCPChannel.java:185) at sun.rmi.transport.tcp.TCPChannel.newConnection(TCPChannel.java:169) at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:78) at ServeurChatImpl_Stub.connect(Unknown Source) at ClientDistantImpl.main(ClientDistantImpl.java:85)

    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

    108 times, 35 minutes ago
    18 times, 59 minutes ago
    20 times, 15 hours ago
    2 times, 19 hours ago
    26 times, 20 hours ago
    277 more bugmates