SOLVED Manually start services shown by /bin/needs-restarting

caisc

Well-Known Member
Oct 5, 2011
73
2
58
India
cPanel Access Level
Root Administrator
New Security Advisor notifications with High importance

Detected processes that are running outdated binary executables. Reboot the system in the “Graceful Server Reboot” area. Alternatively, SSH into this server and run ‘/bin/needs-restarting’, then manually restart each of the listed processes.

Executed command - /bin/needs-restarting got following output

[[email protected] ~]# /bin/needs-restarting
794 : /usr/sbin/NetworkManager --no-daemon
1641 : cpsrvd (SSL) - waiting f --llu=1485846438 --listen=10,11,12,4,5,6,7,8,9 --accepted=13
[[email protected] ~]#


Now can anyone tell me the command to manually restart these 2 listed services -
794 : /usr/sbin/NetworkManager --no-daemon
1641 : cpsrvd (SSL)

cant reboot server, for obvious reasons.

Thanks
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,910
2,215
363
Hello,

The following commands are used to restart these services:

Code:
/bin/systemctl restart  NetworkManager.service
/scripts/restartsrv_cpsrvd
Keep in mind that NetworkManager is not a service provided with cPanel, so you should exercise caution before restarting it. Additionally, check to verify that the cpsrvd process isn't hanging (the date should update after you restart cpsrvd). EX:

Code:
ps aux|grep cpsrvd
If it is hanging, try manually killing the process and restarting cpsrvd again:

Code:
kill -9 $PID
/scripts/restartsrv_cpsrvd
Thank you.
 

caisc

Well-Known Member
Oct 5, 2011
73
2
58
India
cPanel Access Level
Root Administrator
I ran both commands and restarted successfully both services -

/bin/systemctl restart NetworkManager.service
/scripts/restartsrv_cpsrvd

after that checked with - /bin/needs-restarting

Still it shows me -
1641 : cpsrvd (SSL) - waiting f --llu=1485846438 --listen=10,11,12,4,5,6,7,8,9 --accepted=13

Although when I run command /scripts/restartsrv_cpsrvd it says -

root [/]# /scripts/restartsrv_cpsrvd
Waiting for “cpsrvd” to restart gracefully ……waiting for “cpsrvd” to initialize ………finished.

Service Status
cpanel (cpsrvd (SSL) - dormant mode - accepting --llu=1485846438 --listen=10,11,12,4,5,6,7,8,9) is running as root with PID 1641 (systemd check method).
cpanel (whostmgrd - serving 117. --llu=1485846438 --listen=10,11,12,4,5,6,7,8,9 --accepted=13) is running as root with PID 267180 (systemd check method).
cpanel (/usr/local/cpanel/3rdparty/bin/perl /usr/local/cpanel/whostmgr/docroot/cgi/configserver/cse.cgi) is running as root with PID 268724 (systemd check method).
cpanel (/scripts/restartsrv_cpsrvd) is running as root with PID 268725 (systemd check method).

Startup Log
Jan 31 22:03:21 server.hostname.com crontab[995078]: (root) REPLACE (root)
Jan 31 22:03:25 server.hostname.com crontab[995202]: (root) LIST (mailman)
Jan 31 22:03:35 server.hostname.com crontab[995475]: (root) LIST (root)
Jan 31 22:03:35 server.hostname.com crontab[995476]: (root) REPLACE (root)
Jan 31 22:05:30 server.hostname.com crontab[997479]: (root) LIST (root)
Jan 31 22:05:30 server.hostname.com crontab[997481]: (root) REPLACE (root)
Jan 31 22:07:45 server.hostname.com crontab[999647]: (root) LIST (root)
Jan 31 22:08:34 server.hostname.com crontab[1002780]: (root) LIST (root)
Jan 31 22:10:23 server.hostname.com crontab[1004834]: (root) LIST (root)
Jan 31 22:10:23 server.hostname.com crontab[1004837]: (root) LIST (root)

cpsrvd restarted successfully.
root [/]# _

why cpsrvd is still showing to be restarted?

Thanks