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.

Something updated, now having numerous errors

Discussion in 'General Discussion' started by GoWilkes, Mar 3, 2011.

  1. GoWilkes

    GoWilkes Well-Known Member

    Joined:
    Sep 26, 2006
    Messages:
    367
    Likes Received:
    1
    Trophy Points:
    18
    cPanel Access Level:
    Root Administrator
    Something on my server updated this morning, around 8:30am EST. After that, I'm having major errors all throughout the server.

    Specifically, I know that:

    1. The Perl module LWP::Simple is no longer getting any files from the server. It tries, and after about 45 seconds will time out and proceed with getting, but doesn't write an error to the error_log.

    2. PHP function getimagesize() is returning errors on images that definitely exist without errors. The error it's giving is:

    ***
    Warning: getimagesize() [function.getimagesize]:
    php_network_getaddresses: getaddrinfo failed: Temporary failure in
    name resolution in /home/USERID/public_html/view.php on line 349

    Warning: getimagesize(IANA — Example domains)
    [function.getimagesize]: failed to open stream:
    php_network_getaddresses: getaddrinfo failed: Temporary failure in
    name resolution in /home/USERID/public_html/view.php on line 349
    ***

    I'm also getting numerous PHP warnings in the error_log that didn't exist before.

    Here's the weird thing. I have another server that has the same version of cPanel and Apache on it. I uploaded a Perl script to it that "gets" a file from my main server, and it gets it just fine. But the same script on my main server, getting a file from itself, fails!

    Here's the Perl script:

    #!/usr/bin/perl

    use LWP::Simple qw(!head);

    $get_file = get("http://www.gowilkes.com/test.txt");

    # If I uncomment this next line, I do get the "die" error
    # die "Couldn't get it!" unless defined $get_file;

    print "Content-type: text/html\n\n";
    print $get_file;
    exit;

    I CAN, however, get "http://www.google.com" from either server.

    Both servers are running WHM 11.28.83. I did have the server with errors set to "STABLE (Auto)" updates, but just changed it to "RELEASE (Auto)" and updated it (which had no impact on the error).

    Any advice?
     
  2. GoWilkes

    GoWilkes Well-Known Member

    Joined:
    Sep 26, 2006
    Messages:
    367
    Likes Received:
    1
    Trophy Points:
    18
    cPanel Access Level:
    Root Administrator
    I believe (he said with his fingers crossed) that the error is resolved now. After only 14 hours of digging, it turns out that it wasn't even on my end; it was the management company's nameservers.

    If anyone has a similar issue in the future, the error was found in /etc/resolv.conf. Even though the file hadn't updated since 2008, I changed the IPs listed to ones found on my other server, and immediately everything began working again.

    I have 2 servers, so I was able to copy the IPs from the working server to the non-working server. If I hadn't had 2 servers, though, then I don't know how I would have fixed this. Maybe someone else can explain in better detail the correct way to fix this?
     
  3. 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
    The /etc/resolv.conf file (which can also be changed in WHM > Resolver Configuration) should not contain the IPs on your machines. It should contain off server DNS resolvers that either your provider or another company has available. For example, Google and Level 3 have public resolvers that can be used.

    Google's public resolvers are:

    Code:
    nameserver 8.8.4.4
    nameserver 8.8.8.8
    Level 3's public resolvers are:

    Code:
    nameserver 4.2.2.1
    nameserver 4.2.2.2
    nameserver 4.2.2.3
    nameserver 4.2.2.4
    nameserver 4.2.2.5
    nameserver 4.2.2.6
    You can see a list of available resolvers at GRC | Alternative Public Nameservers  

    I suggest switching to these good working public resolvers, most likely Google's or Level 3's.
     
  4. GoWilkes

    GoWilkes Well-Known Member

    Joined:
    Sep 26, 2006
    Messages:
    367
    Likes Received:
    1
    Trophy Points:
    18
    cPanel Access Level:
    Root Administrator
    Would there be any disadvantage to using all of them? Correct me if I'm wrong, but wouldn't this just use Level 3's if Google's failed?

    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
    nameserver 4.2.2.5
    nameserver 4.2.2.6
     
  5. 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
    There's no disadvantage to using all of them. If you do it the way you are showing, then it would go to the next working resolver, so you are certainly welcome to use both Google and Level 3's resolvers in your /etc/resolv.conf file.
     
Loading...

Share This Page