Control Web Panel

WebPanel => CentOS 6 Problems => Topic started by: mrlongshen on June 09, 2017, 04:33:13 AM

Title: Starting cwpsrv: cwpsrv: [emerg] SL_CTX_use_PrivateKey_file("/etc/pki/tls/privat
Post by: mrlongshen on June 09, 2017, 04:33:13 AM
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 ?
Title: Re: Starting cwpsrv: cwpsrv: [emerg] SL_CTX_use_PrivateKey_file("/etc/pki/tls/privat
Post by: billyf on September 01, 2017, 01:50:17 PM
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 ?
Title: Re: Starting cwpsrv: cwpsrv: [emerg] SL_CTX_use_PrivateKey_file("/etc/pki/tls/privat
Post by: damonh on April 15, 2018, 04:31:42 PM
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.
Title: Re: Starting cwpsrv: cwpsrv: [emerg] SL_CTX_use_PrivateKey_file("/etc/pki/tls/privat
Post by: damonh on April 15, 2018, 04:38:13 PM
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!
Title: Re: Starting cwpsrv: cwpsrv: [emerg] SL_CTX_use_PrivateKey_file("/etc/pki/tls/privat
Post by: wpsupporttech on June 09, 2018, 08:37:57 AM
This script will fix the issue

sh /scripts/generate_hostname_ssl
Title: Re: Starting cwpsrv: cwpsrv: [emerg] SL_CTX_use_PrivateKey_file("/etc/pki/tls/privat
Post by: Ozzi on January 30, 2020, 06:57:06 PM
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!
Title: Re: Starting cwpsrv: cwpsrv: [emerg] SL_CTX_use_PrivateKey_file("/etc/pki/tls/privat
Post by: alexbe on June 07, 2020, 04:02:05 PM
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!