Flash Sale:75% Off Hosting + Free DomainEnds in13h47m14sView Plans
Hostvento logoHostvento

How to restart Tomcat on a cPanel server

This guide shows you how to restart Apache Tomcat on a server that uses cPanel. It needs root access, so it is for VPS and dedicated server customers.

cPanel2 min read9 steps

What is Tomcat?

Tomcat is a small program that runs websites written in Java. Apache, the usual web server, cannot run Java pages by itself. Tomcat does that job next to it.

Root is the main administrator account on a server. It can change everything. Be careful when you use it.

When should you restart Tomcat?

  • Your Java site shows an error page or does not load.
  • You changed a Tomcat setting and it must be read again.
  • You installed a new Java application and it does not appear.
Warning: A restart stops your Java sites for a few seconds. Visitors may see an error during that time. Restart when the site is quiet. Take a backup first if you changed any files.

Steps

  1. Log in to your server over SSH as root. SSH is a safe way to type commands on a remote server. Your server details are in your welcome email.
  2. Run this command to restart Tomcat.
/scripts/restartsrv_tomcat

This cPanel script stops Tomcat and starts it again.

  1. Check that Tomcat is running again with this command.
/scripts/restartsrv_tomcat --status

It prints a short message that says whether the service is up.

  1. Open your Java website in a browser and see if it loads.

Restart from WHM

WHM is the control panel for the server owner. You can also restart services there.

  1. Log in to WHM as root.
  2. Use the search box at the top left and type Restart.
  3. Open Restart Services.
  4. Find Tomcat in the list. If you do not see it, Tomcat is not installed through cPanel on your server.
  5. Click the restart link next to it and confirm.
Tip: Newer cPanel versions have dropped built-in Tomcat support. Older servers still have it, and the steps are similar. If the script is missing, ask Hostvento support how Tomcat is set up on your server.

If it still does not work

Look at the Tomcat log files. They are often in the logs folder inside the Tomcat folder. The last lines usually name the problem. If you cannot fix it, open a support ticket and paste the log lines.

Quick recap

  • Tomcat runs Java websites on your server.
  • You need root access to restart it.
  • Run /scripts/restartsrv_tomcat over SSH, or use Restart Services in WHM.
  • Restarting causes a short pause, so pick a quiet time.
  • Ask support if the command or the Tomcat entry is missing.