java.net.BindException

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.

  • GitHub comment 8875#214818510
    via GitHub by wildfly-ci
    ,
  • GitHub comment 8875#214884784
    via GitHub by wildfly-ci
    ,
  • GitHub comment 60#51005545
    via GitHub by wildfly-ci
    ,
  • GitHub comment 9153#260321590
    via GitHub by wildfly-ci
    ,
  • GitHub comment 9153#260318388
    via GitHub by wildfly-ci
    ,
  • Callbacks not triggered
    via GitHub by kigero
    ,
  • How to write on web server in java
    via Stack Overflow by agarwal_achhnera
    ,
    • java.net.BindException: Address already in use: bind [Server:main-one] at sun.nio.ch.Net.bind0(Native Method) [rt.jar:1.8.0_74] [Server:main-one] at sun.nio.ch.Net.bind(Net.java:433) [rt.jar:1.8.0_74] [Server:main-one] at sun.nio.ch.Net.bind(Net.java:425) [rt.jar:1.8.0_74] [Server:main-one] at sun.nio.ch.ServerSocketChannelImpl.bind(ServerSocketChannelImpl.java:223) [rt.jar:1.8.0_74] [Server:main-one] at sun.nio.ch.ServerSocketAdaptor.bind(ServerSocketAdaptor.java:74) [rt.jar:1.8.0_74] [Server:main-one] at org.xnio.nio.NioXnioWorker.createTcpConnectionServer(NioXnioWorker.java:190) [Server:main-one] at org.xnio.XnioWorker.createStreamConnectionServer(XnioWorker.java:243) [xnio-api-3.3.6.Final.jar:3.3.6.Final] [Server:main-one] at org.wildfly.extension.undertow.HttpListenerService.startListening(HttpListenerService.java:126) [Server:main-one] at org.wildfly.extension.undertow.ListenerService.start(ListenerService.java:138) [Server:main-one] ... 5 more [Server:main-one] org.jboss.as.test.integration.domain.management.cli.RolloutPlanTestCase.testRollbackAcrossGroupsRolloutPlan: java.lang.Exception: Http request failed. at java.util.concurrent.FutureTask.report(FutureTask.java:122) at java.util.concurrent.FutureTask.get(FutureTask.java:206) at org.jboss.as.test.integration.common.HttpRequest.execute(HttpRequest.java:51) at org.jboss.as.test.integration.common.HttpRequest.get(HttpRequest.java:81) at org.jboss.as.test.integration.domain.management.cli.RolloutPlanTestCase.checkURL(RolloutPlanTestCase.java:420) at org.jboss.as.test.integration.domain.management.cli.RolloutPlanTestCase.testRollbackAcrossGroupsRolloutPlan(RolloutPlanTestCase.java:322) Caused by: java.net.ConnectException: Connection refused: connect at java.net.DualStackPlainSocketImpl.connect0(Native Method) at java.net.DualStackPlainSocketImpl.socketConnect(DualStackPlainSocketImpl.java:79) at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:350) at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:206) at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:188) at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:172) at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392) at java.net.Socket.connect(Socket.java:589) at java.net.Socket.connect(Socket.java:538) at sun.net.NetworkClient.doConnect(NetworkClient.java:180) at sun.net.www.http.HttpClient.openServer(HttpClient.java:432) at sun.net.www.http.HttpClient.openServer(HttpClient.java:527) at sun.net.www.http.HttpClient.<init>(HttpClient.java:211) at sun.net.www.http.HttpClient.New(HttpClient.java:308) at sun.net.www.http.HttpClient.New(HttpClient.java:326) at sun.net.www.protocol.http.HttpURLConnection.getNewHttpClient(HttpURLConnection.java:1169) at sun.net.www.protocol.http.HttpURLConnection.plainConnect0(HttpURLConnection.java:1105) at sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConnection.java:999) at sun.net.www.protocol.http.HttpURLConnection.connect(HttpURLConnection.java:933) at sun.net.www.protocol.http.HttpURLConnection.getInputStream0(HttpURLConnection.java:1513) at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1441) at java.net.HttpURLConnection.getResponseCode(HttpURLConnection.java:480) at org.jboss.as.test.integration.common.HttpRequest.processResponse(HttpRequest.java:151) at org.jboss.as.test.integration.common.HttpRequest.access$000(HttpRequest.java:45) at org.jboss.as.test.integration.common.HttpRequest$1.call(HttpRequest.java:78) at org.jboss.as.test.integration.common.HttpRequest$1.call(HttpRequest.java:73) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) at java.lang.Thread.run(Thread.java:745)

    Users with the same issue

    marcbouvierdav
    1 times, last one,
    Unknown visitor1 times, last one,
    Unknown visitor1 times, last one,
    Unknown visitor1 times, last one,
    bpbhat77
    1 times, last one,
    714 more bugmates