Skip to main content

How to Troubleshoot a cPanel Service That Will Not Start

If a cPanel service fails to start, it can impact website availability, email delivery, or administrative access. This guide helps a Server Administrator identify the cause of a service failure and perform the necessary steps to restart the service in...

If a cPanel service fails to start, it can impact website availability, email delivery, or administrative access. This guide helps a Server Administrator identify the cause of a service failure and perform the necessary steps to restart the service in WHM.

Before you begin

You will need:

  • Root access to the server via WHM.

  • Knowledge of the specific service that is failing (e.g., httpd, exim, dovecot, or mysql).

Check the service status and logs

Before attempting to restart a service, identify the specific reason for the failure by checking the service status and the relevant error logs.

  1. Log in to WHM.

  2. In the search bar, type Command Line and select Terminal (or connect via SSH).

  3. Run the following command to check the status of a specific service (replace service_name with the actual service, such as httpd or mysql):

    systemctl status service_name

  4. If the service is "failed" or "inactive," check the system logs for specific error messages:

    journalctl -u service_name --since "1 hour"

  5. Check the specific service logs (if applicable) to identify configuration errors or resource exhaustion:

    • Apache: /usr/local/apache/logs/error_log

    • Exim: /var/log/exim_mainlog

    • MySQL/MariaDB: /var/log/mariadb/mariadb.log or /var/log/mysql/error.log

Restart the service from WHM

If the logs indicate a minor glitch or a temporary hang, you can attempt to restart the service directly from the WHM interface.

  1. Log in to WHM.

  2. In the search bar, type Restart and select Restart Service.

  3. Select the service you wish to restart from the list.

  4. Click Restart.

Troubleshoot common failure causes

If the service fails to start again after a manual restart, the issue is likely a configuration error or a resource limitation.

Configuration Errors

If the systemctl status command or the service-specific log shows a syntax error, a configuration file was likely modified incorrectly.

  • Action: Revert the last change made to the configuration file and attempt to restart the service again.

Resource Exhaustion

If the logs indicate "Out of Memory" (OOM) or "Disk Full" errors, the service cannot start because the server lacks the necessary resources.

  • Check Disk Space: Run df -h to ensure the partitions (especially / and /var) are not at 100% capacity.

  • Check Memory: Run free -m to see if the server is running out of available RAM.

Port Conflicts

If the service fails to start because a port is already in use, another process may be bound to that port.

  • Action: Use the command netstat -tulpn to identify which process is using the port required by the service.

Contact Hostek support

If you have identified the specific error in the logs but are unsure how to resolve the configuration conflict, or if the service continues to fail after a restart, contact Hostek support.

When contacting support, provide the following information:

  • The name of the service that is failing.

  • The output of the systemctl status command for that service.

  • The last 20 lines of the relevant service log.

  • The results of df -h and free -m.

Did this answer your question?