Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

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 Can't restart cpsrvd

Discussion in 'General Discussion' started by Michael-Inet, Feb 14, 2018.

  1. Michael-Inet

    Michael-Inet Well-Known Member

    Joined:
    Feb 20, 2014
    Messages:
    46
    Likes Received:
    2
    Trophy Points:
    8
    Location:
    Austin, TX, USA
    cPanel Access Level:
    Root Administrator
    Can't restart cpsrvd (on VPS, CENTOS 6.9 virtuozzo v68.0.29).

    Code:
    New Security Advisor notifications with High importance
    Detected 1 process that is running outdated executables: 16076 You must take one of the following actions to ensure the system is up-to-date:
    Solutions in this thread don't work:

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

    Code:
    root@srv04 [~]# /scripts/restartsrv_cpsrvd
    Waiting for "cpsrvd" to restart gracefully ??waiting for "cpsrvd" to initialize ???finished.
    
    Service Status
            cpanel (cpsrvd (SSL) - dormant mode - accepting connections) is running as root with PID 16076 (pidfile+/proc check method).
    
    Startup Log
            License is valid and has already updated recently.
            Starting PID 16076: /usr/local/cpanel/libexec/cpsrvd-dormant
    
    cpsrvd restarted successfully.
    
    root@srv04 [~]# /bin/needs-restarting
    -bash: /bin/needs-restarting: No such file or directory
    
    root@srv04 [~]# systemctl restart cpanel
    -bash: systemctl: command not found
    

    WHM » Security Center » Security Advisor
    Code:
    Detected 1 process that is running outdated executables: 16076
    
      You must take one of the following actions to ensure the system is up-to-date:
    
        Restart the listed process.
        Reboot the server.
    
    Restart the listed process has no link.

    # # #

    Okay, what do?
     
  2. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    43,247
    Likes Received:
    1,759
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Hello,

    Can you let us know the output from the "/scripts/find_outdated_services" command on this system?

    Thank you.
     
  3. Michael-Inet

    Michael-Inet Well-Known Member

    Joined:
    Feb 20, 2014
    Messages:
    46
    Likes Received:
    2
    Trophy Points:
    8
    Location:
    Austin, TX, USA
    cPanel Access Level:
    Root Administrator
    Hi Michael,

    Sure!

    Code:
    root@srv04 [~]# /scripts/find_outdated_services
    Looking for outdated services …
    The system did not find any outdated services.
    
    So, there aren't any? Uhm, well, maybe there are? I re-scaned in WHM's cPanel Security Advisor.

    Code:
    Start Time: Wed Feb 14 2018 20:27:15 GMT-0600 (CST)
    Version: 1.04
    Finish Time: Wed Feb 14 2018 20:27:28 GMT-0600 (CST)
    
    ...
    Detected 1 process that is running outdated executables: 16076
    ...
    
    And if I'm reading ps right, it's been running since Jan30?

    Code:
    root@srv04 [~]# ps -p 16076 -o pid,vsz=MEMORY -o user,group=GROUP -o comm,args=ARGS
      PID MEMORY USER     GROUP    COMMAND         ARGS
    16076  25848 root     root     cpsrvd (SSL) -  cpsrvd (SSL) - dormant mode - accepting connections
    
    root@srv04 [~]# ps -p 16076 -F
    UID        PID  PPID  C    SZ   RSS PSR STIME TTY          TIME CMD
    root     16076     1  0 25334 24476   2 Jan30 ?        00:06:13 cpsrvd (SSL) - waiting for connections
    
    What I found odd originally is that the PID stayed the same when running restartsrv_cpsrvd, but then I don't know enough about cPanel to know if that's normal.

    I'd rather be able to re-start this, as I can't really reboot except around 2am Sat or Sun.

    Anything else you want me to look at?

    Best,
    Michael
     
  4. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    43,247
    Likes Received:
    1,759
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Hello,

    Can you try killing that process and then restarting cPanel again? EX:

    Code:
    kill -9 16076
    /scripts/restartsrv_cpsrvd
    Let us know if that helps.

    Thank you.
     
  5. Michael-Inet

    Michael-Inet Well-Known Member

    Joined:
    Feb 20, 2014
    Messages:
    46
    Likes Received:
    2
    Trophy Points:
    8
    Location:
    Austin, TX, USA
    cPanel Access Level:
    Root Administrator
    That did it! Now doesn't show up in cPanel Security Advisor and the PID changed too :)

    Thanks Michael!

    Best,
    Michael

    PS: Since the prior thread is Google's favorite, would you add the kill as a last resort to it? And maybe a "pgrep -l cpsrvd" so they know they have the correct PID to kill? Thanks tons, m..

    Code:
    root@srv04 [~]# kill -9 16076
    
    root@srv04 [~]# ps -p 16076 -F
    UID        PID  PPID  C    SZ   RSS PSR STIME TTY          TIME CMD
    
    root@srv04 [~]# /scripts/restartsrv_cpsrvd
    Waiting for “cpsrvd” to start ……waiting for “cpsrvd” to initialize ………finished.
    
    Service Status
            cpanel (cpsrvd (SSL) - dormant mode - accepting connections) is running as root with PID 397 (pidfile+/proc check method).
    
    Startup Log
            Starting PID 397: /usr/local/cpanel/libexec/cpsrvd-dormant
            License is valid and has already updated recently.
    
    cpsrvd started successfully.
    
    root@srv04 [~]# pgrep -l cpsrvd
    397 cpsrvd (SSL) -
    
     
    #5 Michael-Inet, Feb 15, 2018
    Last edited: Feb 15, 2018
  6. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    43,247
    Likes Received:
    1,759
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Hello,

    I'm glad to see that helped. I've updated the response in the linked thread as well.

    Thanks!
     
  7. Michael-Inet

    Michael-Inet Well-Known Member

    Joined:
    Feb 20, 2014
    Messages:
    46
    Likes Received:
    2
    Trophy Points:
    8
    Location:
    Austin, TX, USA
    cPanel Access Level:
    Root Administrator
    Follow up.

    cpsrvd not restarting did this same thing on another server of mine (dedicated, not vps). Which seems odd, hence the follow up.

    If it's random chance, no biggie, but if multiple people are having the issue, should I file a bug?

    Code that 'fixed' it below.

    Best,
    Michael

    Edit: PID 3548 is the PID in the email stating an outdated executable. Didn't really need to pgrep that ;)

    Code:
    root@srv01 [~]# ll /bin/needs-restarting
    ls: cannot access /bin/needs-restarting: No such file or directory
    
    root@srv01 [~]# pgrep cpsrvd
    3548
    
    root@srv01 [~]# ps -p 3548 -F
    UID        PID  PPID  C    SZ   RSS PSR STIME TTY          TIME CMD
    root      3548     1  0 25269 24424   6 Feb19 ?        00:01:26 cpsrvd (SSL) - waiting for connections
    
    root@srv01 [~]# /scripts/find_outdated_services
    Looking for outdated services …
    The system did not find any outdated services.
    
    root@srv01 [~]# /scripts/restartsrv_cpsrvd
    Waiting for “cpsrvd” to restart gracefully ……failed.
    
    Waiting for “cpsrvd” to restart ………waiting for “cpsrvd” to initialize ………finished.
    
    Service Status
            cpanel (cpsrvd (SSL) - dormant mode - accepting connections) is running as root with PID 24768 (pidfile+/proc check method).
    
    Startup Log
            License is valid and has already updated recently.
            Starting PID 24768: /usr/local/cpanel/libexec/cpsrvd-dormant
    
    cpsrvd restarted successfully.
    
    root@srv01 [~]# ps -p 3548 -F
    UID        PID  PPID  C    SZ   RSS PSR STIME TTY          TIME CMD
    
    root@srv01 [~]# ps -p 24768 -F
    UID        PID  PPID  C    SZ   RSS PSR STIME TTY          TIME CMD
    root     24768     1  0 49482 24504   1 09:22 ?        00:00:00 cpsrvd (SSL) - waiting for connections
    
    
     
  8. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    43,247
    Likes Received:
    1,759
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Hello,

    Feel free to open a support ticket using the link in my signature if you'd like us to take a closer look to rule out any issues with the product.

    Thank you.
     
Loading...

Share This Page