How to Prevent Tomcat auto restart in the LSA App Build 7.31 virtual machine ?
Hello All,
I would like to share my experience in managing tomcat server inside the Pega LSA 7.31 Linux Lite VM used for App Build exam and in the LSA 7.3/7.4 Course. The problem is that if i need to modify the tomcat configuration and i stop tomcat this is restarted automatically.
This is due to a configuration of the tomcat in the VM, there is a daemon service called tomcat.service inside it.
I share the steps to disable the tomcat server and how to re-enable in case you need the automatism back.
- TO NOTE: I suggest this command for user who have a certain experience with Unix administration. Use it with care if you are not an expert in this area.
The following instructions tells you how to disable its auto-restart which is annoying if you need to perform some setup on the tomcat configuration, (for example delete the marker file in the temp directory). The way is: disable the tomcat service.
Hello All,
I would like to share my experience in managing tomcat server inside the Pega LSA 7.31 Linux Lite VM used for App Build exam and in the LSA 7.3/7.4 Course. The problem is that if i need to modify the tomcat configuration and i stop tomcat this is restarted automatically.
This is due to a configuration of the tomcat in the VM, there is a daemon service called tomcat.service inside it.
I share the steps to disable the tomcat server and how to re-enable in case you need the automatism back.
- TO NOTE: I suggest this command for user who have a certain experience with Unix administration. Use it with care if you are not an expert in this area.
The following instructions tells you how to disable its auto-restart which is annoying if you need to perform some setup on the tomcat configuration, (for example delete the marker file in the temp directory). The way is: disable the tomcat service.
- We need use the command systemctl that is available in the distribution of Linux lite
- To check the status of the service you can use the command service, that is available as well.
- You can use the root user or the same architect user prepending command with sudo.
- The commands to use are:
- [sudo]service tomcat status, this will give you all the information of the service, like
- Using service command you can start/stop tomcat as well, but with user architect you need to prepend with the sudo command:
- [sudo] service tomcat stop or start
- If instead you to re-enable auto-start you need to re-enable the service: tomcat.service
- To act on the service you need to run the command systemctl <cmd> service_name.service where <cmd> can be enable or disable in our case (use sudo if you are not a root user):
- [sudo]systemctl disable tomcat.service,:
- to enable it you can do with option enable: [sudo] systemctl enable tomcat.service
- When the service is enabled, when you use the script ./shutdown.sh to shutdown tomcat (on tomcat’s bin directory) the service will restart it automatically after shutdown.
Hope it helps.
Regards,
Eliseo Olla