server_hostname_validator "invalid hostname configuration"

jndawson

Well-Known Member
Aug 27, 2014
346
38
78
Western US
cPanel Access Level
DataCenter Provider
Randomly over the past several weeks, we get an emailed report from randomly different cPanel servers complaining about our hostname:

The system detected an invalid hostname configuration on: cp2.example.com

The main IP address of your cPanel & WHM server is “actual.IP.address.of.server”. The hostname does not resolve to this IP address. This misconfiguration can cause some services on your server to fail to 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://cp2.example.com:2087/scripts2/changehostname) interface (Home » Networking Setup » Change Hostname).

This notice is the result of a request from “server_hostname_validator”.

This notice was generated on “Sunday, August 30, 2015” at “9:07:33 AM UTC”.
We have no issue with our A & PTR records for our servers - they match just as they're supposed to. Next week, we may get a notice from another cPanel server, which will also not reflect reality.

Is something wrong with the script? Is there something else we need to check?
 
Last edited by a moderator:

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,880
2,261
463
Hello :)

Are you able to reproduce the issue on any of these servers by manually running the "/scripts/check_valid_server_hostname" command? Are these servers connected to the same DNS cluster, or is DNS handled separately on each server?

Thank you.
 

jndawson

Well-Known Member
Aug 27, 2014
346
38
78
Western US
cPanel Access Level
DataCenter Provider
Hello :)

Are you able to reproduce the issue on any of these servers by manually running the "/scripts/check_valid_server_hostname" command? Are these servers connected to the same DNS cluster, or is DNS handled separately on each server?

Thank you.
We corrected the issue by renaming the server with the same name it was named with.
Code:
The hostname was already set to cp2.ourdomain.com, syncing configuration only.
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,880
2,261
463
I am happy to see the issue is now resolved. It's likely there was cached data that had yet to update. Thank you for updating us with the outcome.