Results 1 to 8 of 8

Thread: [SOLVED] DNS not resolving localhost

  1. #1
    srvlsn is offline Junior Member
    Join Date
    Mar 2009
    Location
    India
    Posts
    7
    Rep Power
    6

    Default [SOLVED] DNS not resolving localhost

    My installation terminates with the followig message :
    Operations logged to /tmp/zmsetup.03122009-115300.log
    Setting defaults...can't resolve "localhost" to address at /opt/zimbra/zimbramon/lib/i386-linux-thread-multi/Net/DNS/Resolver/Base.pm line 748.
    When I do a 'nslookup localhost' it gives me
    ** server can't find localhost: NXDOMAIN
    My 'localhost -f' returns the FQDN mail.domain.com

    I am trying to configure Zimbra behind a firewall. My internal IP is 10.10.10.4. The /etc/hosts, named.conf and zone files are as follows :

    /etc/hosts
    # Do not remove the following line, or various programs
    # that require network functionality will fail.
    127.0.0.1 localhost.localdomain localhost
    10.10.10.4 mail.domain.com mail
    /var/named/chroot/etc/named.conf
    //
    // Sample named.conf BIND DNS server 'named' configuration file
    // for the Red Hat BIND distribution.
    //
    // See the BIND Administrator's Reference Manual (ARM) for details, in:
    // file:///usr/share/doc/bind-*/arm/Bv9ARM.html
    // Also see the BIND Configuration GUI : /usr/bin/system-config-bind and
    // its manual.
    //
    options
    {
    /* make named use port 53 for the source of all queries, to allow
    * firewalls to block all ports except 53:
    */
    query-source port 53;
    query-source-v6 port 53;

    // Put files that named is allowed to write in the data/ directory:
    directory "/var/named"; // the default
    dump-file "data/cache_dump.db";
    statistics-file "data/named_stats.txt";
    memstatistics-file "data/named_mem_stats.txt";

    };
    zone "mail.domain.com" IN {
    type master;
    file "mail.domain.com";
    allow-update{none;};
    };

    zone "locahost." IN {
    type master;
    file "localhost.zone";
    allow-update{none;};
    };

    include "/etc/rndc.key";
    my zone file for mail.domain.com
    $TTL 86400
    @ IN SOA @ mail.domain.com. (
    42 ; serial (d. adams)
    3H ; refresh
    15M ; retry
    1W ; expiry
    1D ) ; minimum

    @ IN NS mail.domain.com.
    IN MX 10 mail.domain.com.
    IN A 10.0.10.4
    zone file for localhost.zone
    $TTL 86400
    @ IN SOA @ root (
    2009031201 ; serial (d. adams)
    3H ; refresh
    15M ; retry
    1W ; expiry
    1D ) ; minimum

    IN NS @
    IN A 127.0.0.1
    IN AAAA ::1

    ~
    The installation stops with the error given in the begining. My local host is not resolving to 127.0.0.1. I hope this is the problem. Can you please help.

    Regards-
    Srvlsn

  2. #2
    uxbod's Avatar
    uxbod is offline Moderator
    Join Date
    Nov 2006
    Location
    UK
    Posts
    8,017
    Rep Power
    24

    Default

    What is in /etc/resolv.conf and /etc/nsswitch.conf ?

  3. #3
    srvlsn is offline Junior Member
    Join Date
    Mar 2009
    Location
    India
    Posts
    7
    Rep Power
    6

    Default One mistake in my earlier post

    In the zone file for mail.domain.com, the IP I mentioned was 10.0.10.4. It should be 10.10.10.4. I have corrected this. However, the status remains same.....

    My /etc/resolve.conf contains "nameserver localhost"

    and /etc/nsswitch.conf is as follows (Have omitted some initial comment lines)
    # To use db, put the "db" in front of "files" for entries you want to be
    # looked up first in the databases
    #
    # Example:
    #passwd: db files nisplus nis
    #shadow: db files nisplus nis
    #group: db files nisplus nis

    passwd: files
    shadow: files
    group: files

    #hosts: db files nisplus nis dns
    hosts: files dns

    # Example - obey only what nisplus tells us...
    #services: nisplus [NOTFOUND=return] files
    #networks: nisplus [NOTFOUND=return] files
    #protocols: nisplus [NOTFOUND=return] files
    #rpc: nisplus [NOTFOUND=return] files
    #ethers: nisplus [NOTFOUND=return] files
    #netmasks: nisplus [NOTFOUND=return] files

    bootparams: nisplus [NOTFOUND=return] files

    ethers: files
    netmasks: files
    networks: files
    protocols: files
    rpc: files
    services: files

    netgroup: nisplus

    publickey: nisplus

    automount: files nisplus
    aliases: files nisplus

  4. #4
    uxbod's Avatar
    uxbod is offline Moderator
    Join Date
    Nov 2006
    Location
    UK
    Posts
    8,017
    Rep Power
    24

    Default

    /etc/resolv.conf should have
    Code:
    nameserver 10.10.10.4

  5. #5
    srvlsn is offline Junior Member
    Join Date
    Mar 2009
    Location
    India
    Posts
    7
    Rep Power
    6

    Default

    It WORKED !!!
    Thanks a million....

    Regards-
    Srvlsn

  6. #6
    uxbod's Avatar
    uxbod is offline Moderator
    Join Date
    Nov 2006
    Location
    UK
    Posts
    8,017
    Rep Power
    24

    Default

    For reference nameserver should always point to the IP of the DNS server and not the actual FQDN. Glad all is working now

  7. #7
    sudheervk is offline Starter Member
    Join Date
    Jul 2010
    Posts
    1
    Rep Power
    5

    Question Learner

    my vi /etc/hosts configuration is
    127.0.0.1 localhost.localdomain localhost

    123.176.41.29 mail.domain.com mail


    my vi etc/resolv.conf is
    nameserver 202.53.8.8
    nameserver 202.53.8.9
    nameserver 123.176.41.29

    my vi etc/sysconfig/network is
    NETWORKING=yes
    HOSTNAME=mail

    and i configured my pc as a DNS itself with giving the above 123.176.41.29 in both forward and reverse lookup but it is still asking for MX record .
    So this is the problem, any suggestions on this please to try out

  8. #8
    phoenix is online now Zimbra Consultant & Moderator
    Join Date
    Sep 2005
    Location
    Vannes, France
    Posts
    23,470
    Rep Power
    56

    Default

    Quote Originally Posted by sudheervk View Post
    So this is the problem, any suggestions on this please to try out
    The answer is alread in this thread (and all over the forums), you have too many entries in your resolv.conf when you should only have one.
    Regards


    Bill


    Acompli: A new adventure for Co-Founder KevinH.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Corrupt User Account
    By FaithX in forum Administrators
    Replies: 4
    Last Post: 01-20-2009, 01:56 PM
  2. Self-Signed SSL Certificate Causing Crash
    By VxJasonxV in forum Administrators
    Replies: 1
    Last Post: 12-06-2007, 01:24 PM
  3. Why is Tomcat shuting down ever nights?
    By trapanator in forum Administrators
    Replies: 2
    Last Post: 11-30-2006, 11:57 PM
  4. fetchmail: SMTP< 250 Ok: queued as
    By daly1 in forum Installation
    Replies: 4
    Last Post: 08-04-2006, 04:23 AM
  5. emails don't show up in inbox in browser
    By pstelzer in forum Installation
    Replies: 10
    Last Post: 12-13-2005, 10:21 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •