How to start tomcat service at boot time?

Every time I restart Manjaro, I have to sudo systemctl enable tomcat and sudo systemctl start tomcat.

How can I automate this at start time?

I looked around, but mostly I did not understand, what they are talking about.

Hi @ngong,

Should do it. It might be that the service has an unmet dependency. Check why it didn’t start with:

journalctl --priority=4 --boot=-1 --unit=tomcat

Where:

  • --priority=4 will show only the warnings and errors;
  • --boot=-1 will limit the output to be for the previous boot. Feel free to adjust this as necessary: -1 for the previous boot, -2 for the one before that, and so on and so forth;
  • --unit=tomcat is the service unit’s errors you want.

Let’s see what happens there.

3 Likes

Please post output of:

systemctl cat tomcat
systemctl status --all --lines=100 --no-pager tomcat 

Just out of curiosity, which Tomcat package did you installed?

Because non of the Tomcat packages in the repository provide a tomcat.service file. They all include the version, for example tomcat8.service or tomcat9.service . Or did you created your own systemd service file for Tomcat?