Bamboo fails to start - java.net.BindException Address already in use
要約
The Bamboo application fails to start, and you can see the 'java.net.BindException Address already in use' error while starting.
診断
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)
原因
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.
ソリューション
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:
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.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.