Have you ever get an error like “Your hostname, and the servername you have set in DirectAdmin, server.host.com, do not match”?. If you have got this message, there is a solution to this.
This error is mainly occurring due to the incorrect setup /dev/null file.
First of all, makes sure the hostname isn’t simply blank. To check this,
1) Login to the server via ssh as the root user.
2) Then execute the command given below.
/bin/hostname –fqdn
3) Please be ensure that something is displayed. If you are able to see any output, then the solution is to set it correctly. Otherwise please execute the following commands.
rm /dev/null
mknod -m 0666 /dev/null c 1 3
4) We can also have one more confirmed solution for when you get the error message like as follows. “hostname: Name or service not known”. If you are getting this error message, then please login to the server as root user via ssh.
5) Run the following command.
vi /etc/hosts
6) You will get an output like follows.
1.2.3.4 abc.hostname.com
7) Change the hostname to as follows.
1.2.3.4 abc.hostname.com abc
After this, also you are getting the same error, then it means that you need to update the hostname.
8) Login to DirectAdmin as an admin user with the password.
9) Navigate to Admin Settings >> Servername.
10) Set the hostname as you desired and save it.
11) We need to change it to something else, then back again to re-sync it. And we have to ensure that we have a full zone for the hostname in our DNS. For this login to direct admin as an admin user.
12) Navigate to DNS administration.
13) Enter the domain details and save the file.
14) Now you can restart the services for the DirectAdmin.
service directadmin restart
If you need any further help, please do reach our support department.