Hostname changes all the time from capital to not capital and back
The local hostname (is set in the Sharing pane of System Preferences) check it at first.


Then if you go to the below path, you might find traces of both upper &amp; lower case hostname     remove one of them and reboot your system.


  /Library/Preferences/SystemConfiguration/preferences.plist.