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, ormysql).
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.
Log in to WHM.
In the search bar, type Command Line and select Terminal (or connect via SSH).
Run the following command to check the status of a specific service (replace
service_namewith the actual service, such ashttpdormysql):systemctl status service_name
If the service is "failed" or "inactive," check the system logs for specific error messages:
journalctl -u service_name --since "1 hour"
Check the specific service logs (if applicable) to identify configuration errors or resource exhaustion:
Apache:
/usr/local/apache/logs/error_logExim:
/var/log/exim_mainlogMySQL/MariaDB:
/var/log/mariadb/mariadb.logor/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.
Log in to WHM.
In the search bar, type Restart and select Restart Service.
Select the service you wish to restart from the list.
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 -hto ensure the partitions (especially/and/var) are not at 100% capacity.Check Memory: Run
free -mto 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 -tulpnto 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 statuscommand for that service.The last 20 lines of the relevant service log.
The results of
df -handfree -m.
