Control Web Panel

WebPanel => CentOS Configuration => Topic started by: sdx on July 10, 2017, 02:06:34 PM

Title: cwpsrv not starting also apachectl not starting
Post by: sdx on July 10, 2017, 02:06:34 PM
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 :
Code: [Select]
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 :
Code: [Select]
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
Title: Re: cwpsrv not starting also apachectl not starting
Post by: sdx on July 11, 2017, 06:10:18 PM
 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 ;).
Title: Re: cwpsrv not starting also apachectl not starting
Post by: tshetumd on July 12, 2017, 07:23:27 AM
How did you generate the new key.? Please share.
Title: Re: cwpsrv not starting also apachectl not starting
Post by: Administrator on July 15, 2017, 05:46:59 AM
you can use this script
Code: [Select]
sh /scripts/generate_hostname_ssl
Title: Re: cwpsrv not starting also apachectl not starting
Post by: become on November 05, 2017, 08:11:04 AM
I see CWP have real problem with SSL in many diffrent situation.
Title: Re: cwpsrv not starting also apachectl not starting
Post by: camted on December 07, 2017, 10:36:10 PM
Indeed! a lot of bugs
Title: Re: cwpsrv not starting also apachectl not starting
Post by: farshad on November 07, 2018, 09:41:34 AM
"sh: /scripts/generate_hostname_ssl: No such file or directory"

I have the same problem and cannot find the script to fix this
Title: Re: cwpsrv not starting also apachectl not starting
Post by: adamjedgar on June 12, 2019, 11:41:53 PM
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.)