The script does not start the Tomcat web server service properly
search cancel

The script does not start the Tomcat web server service properly


Article ID: 216926


Updated On:


CA Spectrum


The script from /tomcat/webapps/spectrum/ is used to stop and restart the tomcat web server service. 

However on certain environments, when running this script, the process is started, but then it does not work properly, and causing the web server to be not accessible. 

It looks like the start command is too fast after the stop command.
In some situations when tomcat can be very busy, the stop tomcat service command will take some time to stop it, and when the start command is issued before it got fully stopped, then the restart functionality may not function properly.



Release : 20.2

Component : Spectrum OneClick


This is depending on the environment and how busy the tomcat was when we are giving the command to stop with the script. If it's doing some good amount of work then the tomcat stop may slightly get delayed and the script may be asking it to start again even if it is not stopped completely.


This can be solved by adjusting the script adding some delay between stop and start commands.

For example edit the script and add a sleep time:
sleep 10

The sleep time may vary depending on the environment.