Stunnel stuck on "failed" after cPanel discontinued support

hello-electro

Member
Aug 9, 2016
17
1
3
Maryland
cPanel Access Level
Root Administrator
Hello. I am having an issue where I can not get the stunnel service to stop/start or enable/disable. Anytime I run the following status checks i get:

Code:
[[email protected] ~]# systemctl status stunnel
● stunnel.service - cPanel ssl services
   Loaded: loaded (/etc/systemd/system/stunnel.service; disabled; vendor preset: disabled)
   Active: failed (Result: exit-code) since Tue 2016-08-09 16:09:46 EDT; 1h 2min ago

Aug 09 16:09:46 cloud.XXX.co systemd[1]: Starting cPanel ssl services...
Aug 09 16:09:46 cloud.XXX.co systemd[1]: stunnel.service: control process exited, code=exited status=203
Aug 09 16:09:46 cloud.XXX.co systemd[1]: Failed to start cPanel ssl services.
Aug 09 16:09:46 cloud.XXX.co systemd[1]: Unit stunnel.service entered failed state.
Aug 09 16:09:46 cloud.XXX.co systemd[1]: stunnel.service failed.
Because I can't stop the service it just sits as failed, so i am always showing a degraded service:

Code:
[[email protected] ~]# systemctl status
● cloud.XXX.co
    State: degraded
     Jobs: 0 queued
   Failed: 1 units
    Since: Tue 2016-08-09 02:56:53 EDT; 12h ago
If I look at the journal records I see this:

Code:
[[email protected] ~]# journalctl -a | grep stunnel
Aug 09 02:57:01 cloud.XXX.co systemd[1248]: Failed at step EXEC spawning /usr/local/cpanel/startstunnel: No such file or directory
Aug 09 02:57:01 cloud.XXX.co systemd[1]: stunnel.service: control process exited, code=exited status=203
Aug 09 02:57:01 cloud.XXX.co systemd[1]: Unit stunnel.service entered failed state.
Aug 09 02:57:01 cloud.XXX.co systemd[1]: stunnel.service failed.
When I explored the referenced stunnel.service file I noticed it is referencing the removed cPanel directories mentioned in your release notes about stopping support for stunnel.

Code:
[[email protected] ~]# cat /etc/systemd/system/stunnel.service
[Unit]
Description=cPanel ssl services
PartOf=cpanel.service
After=cpanel.service
ConditionPathExists=/var/cpanel/cpanel.config
# this is used by a DNS only server and should not block on /var/cpanel/dnsonly #

[Service]
Type=forking
ExecStart=/usr/local/cpanel/startstunnel

[Install]
WantedBy=multi-user.target
I am assuming that this file is causing stunnel to fail because there is now no directives to start within cpanel files. I am unsure how to fix this issue so that I can just properly disable stunnel. I have tried everything from various start/stop/restart commands, to disable and have since restarted all services. Any advice on this would be much appreciated. Thank you so much!

OS and CP versions:
CENTOS 7.2 x86_64
WHM 58.0 (build 17) autoupdating to 58.0.19 tonight.

XXX = intentional domain redaction
 
Last edited by a moderator:

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,913
2,203
363
Hello,

The stunnel service is disabled in cPanel 58, however the remaining configuration files associated with this service are removed in cPanel version 60. Here's the output on a test system running cPanel 60:

Code:
# ls  /etc/systemd/system/stunnel.service
ls: cannot access /etc/systemd/system/stunnel.service: No such file or directory
Thank you.