- Points
- 178
The errors you're encountering suggest that there might be network issues preventing your server from connecting to external services, which could be causing the SSL certificate issue and the inability to connect to WHM.
Here are some steps to diagnose and potentially resolve the issue:
If these commands fail, you have a network issue.
It should contain valid nameserver entries. You might want to use Google's public DNS for testing:
If necessary, temporarily disable the firewall to test connectivity:
hostnamectl set-hostname hostname.domain.com
Configure cPanel to use this certificate:
Here are some steps to diagnose and potentially resolve the issue:
1. Check Network Connectivity
Ensure your server can reach external services:
Code:
ping google.com
curl -I https://acme-v02.api.letsencrypt.org/directory
If these commands fail, you have a network issue.
2. Check DNS Resolution
Ensure your DNS resolution is working properly:
Code:
cat /etc/resolv.conf
It should contain valid nameserver entries. You might want to use Google's public DNS for testing:
Code:
nameserver 8.8.8.8
nameserver 8.8.4.4
3. Check Firewall Settings
Ensure that your firewall is not blocking outbound connections:
Code:
firewall-cmd --list-all
iptables -L
If necessary, temporarily disable the firewall to test connectivity:
Code:
systemctl stop firewalld
4. Check Hostname Configuration
Ensure that your hostname and /etc/hosts entries are correctly configured. Your /etc/hosts file looks fine, but let's double-check the hostname:hostnamectl set-hostname hostname.domain.com
5. Restart Network Services
Restart the network service to ensure all changes take effect:
Code:
systemctl restart network
6. Check cPanel and WHM Services
Make sure cPanel and WHM services are running correctly:
Code:
systemctl status cpanel
systemctl status cpsrvd
7. Check SSL Certificates
Since the SSL certificate renewal failed, you can try to manually install a self-signed certificate or use a valid one if you have it. Here’s how to generate a self-signed certificate:
Code:
mkdir -p /etc/ssl/private
openssl req -new -newkey rsa:2048 -days 365 -nodes -x509 -keyout /etc/ssl/private/server.key -out /etc/ssl/private/server.crt
Configure cPanel to use this certificate:
Code:
/usr/local/cpanel/bin/checkallsslcerts --force
8. Rebuild cPanel/WHM Configuration
Force a rebuild of cPanel and WHM configuration:
Code:
/usr/local/cpanel/scripts/upcp --force
9. Reboot the Server
Finally, reboot your server to ensure all changes take effect:
Code:
reboot
10. Additional Diagnostic Commands
Here are a few more commands that can help diagnose the issue:- Check logs for any additional errors:
Code:tail -f /var/log/messages tail -f /usr/local/cpanel/logs/error_log
- Verify that sshd is running and accessible:
Code:systemctl status sshd