The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

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

Discussion in 'General Discussion' started by caisc, Jan 31, 2017.

  1. caisc

    caisc Well-Known Member

    Joined:
    Oct 5, 2011
    Messages:
    70
    Likes Received:
    2
    Trophy Points:
    58
    Location:
    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

    [root@server ~]# /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
    [root@server ~]#


    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
     
  2. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    37,064
    Likes Received:
    1,287
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    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.

    Thank you.
     
  3. caisc

    caisc Well-Known Member

    Joined:
    Oct 5, 2011
    Messages:
    70
    Likes Received:
    2
    Trophy Points:
    58
    Location:
    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
     
  4. caisc

    caisc Well-Known Member

    Joined:
    Oct 5, 2011
    Messages:
    70
    Likes Received:
    2
    Trophy Points:
    58
    Location:
    India
    cPanel Access Level:
    Root Administrator
    Tried to restart cpanel using command -

    # systemctl restart cpanel

    now it /bin/needs-restarting does not show cpanel service to be restarted.

    Thanks
     
    cPanelMichael likes this.
Loading...

Share This Page