Bamboo fails to start - java.net.BindException Address already in use
Platform Notice: Data Center - This article applies to Atlassian products on the Data Center platform.
Note that this knowledge base article was created for the Data Center version of the product. Data Center knowledge base articles for non-Data Center-specific features may also work for Server versions of the product, however they have not been tested. Support for Server* products ended on February 15th 2024. If you are running a Server product, you can visit the Atlassian Server end of support announcement to review your migration options.
*Except Fisheye and Crucible
Platform Notice: Data Center - This article applies to Atlassian products on the Data Center platform.
Note that this knowledge base article was created for the Data Center version of the product. Data Center knowledge base articles for non-Data Center-specific features may also work for Server versions of the product, however they have not been tested. Support for Server* products ended on February 15th 2024. If you are running a Server product, you can visit the Atlassian Server end of support announcement to review your migration options.
*Except Fisheye and Crucible
Summary
The Bamboo application fails to start, and you can see the 'java.net.BindException Address already in use' error while starting.
Diagnosis
The following error appears in the <BAMBOO_INSTALL_DIR>/logs/catalina.out
file while you start Bamboo.
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 by another application running on the same port or a failed shutdown of Bamboo that has left the port open.
Solution
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 runs 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>,
If this is not showing any processes try to run the commandnetstat -an | grep 8085
to check which application is using it.
If the above error persists after performing the above steps
Please check whether another HTTP Connector is configured to use the same port in the <BAMBOO_INSTALL_DIR>/conf/server.xml
and remove the unnecessary connector.