Cloud Service >> Knowledgebase >> cPanel >> How To Restart Tomcat on cPanel Server?
submit query

Cut Hosting Costs! Submit Query Today!

How To Restart Tomcat on cPanel Server?

Apache Tomcat is an open-source web server used to deploy Java-based web applications. Sometimes, it’s necessary to restart Tomcat to apply changes or fix issues. If you're using a cPanel server, here’s how you can restart Tomcat:

1. Access cPanel

First, log in to your cPanel account. The URL for your cPanel login is usually https://yourdomain.com:2083 or https://yourserverIP:2083.

Enter your username and password to gain access to the cPanel dashboard.

2. Navigate to the "Service Configuration" Section

In the cPanel dashboard, find the section labeled “Service Configuration” or "Software" (the exact name may vary depending on your hosting provider).

Look for an option that says “Tomcat” or “Java”.

3. Restart Tomcat via WHM (Web Host Manager)

If your cPanel account has access to WHM, you can restart Tomcat through the following steps:

Step 1: Log in to WHM (usually https://yourserverIP:2087).

Step 2: From the left menu, search for “Tomcat” under the Services section.

Step 3: Click on “Tomcat” and then select the option to “Restart Tomcat.”

Step 4: Wait for a few moments while the service restarts. You should see a confirmation message once the process is completed.

4. Restart Tomcat via SSH (Command Line)

If you prefer using the command line, you can restart Tomcat via SSH. To do this:

Step 1: Log in to your server using SSH. Use an SSH client like PuTTY and enter your server's IP address and login credentials.

Step 2: Once logged in, run the following command to restart Tomcat:

bash

service tomcat restart

This command will stop and then start the Tomcat service again.

5. Check Tomcat Logs

After restarting Tomcat, it’s important to verify if everything is running smoothly. You can check Tomcat’s logs by navigating to the log directory on your server:

bash

cd /usr/local/tomcat/logs

Look for the catalina.out file to see if there are any errors or warnings during startup.

6. Troubleshooting

If Tomcat does not restart as expected, check the following:

Memory limits: Tomcat may fail to restart if the server runs out of memory.

Configuration errors: Verify that no configuration files (like server.xml or web.xml) are misconfigured.

Conclusion

 

Restarting Tomcat on a cPanel server is easy if you follow the right steps. You can do it through WHM, SSH, or through the cPanel interface, depending on the access and configuration available to you.

Cut Hosting Costs! Submit Query Today!

Grow With Us

Let’s talk about the future, and make it happen!