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!

In Progress [CPANEL-25364] Disabled services show failed by systemd on boot

Discussion in 'General Discussion' started by shaun, Jan 28, 2019.

  1. shaun

    shaun Well-Known Member Verifed Vendor PartnerNOC

    Joined:
    Nov 9, 2001
    Messages:
    708
    Likes Received:
    1
    Trophy Points:
    318
    Location:
    San Clemente, Ca
    cPanel Access Level:
    DataCenter Provider
    Twitter:
    CentOS Linux release 7.6.1810 (Core)
    cPanel 76.0 (build 18)

    On boot systemd will show the following

    [FAILED] Failed to start cPanel Greylisting Daemon.
    See 'systemctl status cpgreylistd.service' for details.
    [FAILED] Failed to start FPM service for cPanel Daemons.
    See 'systemctl status cpanel_php_fpm.service' for details.

    Both of those services are disabled in the WHM and systemd by default.

    /etc/systemd/system/cpanel.service has a "Wants" asking for cpanel_php_fpm.service and cpgreylistd.service so on boot systemd is attempting to start those services. Since both of those services are set to disabled in the WHM they will return a disabled message and a exit code that will cause systemd to show failed.

    Solution, Remove cpanel_php_fpm.service and cpgreylistd.service from the "Wants" in cpanel.service. These two services should be controlled by systemd and enabled/disabled in systemd when the admin wants to use or not use the service.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  2. cPanelLauren

    cPanelLauren Forums Analyst II Staff Member

    Joined:
    Nov 14, 2017
    Messages:
    6,161
    Likes Received:
    474
    Trophy Points:
    233
    Location:
    Houston
    cPanel Access Level:
    DataCenter Provider
    Hi @shaun


    While I do see that you've resolved this I am curious to know, how did you disable these services initially? If you had disabled them in WHM this should not be occurring.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  3. shaun

    shaun Well-Known Member Verifed Vendor PartnerNOC

    Joined:
    Nov 9, 2001
    Messages:
    708
    Likes Received:
    1
    Trophy Points:
    318
    Location:
    San Clemente, Ca
    cPanel Access Level:
    DataCenter Provider
    Twitter:
    On a new cPanel install both of those services are disabled by default within systemd and in the service manager. The issue is that /etc/systemd/system/cpanel.service has a "Wants" for both of those services which causes systemd to attempt to start them when the cpanel service starts. I've pasted the contents of /etc/systemd/system/cpanel.service below so you can see what i'm referring to.

    Code:
    [Unit]
    Description=cPanel services
    After=network.target network-online.target
    Wants=cpanelquotaonboot.service cpanellogd.service cpdavd.service cpanel_php_fpm.service cpgreylistd.service cphulkd.service dnsadmin.service mailman.service p0f.service smtpmailgidonly.service queueprocd.service tailwatchd.service network-online.target
    ConditionPathExists=!/etc/cpsrvddisable
    
    [Service]
    Type=forking
    PIDFile=/var/run/cpsrvd.pid
    ExecStart=/usr/local/cpanel/scripts/restartsrv_cpsrvd --no-verbose --notconfigured-ok
    ExecStop=/usr/local/cpanel/scripts/restartsrv_cpsrvd --no-verbose --stop --notconfigured-ok
    KillMode=process
    TimeoutStopSec=10
    
    [Install]
    WantedBy=multi-user.target
    This service file should probably be re-evaluated. It's asking for services like cphulkd, mailman, p0f, smtpmailgidonly and a few others that are not needed to actually run cpsrvd. I was going to start another thread about mailman but since cpanel.service is also asking for mailman it's also attempted to be started and if there are no mailing lists present the service again will show failed.

    Some of these "Wants" should probably be moved into "After"
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  4. cPanelLauren

    cPanelLauren Forums Analyst II Staff Member

    Joined:
    Nov 14, 2017
    Messages:
    6,161
    Likes Received:
    474
    Trophy Points:
    233
    Location:
    Houston
    cPanel Access Level:
    DataCenter Provider
    Hi @shaun


    That's a great point, I'm able to replicate the behavior as well. Thanks for following up! As a result of this, I've opened CPANEL-25364 - Disabled services show as failed to start on boot


    I'll let you know the status of this case as soon as I have more information on it or any updates.


    Thanks!
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
Loading...

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice