One of our cPanel DNS Only servers was throwing up the below error:
Hostname Configuration Error: ns9.jordansphere.co.uk
Your WHM server is configured with IP address xxx.xxx.xxx.xxx and has a misconfigured hostname. This misconfiguration can cause some services on your server to not restart properly. The cause of your misconfiguration is:
WHM has detected a manual hostname change.
To fix this problem, we recommend that you perform the following action:
Update your hostname in WHM’s (http://ns9.jordansphere.co.uk:2087/scripts2/changehostname) interface (Home » Networking Setup » Change Hostname).
Version of cPanel was 11.48.2.
Checking the hostname on the CLI showed that is was correct:
# hostname ns8.jordansphere.co.uk
Looking the Cpanel in the Change Hostname section also showed to be correct.
The fix for my issue was in the /etc/wwwacct.conf file. I had originally cloned this VM and the old hostname was showing in this file. I simply changed the HOST value in here.
To verify this warning wont occur in the future warnings you can run this command:
# /usr/local/cpanel/scripts/check_valid_server_hostname OK