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.

Resolving weirdness

Discussion in 'General Discussion' started by taproot, Jun 14, 2009.

  1. taproot

    taproot Well-Known Member

    Joined:
    Aug 22, 2008
    Messages:
    53
    Likes Received:
    0
    Trophy Points:
    6
    Hi,

    I moved a site between two cpanel server both of which are mine. The servers are ns1 and ns2. I moved the site from ns1 to ns2 2 days ago at which point the DNS had not been set to my servers yet. Last night the customer updated their DNS and pointed it to my servers. Some people are seeing the site on ns1 and some on ns2. I re-sync'd the nameservers and did a DNS cleanup. I checked the entries on both server manually in /var/named/domain.org.db and they both are set to the correct IP address. Any idea why some people would still see the site resolving to ns1 at this point?

    Cheers,
    TR
     
  2. Spiral

    Spiral BANNED

    Joined:
    Jun 24, 2005
    Messages:
    2,023
    Likes Received:
    7
    Trophy Points:
    0
    When you update a DNS record, notification of the change is sent up to the
    root servers for the TLD of your domain name and then that update feeds
    back down to all the servers around the world based on TTL.

    The problem is that many ISP's implement localized DNS caching within
    their own networks and pull live DNS updates on their own schedules
    instead of TTL settings. In plain English, this means that the DNS
    information may be updated and correct but some ISPs may have old
    cached data pointing back to the old information that sticks around for
    a few days longer until their servers decide to update the information.

    To complicate matters further, most PCs also cache DNS routing information
    locally as well and if you frequently visit a site and that site changes it's
    IP address, your computer may still try to go to the old IP address even
    though anyone new visiting the same site would correctly go to the
    new address. This can of course be changed by flushing your local DNS
    cache or by adding a route to the new IP in the host file on the computer
    of the visitor who is visiting that site:

    Code:
    ipconfig /flushdns     (Windows XP/Vista command to flush DNS cache)
    
    When transferring sites to a new server, I often duplicate the site on the
    new server and setup a mirroring update to keep the old site in sync and
    then go ahead and update the DNS information on the OLD server
    to point to the NEW IP address on the NEW server so that
    connections start going over to the new server and those who have old
    improper cache data can still see the site on the OLD server.
    After a few days, I go ahead and update the DNS servers themselves
    for the domain and then cut the OLD site.

    By doing it this way, there is no appearance of downtime and everything
    is seamlessly transferred from the original server to the new server.

    If you want to be sure you are connecting to a specific server, you can
    put the domain and www address in your local hosts file:
    Code:
    C:\Windows\System32\Drivers\Etc\Hosts    (Windows XP/Vista)
    
    /etc/hosts    (Linux / Unix)
    
    Anyway, taproot, to answer the question in your post directly, the issue
    you are experiencing is common and is natural and is caused by the
    update transitional period where some ISPs have live DNS data and others
    have old cached data and has more to do with how the worldwide DNS
    system works and isn't anything to do with your server or what you did!

    Everything will sort itself on it's own in a couple of days!
     
    #2 Spiral, Jun 14, 2009
    Last edited: Jun 14, 2009
  3. taproot

    taproot Well-Known Member

    Joined:
    Aug 22, 2008
    Messages:
    53
    Likes Received:
    0
    Trophy Points:
    6
    Hi,

    Thanks for the input. I did not explain very well though as the DNS was never ever set to the ns1 ip address so it was not a propagation issue. It seems however that restarting bind solved the problem. Basically when cpanel updated the DNS records for some reason Bind on NS1 was still serving the old IP address as I had originally created the new account there and then moved it before DNS was moved to my servers. Even though the db file in /var/named/ was correct, it did not respond with the right answer until restart :( I guess bind has some caching locally or was just not reading the updated file for some reason. Bleh.

    Thanks!
     
  4. Spiral

    Spiral BANNED

    Joined:
    Jun 24, 2005
    Messages:
    2,023
    Likes Received:
    7
    Trophy Points:
    0
    If the new server wasn't originally the authoritative server, that could be the issue and would yes make it cache old DNS information just like everyone else.
     
  5. diyamput

    diyamput Registered

    Joined:
    Oct 22, 2007
    Messages:
    4
    Likes Received:
    0
    Trophy Points:
    1
    could you show me on your /var/log/messages ?
    maybe i have same problem
     

Share This Page