The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

[ipcheck] Problem with DNS setup

Discussion in 'Bind / DNS / Nameserver Issues' started by mattress, Jun 1, 2011.

  1. mattress

    mattress Active Member

    Joined:
    Sep 3, 2009
    Messages:
    40
    Likes Received:
    0
    Trophy Points:
    6
    So, before I get started, believe it or not, I've Googled this error message:

    I checked /etc/hosts. All the entries look correct.
    I made sure there was an A record
    I saw some posts about /etc/resolv.conf causing issues, but it seems correct.
    I've reset the hostname (to the same thing) via the webpanel
    I've recreated the A record via the web panel
    Possibly related, and even bigger, I can't ping the entire domain at all.
    DNS is hosted on box.

    This all started last night. Suggestions?
     
  2. cPanelTristan

    cPanelTristan Quality Assurance Analyst
    Staff Member

    Joined:
    Oct 2, 2010
    Messages:
    7,623
    Likes Received:
    21
    Trophy Points:
    38
    Location:
    somewhere over the rainbow
    cPanel Access Level:
    Root Administrator
    What do you currently have in /etc/resolv.conf file? As for the hostname, in order to tell if it is properly working, does it dig and ping from off the machine as well as on the machine?

    On the machine:

    Code:
    hostname
    dig +short hostname.domain.com
    ping hostname.domain.com
    Of the machine, you'd use the same other than the hostname command. The hostname command is simply to ensure the machine is reporting the right fully qualified hostname.
     
  3. mattress

    mattress Active Member

    Joined:
    Sep 3, 2009
    Messages:
    40
    Likes Received:
    0
    Trophy Points:
    6
    Contents of /etc/resolv.conf:
    Code:
    search domain.com
    domain domain.com
    nameserver 127.0.0.1
    nameserver 4.2.2.1
    nameserver 4.2.2.2
    

    hostname - returns hostname.domain.com

    dig +short hostname.domain.com - returns blank, no data

    ping hostname.domain.com - replies
     
  4. cPanelTristan

    cPanelTristan Quality Assurance Analyst
    Staff Member

    Joined:
    Oct 2, 2010
    Messages:
    7,623
    Likes Received:
    21
    Trophy Points:
    38
    Location:
    somewhere over the rainbow
    cPanel Access Level:
    Root Administrator
    Your first nameserver listed in your /etc/resolv.conf should not be localhost. In fact, localhost shouldn't be in the resolver file, so remove this entry:

    Code:
    nameserver 127.0.0.1
     
  5. mattress

    mattress Active Member

    Joined:
    Sep 3, 2009
    Messages:
    40
    Likes Received:
    0
    Trophy Points:
    6
    Removed the entry, reran /scripts/ipcheck. Same error.

    Also, the DIG command still returns no data.
     
  6. cPanelTristan

    cPanelTristan Quality Assurance Analyst
    Staff Member

    Joined:
    Oct 2, 2010
    Messages:
    7,623
    Likes Received:
    21
    Trophy Points:
    38
    Location:
    somewhere over the rainbow
    cPanel Access Level:
    Root Administrator
    Please open up a ticket at this point for us to determine why the hostname isn't working for digs. You can open one using the link in my signature or WHM > Support Center > Contact cPanel
     
  7. mattress

    mattress Active Member

    Joined:
    Sep 3, 2009
    Messages:
    40
    Likes Received:
    0
    Trophy Points:
    6
    Ticket submitted. Thanks for your help.
     
  8. mattress

    mattress Active Member

    Joined:
    Sep 3, 2009
    Messages:
    40
    Likes Received:
    0
    Trophy Points:
    6
    Figured I'd post the fix as another thing for someone to check who Googles this problem...

    No idea how that happened, but its fixed!
     
  9. bennyadriawan

    bennyadriawan Registered

    Joined:
    Nov 3, 2011
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Root Administrator
    mattress,

    I just experience the same problem and did rebuilt the dns by using rebuilddnsconfig.

    My question is, how do you know it's fixed, how do i test it? tx.
     
  10. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,854
    Likes Received:
    676
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    Hello :)

    You can use the following command to see if there are any problems with the hostname resolving to the correct IP address:

    Code:
    # /scripts/ipcheck --verbose
    Thank you.
     
  11. bennyadriawan

    bennyadriawan Registered

    Joined:
    Nov 3, 2011
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Root Administrator
    Hi Michael,

    appreciate your prompt reply, after i've run the ipcheck command, i got below message which is similar with the email sent earlier continuously, does it mean it's not resolved yet? any suggestion? tx

    [ipcheck] sent email:

    IMPORTANT: Do not ignore this email.

    Your hostname (server2.iloveyoubanget.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 server2.iloveyoubanget.com. 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.

    Notification => leirissajp@gmail.com via EMAIL [level => 2]
     
  12. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,854
    Likes Received:
    676
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    Yes, that message indicates the hostname of your server does not resolve to the primary IP address of your server.

    Do you use a remote DNS provider for "iloveyoubanget.com"? If so, ensure you add the "A" record for "server2" at the remote DNS provider pointing to the IP address of your server. Otherwise, ensure the "A" record for "server2" is added as a DNS Zone on the cPanel system.

    Thank you.
     
  13. martin.henits

    martin.henits Member

    Joined:
    Aug 5, 2010
    Messages:
    7
    Likes Received:
    0
    Trophy Points:
    1
    Hi

    I have received the same email message from cpanel saying my hostname could not be resolved to an ip address.
    However, when I run /scripts/ipcheck --verbose, it says no ip-related problems have been found.

    Should I be worried at all about the email that I received?
    Thanks
     
  14. cPanelTristan

    cPanelTristan Quality Assurance Analyst
    Staff Member

    Joined:
    Oct 2, 2010
    Messages:
    7,623
    Likes Received:
    21
    Trophy Points:
    38
    Location:
    somewhere over the rainbow
    cPanel Access Level:
    Root Administrator
    Can you provide the exact message you received? If you would prefer not to note your hostname or the IP here, please submit a ticket for us to investigate further. You can submit a ticket using WHM > Support Center > Contact cPanel or using the link in my signature.

    As for being worried, if the hostname isn't actually resolving, then the machine could have issues with email services working properly (some recipient servers might reject emails due to the invalid hostname). As such, it would be advisable to correct the situation.
     
Loading...

Share This Page