1

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.

2

1 Answer 1

1

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 more

also:

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 8080

You can know which process occupies which port by:

netstat -tulpn
6
  • Connection refused after using telnet.
    – liaquore
    Jan 30, 2019 at 8:15
  • Please also check for ports 8005 and 8009 (as seen from the logs) Jan 30, 2019 at 8:16
  • Connection refused on both, and according to netstat nothing in the 8000s is being used,
    – liaquore
    Jan 30, 2019 at 8:18
  • Ports are network-card specific, I hope you have only one network interface. Jan 30, 2019 at 8:19
  • I'm using a Raspberry Pi, so I assume I would only have one.
    – liaquore
    Jan 30, 2019 at 8:20

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .