cwpsrv not starting also apachectl not starting

Started by sdx, July 10, 2017, 02:06:34 PM

Previous topic - Next topic

sdx

HI , i am on scalaway have issue with Centos Web Panel ,i have two domain hosted on it (domain1.com, domain2.com) i had issue with mailserver , i change hostname to domain1.com then it didn't work , so i changed again to **.scalaway.com but that stoped cwpsrv , after vps rebooted cwpsrv is not starting neither apachectl i got errors :

cwpsrv.service - CentOS Web Panel service (daemon)
   Loaded: loaded (/usr/lib/systemd/system/cwpsrv.service; enabled; vendor preset: disabled)
   Active: activating (auto-restart) (Result: exit-code) since Mon 2017-07-10 14:03:58 UTC; 3s ago
  Process: 11620 ExecStartPre=/usr/local/cwpsrv/bin/cwpsrv -t (code=exited, status=1/FAILURE)

Jul 10 14:03:58 51.15.141.45 systemd[1]: cwpsrv.service: control process exited, code=exited status=1
Jul 10 14:03:58 51.15.141.45 systemd[1]: Failed to start CentOS Web Panel service (daemon).
Jul 10 14:03:58 51.15.141.45 systemd[1]: Unit cwpsrv.service entered failed state.
Jul 10 14:03:58 51.15.141.45 systemd[1]: cwpsrv.service failed

after i run this " /usr/local/cwpsrv/bin/cwpsrv -t  "  i got :

cwpsrv: [emerg] EM_read_bio_X509_AUX("/etc/pki/tls/certs/hostname.crt") failed (SSL: error:0906D06C:PEM routines:PEM_read_bio:no start line:Expecting: TRUSTED CERTIFICATE)
cwpsrv:configuration file /usr/local/cwpsrv/conf/cwpsrv.conf test failed

sdx

 i fixed the issue by generating a new hostname.key and hostname.crt and replaced the old ones ,finally used command systemctl start cwpsrv worked like charm ;).

tshetumd

How did you generate the new key.? Please share.

Administrator

you can use this script
sh /scripts/generate_hostname_ssl

become

I see CWP have real problem with SSL in many diffrent situation.


farshad

"sh: /scripts/generate_hostname_ssl: No such file or directory"

I have the same problem and cannot find the script to fix this

adamjedgar

late update on this, but its best not to leave an important part of the problem unanswered for users who may come across this...

I note the last post has the following result...

"sh: /scripts/generate_hostname_ssl: No such file or directory"

that is because you have to not include "sh" at the front of the command. So it should be entered as follows from root user for example:

[root@hostname ~]# /scripts/generate_hostname_ssl


hope this helps others in the future as this is a common mistake even i regularly make (ie just copying code directly from answer.)