Skip to main content

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

Comments

6 comments

  • cPanelLauren
    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.
    0
  • shaun
    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. [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"
    0
  • cPanelLauren
    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!
    0
  • Brian N
    Hey! So it's three years later and this is still an issue. :confused:
    0
  • cPRex Jurassic Moderator
    @Brian N - I reached out to our team about this issue just now. The short story is that fixing this issue would require a complete reconfiguration of how cPanel integrates with systemd, and it's just not something our team plans to do at this time. It's also important to note that this thread is the only complaint we've received on this issue so far. The good news, is that as cPanel changes and the systemd integration gets improved, this will likely get fixed as a byproduct of that work. At this time, however, the developers aren't able to specifically fix just this one issue.
    0
  • Kenric Ashe

    Two more years later and it's still not fixed. Perhaps there is only this one thread because additional threads are not required. People find this one and maybe they just give up. Or they never even search for this issue because they're not diligent about maintaining their servers and not aware of it. But it's really annoying to see State: degraded in the output every time I run systemctl status, and false alarms distract from legit issues which should be more visible.

    0

Please sign in to leave a comment.