This was a fun little error. I will share in case anyone else comes across this.
Upon restarting cPanel, I would see the following error:
Starting cPanel ssl services: [FAILED]
and in /var/log/messages:
Error binding pop3s to 0.0.0.0:995
bind: Address already in use (98)
I checked the usual fix, /etc/xinetd.d/, made sure there were no port conflicts. Tried again, same error.
After
ps aux | grep stunnel
I notice my processes are still many days old (i.e. they are not getting killed).
After digging, I find the script responsible for stopping stunnel:
/usr/local/cpanel/etc/init/stopstunnel
pico stopstunnel
shows:
#!/usr/bin/perl
killstunnel();
sub killstunnel {
system("/scripts/ckillall -9 stunnel");
system("/scripts/ckillall -9 stunnel-3.22local");
system("/scripts/ckillall -9 stunnel-4.00local");
system("/scripts/ckillall -9 stunnel-4.02local");
system("/scripts/ckillall -9 stunnel-4.04local");
system("/scripts/ckillall -9 stunnel-4.05local");
}
but I'm running stunnel version 4.15!
added:
system("/scripts/ckillall -9 stunnel-4.15local");
Make sure to chattr your stopstunnel or cPanel will overwrite this each time you upcp.
chattr +i /usr/local/cpanel/etc/init/stopstunnel
Good to go.
Happy hunting.
Upon restarting cPanel, I would see the following error:
Starting cPanel ssl services: [FAILED]
and in /var/log/messages:
Error binding pop3s to 0.0.0.0:995
bind: Address already in use (98)
I checked the usual fix, /etc/xinetd.d/, made sure there were no port conflicts. Tried again, same error.
After
ps aux | grep stunnel
I notice my processes are still many days old (i.e. they are not getting killed).
After digging, I find the script responsible for stopping stunnel:
/usr/local/cpanel/etc/init/stopstunnel
pico stopstunnel
shows:
#!/usr/bin/perl
killstunnel();
sub killstunnel {
system("/scripts/ckillall -9 stunnel");
system("/scripts/ckillall -9 stunnel-3.22local");
system("/scripts/ckillall -9 stunnel-4.00local");
system("/scripts/ckillall -9 stunnel-4.02local");
system("/scripts/ckillall -9 stunnel-4.04local");
system("/scripts/ckillall -9 stunnel-4.05local");
}
but I'm running stunnel version 4.15!
added:
system("/scripts/ckillall -9 stunnel-4.15local");
Make sure to chattr your stopstunnel or cPanel will overwrite this each time you upcp.
chattr +i /usr/local/cpanel/etc/init/stopstunnel
Good to go.
Happy hunting.
Last edited: