I am having trouble setting up Tomcat 8 on my Pi 3, running Raspbian. I've installed Java 8 and Tomcat 8 but it refuses to start up.

I started by ensuring Java 8 was installed.

pi@raspberrypi:~$ java -version
java version "1.8.0_65"
Java(TM) SE Runtime Environment (build 1.8.0_65-b17)
Java HotSpot(TM) Client VM (build 25.65-b01, mixed mode)

Then I installed Tomcat via:

apt-get install tomcat8

This has installed it in /etc/tomcat8:

pi@raspberrypi:/etc/tomcat8$ ls
Catalina  catalina.properties  context.xml  logging.properties  policy.d  server.xml  tomcat-users.xml  web.xml

I set JAVA_HOME in bashrc and verified with an echo:

pi@raspberrypi:~ $ echo $JAVA_HOME

Then I also made sure it was set in /etc/default/tomcat8:


However, when I try to start my Tomcat server, I get the following error:

pi@raspberrypi:~ $ sudo systemctl start tomcat8
Job for tomcat8.service failed. See 'systemctl status tomcat8.service' and 'journalctl -xn' for details.

The contents of tomcat8.service is as follows:

pi@raspberrypi:~ $ systemctl status tomcat8.service
● tomcat8.service - LSB: Start Tomcat.
Loaded: loaded (/etc/init.d/tomcat8)
Active: failed (Result: exit-code) since Sun 2017-08-20 16:03:21 UTC; 1min 28s ago
Process: 1267 ExecStart=/etc/init.d/tomcat8 start (code=exited, status=2)

Could anyone tell me what I'm missing please?


I ran through your setup steps using my RPi 3 Model B, running PIXEL via Raspbian.

Once you've installed tomcat8, systemctl needs to be made aware of the change:

sudo systemctl daemon-reload

Then, running:

sudo systemctl start tomcat8

should work, I'd hope.

  • Answering old questions is absolutely fine and much better than leaving comments on them. Welcome aboard! – terdon Mar 23 '18 at 9:55

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.