java.net.BindException: Address already in use

Atlassian JIRA | Gurleen Anand [Atlassian] | 1 year ago
  1. 0

    There is no validation in place to check for the current port in use for running the application before allowing the same port to be used in the "AJP13 Bind" field on the "Server Settings" screen. The config will be saved but the next time on application restart, it will fail with the following error: {noformat} 2015-06-12 13:45:44,607 ERROR - Could not start server, one of the ports is taken: :8060 (http), :8060 (ajp13): Address already in use java.net.BindException: Address already in use at java.net.PlainSocketImpl.socketBind(Native Method) at java.net.AbstractPlainSocketImpl.bind(AbstractPlainSocketImpl.java:382) at java.net.ServerSocket.bind(ServerSocket.java:375) at java.net.ServerSocket.<init>(ServerSocket.java:237) at java.net.ServerSocket.<init>(ServerSocket.java:181) at org.eclipse.jetty.server.bio.SocketConnector.newServerSocket(SocketConnector.java:96) at org.eclipse.jetty.server.bio.SocketConnector.open(SocketConnector.java:85) at org.eclipse.jetty.server.AbstractConnector.doStart(AbstractConnector.java:316) at org.eclipse.jetty.server.bio.SocketConnector.doStart(SocketConnector.java:156) at org.eclipse.jetty.ajp.Ajp13SocketConnector.doStart(Ajp13SocketConnector.java:56) at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:64) at org.eclipse.jetty.server.Server.doStart(Server.java:291) at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:64) at com.cenqua.fisheye.web.WebServer.start(WebServer.java:326) at com.cenqua.fisheye.ctl.Run.mainImpl(Run.java:229) at com.cenqua.fisheye.ctl.Run.main(Run.java:56) 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:483) at com.cenqua.fisheye.FishEyeCtl.mainImpl(FishEyeCtl.java:99) at com.cenqua.fisheye.FishEyeCtl.main(FishEyeCtl.java:42) {noformat} h4. Workaround Manually edit the {{<FISHEYE_INST>/config.xml}} file and change the port in following section: {noformat} <ajp13 bind=":8060"/> {noformat} to a port that is not currently in use by any other application and restart Fisheye/Crucible.

    Atlassian JIRA | 1 year ago | Gurleen Anand [Atlassian]
    java.net.BindException: Address already in use
  2. 0

    There is no validation in place to check for the current port in use for running the application before allowing the same port to be used in the "AJP13 Bind" field on the "Server Settings" screen. The config will be saved but the next time on application restart, it will fail with the following error: {noformat} 2015-06-12 13:45:44,607 ERROR - Could not start server, one of the ports is taken: :8060 (http), :8060 (ajp13): Address already in use java.net.BindException: Address already in use at java.net.PlainSocketImpl.socketBind(Native Method) at java.net.AbstractPlainSocketImpl.bind(AbstractPlainSocketImpl.java:382) at java.net.ServerSocket.bind(ServerSocket.java:375) at java.net.ServerSocket.<init>(ServerSocket.java:237) at java.net.ServerSocket.<init>(ServerSocket.java:181) at org.eclipse.jetty.server.bio.SocketConnector.newServerSocket(SocketConnector.java:96) at org.eclipse.jetty.server.bio.SocketConnector.open(SocketConnector.java:85) at org.eclipse.jetty.server.AbstractConnector.doStart(AbstractConnector.java:316) at org.eclipse.jetty.server.bio.SocketConnector.doStart(SocketConnector.java:156) at org.eclipse.jetty.ajp.Ajp13SocketConnector.doStart(Ajp13SocketConnector.java:56) at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:64) at org.eclipse.jetty.server.Server.doStart(Server.java:291) at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:64) at com.cenqua.fisheye.web.WebServer.start(WebServer.java:326) at com.cenqua.fisheye.ctl.Run.mainImpl(Run.java:229) at com.cenqua.fisheye.ctl.Run.main(Run.java:56) 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:483) at com.cenqua.fisheye.FishEyeCtl.mainImpl(FishEyeCtl.java:99) at com.cenqua.fisheye.FishEyeCtl.main(FishEyeCtl.java:42) {noformat} h4. Workaround Manually edit the {{<FISHEYE_INST>/config.xml}} file and change the port in following section: {noformat} <ajp13 bind=":8060"/> {noformat} to a port that is not currently in use by any other application and restart Fisheye/Crucible.

    Atlassian JIRA | 1 year ago | Gurleen Anand [Atlassian]
    java.net.BindException: Address already in use
  3. 0

    Java: Running server fails on port, that is used as client port

    Stack Overflow | 1 year ago | AdamSkywalker
    java.net.BindException: Address already in use
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    Stop/restart Jetty after running HelloWorld

    GitHub | 4 years ago | Javix
    java.net.BindException: Address already in use: JVM_Bind
  6. 0

    JVM_BIND error

    Google Groups | 4 years ago | Paras Goel
    java.net.BindException: Address already in use: JVM_Bind

  1. iridic 1 times, last 2 weeks ago
  2. linxiaolong 1 times, last 4 months ago
  3. jedcua 1 times, last 4 months ago
  4. Justin 2 times, last 4 months ago
26 unregistered visitors
Not finding the right solution?
Take a tour to get the most out of Samebug.

Tired of useless tips?

Automated exception search integrated into your IDE

Root Cause Analysis

  1. java.net.BindException

    Address already in use

    at java.net.PlainSocketImpl.socketBind()
  2. Java RT
    ServerSocket.<init>
    1. java.net.PlainSocketImpl.socketBind(Native Method)
    2. java.net.AbstractPlainSocketImpl.bind(AbstractPlainSocketImpl.java:382)
    3. java.net.ServerSocket.bind(ServerSocket.java:375)
    4. java.net.ServerSocket.<init>(ServerSocket.java:237)
    5. java.net.ServerSocket.<init>(ServerSocket.java:181)
    5 frames
  3. GWT dev
    SocketConnector.open
    1. org.eclipse.jetty.server.bio.SocketConnector.newServerSocket(SocketConnector.java:96)
    2. org.eclipse.jetty.server.bio.SocketConnector.open(SocketConnector.java:85)
    2 frames
  4. Jetty
    AbstractConnector.doStart
    1. org.eclipse.jetty.server.AbstractConnector.doStart(AbstractConnector.java:316)
    1 frame
  5. GWT dev
    SocketConnector.doStart
    1. org.eclipse.jetty.server.bio.SocketConnector.doStart(SocketConnector.java:156)
    1 frame
  6. Jetty :: Aggregate :: All Server
    Ajp13SocketConnector.doStart
    1. org.eclipse.jetty.ajp.Ajp13SocketConnector.doStart(Ajp13SocketConnector.java:56)
    1 frame
  7. Jetty
    AbstractLifeCycle.start
    1. org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:64)
    2. org.eclipse.jetty.server.Server.doStart(Server.java:291)
    3. org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:64)
    3 frames
  8. com.cenqua.fisheye
    Run.main
    1. com.cenqua.fisheye.web.WebServer.start(WebServer.java:326)
    2. com.cenqua.fisheye.ctl.Run.mainImpl(Run.java:229)
    3. com.cenqua.fisheye.ctl.Run.main(Run.java:56)
    3 frames
  9. Java RT
    Method.invoke
    1. sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    2. sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    3. sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    4. java.lang.reflect.Method.invoke(Method.java:483)
    4 frames
  10. com.cenqua.fisheye
    FishEyeCtl.main
    1. com.cenqua.fisheye.FishEyeCtl.mainImpl(FishEyeCtl.java:99)
    2. com.cenqua.fisheye.FishEyeCtl.main(FishEyeCtl.java:42)
    2 frames