I've RHEL server where security team keeps on applying security patches every month and then reboot the server. I've apache tomcat installed on RHEL server and a web application (HTML/CSS/Javascript front end and Spring boot backend) running (WAR deployed). After every security patching, I notice 503 Service Unavailable on my web browser and I have to manually start the apache tomcat server (sudo bin/startup.sh) everytime. Is there a way this can be configured in RHEL server so that I don't have to manually start the server everytime after patching is done?

Spring boot has it's own embedded tomcat server which I am not using in this case since I am deploying my app as a WAR in the tomcat server installed on RHEL server.

  • can you post any of the logs showing if the service is trying to start and failing at boot? – SteamerJ Dec 19 '18 at 14:42
  • Let me see. It's going to be in catalina.out file of tomcat server, right? OR are you referring to something related to RHEL trying to start these services? Thanks – John Dec 19 '18 at 14:46
  • catalina.out would be the first place to start. Have you checked the service status to see if it tried to start at boot? service tomcat6 status or service tomcat7 status depending on your version of tomcat. – SteamerJ Dec 19 '18 at 14:49
  • I just tried doing service tomcat8 status and got the message` Redirecting to /bin/systemctl status tomcat8.service` ` Unit tomcat8.service could not be found.` – John Dec 19 '18 at 14:55
  • are you using tomcat8 or a different version? You can see my answer below as the first command dumps out all the registered services and if they're set to startup with the system or not – SteamerJ Dec 19 '18 at 14:57


It appears that there is not any service registered that is related to tomcat, which points to it likely being installed from source. You'll need to create a service script, register the script, test if starting/stopping works and then enable it to start at boot. The link above should give the information needed to perform all of these actions. Just make sure it's during an acceptable maintenance window and the current running process for tomcat is shut down.

  • I just ran the above command and I have only 7 things starting with letter t. Please see this image screenshot (i.stack.imgur.com/n11gw.png). I don't see anything starting with tomcat there. Is it the target.service you are referring to? Thanks – John Dec 19 '18 at 15:04
  • @yoonix I changed my answer based on a chat discussion we had. His comment was in reply to the old answer – SteamerJ Dec 19 '18 at 20:53

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.