Bamboo fails to start - java.net.BindException Address already in use
Problem
Bamboo fails to start. The following appears in the catalina.out
log:
16-Feb-2017 13:01:54.716 SEVERE [main] org.apache.coyote.AbstractProtocol.init Failed to initialize end point associated with ProtocolHandler ["http-nio-8085"]
java.net.BindException: Address already in use
at sun.nio.ch.Net.bind0(Native Method)
at sun.nio.ch.Net.bind(Net.java:433)
at sun.nio.ch.Net.bind(Net.java:425)
at sun.nio.ch.ServerSocketChannelImpl.bind(ServerSocketChannelImpl.java:223)
at sun.nio.ch.ServerSocketAdaptor.bind(ServerSocketAdaptor.java:74)
at org.apache.tomcat.util.net.NioEndpoint.bind(NioEndpoint.java:351)
at org.apache.tomcat.util.net.AbstractEndpoint.init(AbstractEndpoint.java:748)
at org.apache.coyote.AbstractProtocol.init(AbstractProtocol.java:459)
at org.apache.coyote.http11.AbstractHttp11JsseProtocol.init(AbstractHttp11JsseProtocol.java:120)
at org.apache.catalina.connector.Connector.initInternal(Connector.java:960)
at org.apache.catalina.util.LifecycleBase.init(LifecycleBase.java:102)
at org.apache.catalina.core.StandardService.initInternal(StandardService.java:568)
at org.apache.catalina.util.LifecycleBase.init(LifecycleBase.java:102)
at org.apache.catalina.core.StandardServer.initInternal(StandardServer.java:869)
at org.apache.catalina.util.LifecycleBase.init(LifecycleBase.java:102)
at org.apache.catalina.startup.Catalina.load(Catalina.java:580)
at org.apache.catalina.startup.Catalina.load(Catalina.java:603)
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:498)
at org.apache.catalina.startup.Bootstrap.load(Bootstrap.java:310)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:484)
Cause
The port Bamboo is attempting to use is already in use. This can be caused either by another application running on the port or failed shutdown of Bamboo that has left the port open.
Resolution
If this is your first time running Bamboo or you have recently added applications or made changes to the system, investigate what's running on the target port.
If Bamboo was not shut down properly, you can restart the machine or kill the process:
On Windows
1. Hit Ctrl-alt-delete and look at open programs. Look for
java.exe
.
2. From a command window, runnetstat -an
. Check which ports are in use. You can identify which application is running this way, then close it from the Task Manager.On Linux
Run:
ps -aux | grep java
. This will show the java processes running and their process ids. You can kill a process with the command:kill -9 <pid>