• Our team is looking to connect with folks who use email services provided by Plesk, or a premium service. If you'd like to be part of the discovery process and share your experiences, we invite you to complete this short screening survey. If your responses match the persona we are looking for, you'll receive a link to schedule a call at your convenience. We look forward to hearing from you!
  • We are looking for U.S.-based freelancer or agency working with SEO or WordPress for a quick 30-min interviews to gather feedback on XOVI, a successful German SEO tool we’re looking to launch in the U.S.
    If you qualify and participate, you’ll receive a $30 Amazon gift card as a thank-you. Please apply here. Thanks for helping shape a better SEO product for agencies!
  • The BIND DNS server has already been deprecated and removed from Plesk for Windows.
    If a Plesk for Windows server is still using BIND, the upgrade to Plesk Obsidian 18.0.70 will be unavailable until the administrator switches the DNS server to Microsoft DNS. We strongly recommend transitioning to Microsoft DNS within the next 6 weeks, before the Plesk 18.0.70 release.
  • The Horde component is removed from Plesk Installer. We recommend switching to another webmail software supported in Plesk.

Restarting sw-cp-server never works

danami

Silver Pleskian
For a while now I've noticed that on Plesk 12 the sw-cp-server init scripts can never restart the sw-cp-server properly. I have to manually kill the master process then restart it:

Code:
# /etc/init.d/sw-cp-server restart
Stopping sw-cp-serverd:  [FAILED]
Starting sw-cp-serverd: nginx: [emerg] bind() to 0.0.0.0:6308 failed (98: Address already in use)
nginx: [emerg] bind() to 0.0.0.0:8443 failed (98: Address already in use)
nginx: [emerg] bind() to 0.0.0.0:8880 failed (98: Address already in use)
nginx: [emerg] bind() to 0.0.0.0:6308 failed (98: Address already in use)
nginx: [emerg] bind() to 0.0.0.0:8443 failed (98: Address already in use)
nginx: [emerg] bind() to 0.0.0.0:8880 failed (98: Address already in use)
nginx: [emerg] bind() to 0.0.0.0:6308 failed (98: Address already in use)
nginx: [emerg] bind() to 0.0.0.0:8443 failed (98: Address already in use)
nginx: [emerg] bind() to 0.0.0.0:8880 failed (98: Address already in use)
^C
# ps aux | grep sw-cp-server
root  13376  0.0  0.0  45424  1532 ?  Ss  2014  0:00 sw-cp-server: master process /usr/sbin/sw-cp-serverd -c /etc/sw-cp-server/config
503  13377  0.0  0.0  46468  4108 ?  S  2014  0:00 sw-cp-server: worker process
root  13615  0.0  0.0 103244  840 pts/0  S+  11:51  0:00 grep sw-cp-server
# kill 13376 13377
# /etc/init.d/sw-cp-server restart
Stopping sw-cp-serverd:  [FAILED]
Starting sw-cp-serverd:  [  OK  ]
 
Why is there no response to this? It is not only a valid question but a problem that many people are facing. See below for example:

[root@webhost1 certificates]# service sw-cp-server restart
Stopping sw-cp-serverd: [FAILED]
Starting sw-cp-serverd: nginx: [emerg] bind() to 0.0.0.0:6308 failed (98: Address already in use)
nginx: [emerg] bind() to 0.0.0.0:12443 failed (98: Address already in use)
nginx: [emerg] bind() to 0.0.0.0:8443 failed (98: Address already in use)
nginx: [emerg] bind() to 0.0.0.0:8880 failed (98: Address already in use)
nginx: [emerg] bind() to [::]:8443 failed (98: Address already in use)
nginx: [emerg] bind() to [::]:8880 failed (98: Address already in use)
nginx: [emerg] bind() to 0.0.0.0:6308 failed (98: Address already in use)
nginx: [emerg] bind() to 0.0.0.0:12443 failed (98: Address already in use)
nginx: [emerg] bind() to 0.0.0.0:8443 failed (98: Address already in use)
nginx: [emerg] bind() to 0.0.0.0:8880 failed (98: Address already in use)
nginx: [emerg] bind() to [::]:8443 failed (98: Address already in use)
nginx: [emerg] bind() to [::]:8880 failed (98: Address already in use)
nginx: [emerg] bind() to 0.0.0.0:6308 failed (98: Address already in use)
nginx: [emerg] bind() to 0.0.0.0:12443 failed (98: Address already in use)
nginx: [emerg] bind() to 0.0.0.0:8443 failed (98: Address already in use)
nginx: [emerg] bind() to 0.0.0.0:8880 failed (98: Address already in use)
nginx: [emerg] bind() to [::]:8443 failed (98: Address already in use)
nginx: [emerg] bind() to [::]:8880 failed (98: Address already in use)
nginx: [emerg] bind() to 0.0.0.0:6308 failed (98: Address already in use)
nginx: [emerg] bind() to 0.0.0.0:12443 failed (98: Address already in use)
nginx: [emerg] bind() to 0.0.0.0:8443 failed (98: Address already in use)
nginx: [emerg] bind() to 0.0.0.0:8880 failed (98: Address already in use)
nginx: [emerg] bind() to [::]:8443 failed (98: Address already in use)
nginx: [emerg] bind() to [::]:8880 failed (98: Address already in use)
nginx: [emerg] bind() to 0.0.0.0:6308 failed (98: Address already in use)
nginx: [emerg] bind() to 0.0.0.0:12443 failed (98: Address already in use)
nginx: [emerg] bind() to 0.0.0.0:8443 failed (98: Address already in use)
nginx: [emerg] bind() to 0.0.0.0:8880 failed (98: Address already in use)
nginx: [emerg] bind() to [::]:8443 failed (98: Address already in use)
nginx: [emerg] bind() to [::]:8880 failed (98: Address already in use)
nginx: [emerg] still could not bind()
[FAILED]
 
I fixed my own problem and will post the fix here for the OP.

On the command line type lsof -i 8443

This will return something like this:

[root@webhost1 certificates]# lsof -i :8443
COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME
sw-cp-ser 8627 root 9u IPv4 36562572 0t0 TCP *:pcsync-https (LISTEN)
sw-cp-ser 8627 root 11u IPv6 36562574 0t0 TCP *:pcsync-https (LISTEN)
sw-cp-ser 8628 sw-cp-server 3u IPv4 375504414 0t0 TCP webhost1.teksavvy.com:pcsync-https->206.248.154.140:55751 (ESTABLISHED)
sw-cp-ser 8628 sw-cp-server 9u IPv4 36562572 0t0 TCP *:pcsync-https (LISTEN)
sw-cp-ser 8628 sw-cp-server 11u IPv6 36562574 0t0 TCP *:pcsync-https (LISTEN)
sw-cp-ser 8628 sw-cp-server 16u IPv4 375504473 0t0 TCP webhost1.teksavvy.com:pcsync-https->206.248.154.140:42744 (ESTABLISHED)
sw-cp-ser 8628 sw-cp-server 17u IPv4 375504474 0t0 TCP webhost1.teksavvy.com:pcsync-https->206.248.154.140:48856 (ESTABLISHED)
sw-cp-ser 8628 sw-cp-server 18u IPv4 375504545 0t0 TCP webhost1.teksavvy.com:pcsync-https->206.248.154.140:59566 (ESTABLISHED)
sw-cp-ser 8628 sw-cp-server 21u IPv4 375504546 0t0 TCP webhost1.teksavvy.com:pcsync-https->206.248.154.140:59546 (ESTABLISHED)
sw-cp-ser 8628 sw-cp-server 22u IPv4 375504547 0t0 TCP webhost1.teksavvy.com:pcsync-https->206.248.154.140:38696 (ESTABLISHED)


Then kill -9 8627 8628
Then service sw-cp-server restart

That should fix your problem.
 
Back
Top