Author Topic: Starting cwpsrv: cwpsrv: [emerg] SL_CTX_use_PrivateKey_file("/etc/pki/tls/privat  (Read 22279 times)

0 Members and 1 Guest are viewing this topic.

Offline
*
Quote
Starting cwpsrv: cwpsrv: [emerg] SL_CTX_use_PrivateKey_file("/etc/pki/tls/private/hostname.key") failed (SSL: error:0B080074:x509 certificate routines:X509_check_private_key:key values mismatch)

How to fix this ?

Offline
*
I have the same problem after CWP support worked on my server and then I rebooted and now I cant start CWP.

All this happened because of conflicts and issues with the old lets encrypt and the new autossl.

it was a nightmare, I am scared to try the above command it it then does not start httpd

So any luck ?

Offline
*
Hey, I've got the same issue and cwpsrv doesn't start:

Code: [Select]
Starting CentOS Web Panel service (daemon)...
cwpsrv: [emerg] SL_CTX_use_PrivateKey_file("/etc/pki/tls/private/hostname.key") failed (SSL: error:0B080074:x509 certificate routines:X509_check_private_key:key valu
cwpsrv[10853]: cwpsrv:configuration file /usr/local/cwpsrv/conf/cwpsrv.conf test failed
systemd[1]: cwpsrv.service: control process exited, code=exited status=1
systemd[1]: Failed to start CentOS Web Panel service (daemon).
systemd[1]: Unit cwpsrv.service entered failed state.
systemd[1]: cwpsrv.service failed.
systemd[1]: cwpsrv.service holdoff time over, scheduling restart.

I do not have the script you mention
Code: [Select]
/scripts/generate_hostname_ssl, where can I get it or how can I solve this?

Thank you in advance

Damon H.

Offline
*
I found it! Sorry for the dumb question.
For anyone else with this problem, the script is located in
Code: [Select]
/usr/local/cwpsrv/htdocs/resources/scripts/generate_hostname_sslSolved!

Offline
*
This script will fix the issue

sh /scripts/generate_hostname_ssl

Offline
*
Quote
Starting cwpsrv: cwpsrv: [emerg] SL_CTX_use_PrivateKey_file("/etc/pki/tls/private/hostname.key") failed (SSL: error:0B080074:x509 certificate routines:X509_check_private_key:key values mismatch)

How to fix this ?

Run commands:
openssl x509 -noout -modulus -in /etc/pki/tls/certs/hostname.crt | openssl md5
openssl rsa -noout -modulus -in /etc/pki/tls/private/hostname.key | openssl md5
If the results match, then do the following:
cp hostname.crt hostname.bundle
systemctl restart cwpsrv.service

works!

Offline
*
Your solution worked as a charm! Thanks!

Quote
Starting cwpsrv: cwpsrv: [emerg] SL_CTX_use_PrivateKey_file("/etc/pki/tls/private/hostname.key") failed (SSL: error:0B080074:x509 certificate routines:X509_check_private_key:key values mismatch)

How to fix this ?

Run commands:
openssl x509 -noout -modulus -in /etc/pki/tls/certs/hostname.crt | openssl md5
openssl rsa -noout -modulus -in /etc/pki/tls/private/hostname.key | openssl md5
If the results match, then do the following:
cp hostname.crt hostname.bundle
systemctl restart cwpsrv.service

works!