Symptom:
You see the status of a given service in the WHM >> Server Status >> Service Status interface is reported as "pending".
Description:
The WHM >> Server Status >> Service Status interface will display one of the following statuses for a given service:
- up — The service is running or operational.
- down — The service is not running or non-operational.
- pending — The system is waiting to determine the status of the service.
The pending status indicates that the system has temporarily suspended monitoring for the service. The system uses this status during service restarts or installations. So if you have just recently restarted the server, installed cPanel or ran an update you might see the pending status for one or a few of the services.
https://docs.cpanel.net/whm/server-status/service-status/
Workaround:
You simply need to wait until the next time tailwatchd runs and the status of the service should automatically update to either up or down depending on the actual status of the service.
You can run the following command to see the status of the service and also check all the most important properties of the service to confirm its actual state: (Here I run this command for httpd but you can run this for any service)
/usr/bin/systemctl show -p LoadState -p FragmentPath -p ActiveState -p MainPID -p SubState -p PIDFile -p UnitFileState -p Type -p CanStart -p ExecMainCode -p ExecMainStatus httpd.service
Type=forking
PIDFile=/run/apache2/httpd.pid
MainPID=20629
ExecMainCode=0
ExecMainStatus=0
LoadState=loaded
ActiveState=active
SubState=running
FragmentPath=/usr/lib/systemd/system/httpd.service
UnitFileState=enabled
CanStart=yes
As you can see, according to systemd the service is active and it's currently running.
Additionally, you need to run the following command to see what cPanel API is reporting about the status of the service:
whmapi1 servicestatus | grep -Ei httpd -A 4
display_name: httpd
enabled: 1
installed: 1
monitored: 1
name: httpd
running: 1
If both of the above commands are reporting the service as active, running, and monitored then you can safely ignore the "pending" service status in WHM >> Server Status >> Service Status interface, and if you wait for an appropriate amount of time the service status would update automatically and the "pending" stats will disappear.