[ipcheck] Problem with DNS setup – Fix email

One of our servers new one decided to really annoy us by sending us [ipcheck] Problem with DNS setup Emails!

The Email read as…

[ipcheck] Problem with DNS setup on hostname.domainname.com
IMPORTANT: Do not ignore this email.

Your hostname (hostname.domainname.com) could not be resolved to an IP
address. This means that /etc/hosts is not set up correctly, and/or
there is no dns entry for box.smwebserver.info. Please be sure that
the contents of /etc/hosts are configured correctly, and also that
there is a correct ‘A’ entry for the domain in the zone file.

Some or all of these problems can be caused by /etc/resolv.conf
being setup incorrectly. Please check that file if you believe
everything else is correct.

You may be able to automatically correct this problem by using the
‘Add an A entry for your hostname’ option under ‘Dns Functions’ in
your Web Host Manager.

After trying to figure what the problem was and why certain people around the world i’d say maybe 3% could not access our website the fix was the following (useful if anyone else is having the same problem)

Login to SSH

Type:
cd /etc
pico resolv.conf

Ensure that the contents of it is the following (obviously replace yourdomainane.ext with your own)

search yourdomainame.ext
domain yourdomainane.ext
nameserver 8.8.4.4
nameserver 8.8.8.8
nameserver 4.2.2.1
nameserver 4.2.2.2
nameserver 4.2.2.3
nameserver 4.2.2.4
Save this Ctrl + o

Then open your hosts file
pico hosts
(this should be in etc directory)

Ensure contents are like the following:

# Do not remove the following line, or various programs
# that require network functionality will fail.
127.0.0.1               localhost.localdomain localhost
xx.xx.xx.xx          hostname.domainanme host
xx - Enter your MAIN Server IP Here
Replace Hostname with hostname
for example
server.mpadc.com server

server being the host 
again save
then run /scripts/ipcheck

Hopefully you should not get any more error messages!

About these ads

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Connecting to %s