I'm trying to run Tomcat 9 on my Raspberry Pi 3 B+ (running Raspbian) and I get this error when trying to start up:
30-Jan-2019 17:27:53.934 SEVERE [main] org.apache.catalina.util.LifecycleBase.handleSubClassException Failed to initialize component [Connector[HTTP/1.1-8080]]Note: Raspbian is a Debian OS.
21 Answer
As the logs say:
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.initServerSocket(NioEndpoint.java:236) at org.apache.tomcat.util.net.NioEndpoint.bind(NioEndpoint.java:210) at org.apache.tomcat.util.net.AbstractEndpoint.bindWithCleanup(AbstractEndpoint.java:1085) at org.apache.tomcat.util.net.AbstractEndpoint.init(AbstractEndpoint.java:1098) at org.apache.coyote.AbstractProtocol.init(AbstractProtocol.java:557) at org.apache.coyote.http11.AbstractHttp11Protocol.init(AbstractHttp11Protocol.java:74) at org.apache.catalina.connector.Connector.initInternal(Connector.java:976) ... 13 morealso:
Failed to create server shutdown socket on address [localhost] and port [8005] (base port [8005] and offset [0])which means some of the ports are occupied by another process (8080, 8005, 8009)
You can test it by:
telnet localhost 8080You can know which process occupies which port by:
netstat -tulpn 6