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.

DNS not solved

Discussion in 'Bind / DNS / Nameserver Issues' started by Sergiu Tot, Apr 9, 2008.

  1. Sergiu Tot

    Sergiu Tot Well-Known Member

    Joined:
    Jul 17, 2007
    Messages:
    65
    Likes Received:
    0
    Trophy Points:
    6
    Location:
    Cluj, Romania
    cPanel Access Level:
    Root Administrator
    Hello !

    I have a small problem on one of our servers - web server. From scripts (PHP and/or Perl) the domains cannot be solved to an IP address. From console everything works fine but from any sort of script the domain name cannot be solved - no matter is that domain is hosted on the same webserver or not.
    Anyway, the domain is solved if I manualy put a record in /etc/hosts but this is not a solution as I don't know what domains every client accesses.

    Does anybody have an ideea why is this strange behaviour ?
     
    #1 Sergiu Tot, Apr 9, 2008
    Last edited: Apr 9, 2008
  2. rpmws

    rpmws Well-Known Member

    Joined:
    Aug 14, 2001
    Messages:
    1,824
    Likes Received:
    5
    Trophy Points:
    38
    Location:
    back woods of NC, USA
    what happens if you dig the domain from the shell on that same server?

    what do you have in /etc/resolv.conf ?
     
  3. Sergiu Tot

    Sergiu Tot Well-Known Member

    Joined:
    Jul 17, 2007
    Messages:
    65
    Likes Received:
    0
    Trophy Points:
    6
    Location:
    Cluj, Romania
    cPanel Access Level:
    Root Administrator
    At dig the server responds correctly on all domains. The same at nslookup. From console everything works perfectly, only from the scripts the domain is not solved.

    On /etc/resolv.conf I have the IP address of the DNS server provided from the datacenter. I changed that with 4.2.2.2 (a very good dns server) but the problem persists.

    One problem that I see in error_log is this:

    shmget() failed: Cannot allocate memory
    Failed to start up concurrent users module!

    Could this have any connection with this issue ?
     
  4. dlynx76

    dlynx76 Registered

    Joined:
    Mar 3, 2005
    Messages:
    1
    Likes Received:
    0
    Trophy Points:
    1
    I'm having the same problem with resolving domains/doing reverse lookups from some php scripts.

    At first I had assumed it was due to the outages at ThePlanet H1 (where I'm at) but I've updated DNS servers in resolv.conf to new ones and rebooted. I can resolve domains from the command line and email, etc works fine. It appears to me the only think that still is not working is from inside the webserver/php.
     
  5. elliotcooper

    elliotcooper Well-Known Member
    PartnerNOC

    Joined:
    May 18, 2005
    Messages:
    56
    Likes Received:
    0
    Trophy Points:
    6
    As as aside here, you should *never* use an unknown/untrusted resolver like 4.2.2.2. DNS information is always trusted so any malicious information supplied by 4.2.2.2 will be used and could lead to serious issues as I take it that you have no idea who runs this server, why they open it to the public, what their security practices and policies are etc. By using it you are putting a lot of trust in a server you know nothing about.

    If you are having a problem with the resolver that your host is providing you should contact them about it. It is worth keeping in mind that DNS servers and resolvers are different so you may be trying to use a DNS server as a resolver which will lead to problems.
     
    #5 elliotcooper, Jun 9, 2008
    Last edited: Jun 9, 2008
  6. soundguy

    soundguy Well-Known Member
    PartnerNOC

    Joined:
    Oct 29, 2003
    Messages:
    52
    Likes Received:
    0
    Trophy Points:
    6
    Location:
    seattle
    4.2.2.2 is operated as a public DNS server by Level3. Hardly "untrusted".
     
Loading...

Share This Page