java.net.ConnectException: Connection refused: connect

tip

Firewall might be blocking your connection, or MySQL it's not running on your server machine.


rafael
tip

Check if you have started your server, or if your server is set to listen to the port you're trying to connect and is waiting to accept connections and check if the firewall isn't blocking your connection.


rafael
tip

Check if ip adress is correct, if the port is correct, and if the server is up and running and waiting for connections. Also, check if there's no firewall blocking you and if your internet connection is working.


rafael

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

  • cluster IP question and Jconsole?
    via by tinhuty he,
  • Connection Refuse
    via by 843798,
  • node-info 页面报错
    via GitHub by niuliwei
    ,
  • Unable to connect
    via GitHub by hsdmiranda
    ,
  • Configuring jmxAgent in Camel
    via Stack Overflow by kallada
    ,
  • Cannot run arquillian tests
    via Stack Overflow by Pablo
    ,
    • java.net.ConnectException: Connection refused: connect at sun.rmi.transport.tcp.TCPEndpoint.newSocket(Unknown Source) at sun.rmi.transport.tcp.TCPChannel.createConnection(Unknown Source) at sun.rmi.transport.tcp.TCPChannel.newConnection(Unknown Source) at sun.rmi.server.UnicastRef.invoke(Unknown Source) at javax.management.remote.rmi.RMIServerImpl_Stub.newClient(Unknown Source) at javax.management.remote.rmi.RMIConnector.getConnection(Unknown Source) at javax.management.remote.rmi.RMIConnector.connect(Unknown Source) at javax.management.remote.JMXConnectorFactory.connect(Unknown Source) at javax.management.remote.JMXConnectorFactory.connect(Unknown Source) at com.globalcharge.quartz.job.CheckPendingConsumer.execute(CheckPendingConsumer.java:51) at org.quartz.core.JobRunShell.run(JobRunShell.java:202) at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:525) Caused by: java.net.ConnectException: Connection refused: connect at java.net.DualStackPlainSocketImpl.connect0(Native Method) at java.net.DualStackPlainSocketImpl.socketConnect(Unknown Source) at java.net.AbstractPlainSocketImpl.doConnect(Unknown Source) at java.net.AbstractPlainSocketImpl.connectToAddress(Unknown Source) at java.net.AbstractPlainSocketImpl.connect(Unknown Source) at java.net.PlainSocketImpl.connect(Unknown Source) at java.net.SocksSocketImpl.connect(Unknown Source) at java.net.Socket.connect(Unknown Source) at java.net.Socket.connect(Unknown Source) at java.net.Socket.<init>(Unknown Source) at java.net.Socket.<init>(Unknown Source) at sun.rmi.transport.proxy.RMIDirectSocketFactory.createSocket(Unknown Source) at sun.rmi.transport.proxy.RMIMasterSocketFactory.createSocket(Unknown Source) ... 12 more

    Users with the same issue

    marcbouvierdav
    marcbouvierdav1 times, last one,
    ivanszkypeter
    ivanszkypeter17 times, last one,
    jf-ast
    jf-ast3 times, last one,
    Unknown visitor1 times, last one,
    Andreas Häber
    Andreas Häber2 times, last one,
    708 more bugmates