Koozali.org: home of the SME Server

SME 5.5 can't resolve hostnames

Johan

SME 5.5 can't resolve hostnames
« on: July 21, 2002, 06:25:12 AM »
After updating to 5.5 from 5.1.2 it seems like the server can’t resolve hostnames. I don’t think there are any problems with the DNS because I’m using the same right know. I can connect to other computers using IP but when I’m trying to use domainnames it says “unknown host www.e-smith.org”.
No mails going out from SME because it can’t resolve the hostname.
I really need help!

Johan

Re: SME 5.5 can't resolve hostnames
« Reply #1 on: July 21, 2002, 06:46:53 AM »
Here are maybe some useful things that can help you help me:

1.
I used to workaround for this bug: http://www.e-smith.org/bugs/index.php3?op=showBug&bugID=73

2.
Every 5min this message appears:
INIT: Id “nd” respawning too fast: disabled for 5 minutes.

3.
I found the following error in boot.log
Jul 21 03:34:26 horlen mysql.init: loading /etc/e-smith/sql/init/30mysql.create.horde.sql into mysql
Jul 21 03:34:26 horlen mysql.init: ERROR
Jul 21 03:34:27 horlen mysql.init: Loading data into mysql
Jul 21 03:34:27 horlen mysql.init:  1061 at line 74: Duplicate key name 'category_category_name_idx'
Jul 21 03:34:27 horlen mysql.init: Loading data into mysql failed
Jul 21 03:34:27 horlen mysql.init: ^[[60G
Jul 21 03:34:27 horlen mysql.init: [ ^[[1;31m
Jul 21 03:34:27 horlen mysql.init: FAILED
Jul 21 03:34:27 horlen mysql.init:
Jul 21 03:34:27 horlen rc: Starting mysql.init:  succeeded

Micheal Kelly

Re: SME 5.5 can't resolve hostnames
« Reply #2 on: July 21, 2002, 07:29:01 AM »
This line:

2.Every 5min this message appears:
INIT: Id “nd” respawning too fast: disabled for 5 minutes.

indicates that named (the DNS server on SME 5.5) is starting, then exiting ...  init then tries to restart it, and so on.  You can see the line that does this by doing a more /etc/inittab and looking for the named entry.

You might want to do a "grep named /var/log/messages" to see what type of errors named is tossing out.

Johan

Re: SME 5.5 can't resolve hostnames
« Reply #3 on: July 21, 2002, 08:13:56 AM »
Here's what I found in /var/log/messages that repeats every 5min:

Jul 20 23:36:20 horlen /usr/sbin/named[3339]: starting BIND 9.1.3 -f -u dns -t /home/dns
Jul 20 23:36:20 horlen /usr/sbin/named[3339]: using 1 CPU
Jul 20 23:36:20 horlen /usr/sbin/named[3341]: loading configuration from '/etc/named.conf'
Jul 20 23:36:20 horlen /usr/sbin/named[3341]: /etc/named.conf:16: parse error near ;
Jul 20 23:36:20 horlen /usr/sbin/named[3341]: loading configuration: failure
Jul 20 23:36:20 horlen /usr/sbin/named[3341]: exiting (due to fatal error)
Jul 20 23:36:20 horlen /usr/sbin/named[3344]: starting BIND 9.1.3 -f -u dns -t /home/dns

And the contents of /etc/named.conf:

[root@horlen root]# more /etc/named.conf
# named chroot()ed to /home/dns

I'm not sure what to do but I guess I should remove "()"?
Will it work then?

Des Dougan

Re: SME 5.5 can't resolve hostnames
« Reply #4 on: July 21, 2002, 08:25:18 AM »
No. The contents of /etc/named.conf is a comment telling you that the system named.conf file is really in /home/dns/etc/named.conf because of the security "chroot jail" it's been confined to.

Post the contents of /home/dns/etc/named.conf - that will provide more information about why you have a problem.


Des Dougan

Johan

Re: SME 5.5 can't resolve hostnames
« Reply #5 on: July 21, 2002, 08:38:30 AM »
Here's the file

[root@horlen root]# more /home/dns/etc/named.conf
#------------------------------------------------------------
# DO NOT MODIFY THIS FILE! It is updated automatically by the
# SME Server software. Instead, modify the source template in
# an /etc/e-smith/templates-custom directory. For more
# information, see http://www.e-smith.org/custom/
#
# copyright (C) 2002 Mitel Networks Corporation
#------------------------------------------------------------



options {
        directory "/var/named";
        forward first;

        forwarders { 212.181.54.2; ; };


        listen-on { 127.0.0.1; 192.168.0.2; };
        /*
         * If there is a firewall between you and nameservers you want
         * to talk to, you might need to uncomment the query-source
         * directive below.  Previous versions of BIND always asked
         * questions using port 53, but BIND 8.1 uses an unprivileged
         * port by default.
         */
        // query-source address * port 53;
};
#----------------------------------------
# root name servers
#----------------------------------------

zone "." {
        type hint;
        file "named.ca";
};
#----------------------------------------
# localhost PTR record
#----------------------------------------

zone "0.0.127.in-addr.arpa" {
        type master;
        file "named.local";
};

zone "localhost." {
        type master;
        file "named.localhost";
};
#----------------------------------------
# local network PTR records
#----------------------------------------

zone "0.168.192.in-addr.arpa."
{
        type forward;
        forward first;

        forwarders { 212.181.54.2; ; };

};

zone "horlen.com"
{
    type forward;
        forward first;

        forwarders { 212.181.54.2; ; };

};

Damien Curtain

Re: SME 5.5 can't resolve hostnames
« Reply #6 on: July 21, 2002, 08:39:42 AM »
Johan wrote:
>
> Here's what I found in /var/log/messages that repeats every
> 5min:
>
> Jul 20 23:36:20 horlen /usr/sbin/named[3339]: starting BIND
> 9.1.3 -f -u dns -t /home/dns
> Jul 20 23:36:20 horlen /usr/sbin/named[3339]: using 1 CPU
> Jul 20 23:36:20 horlen /usr/sbin/named[3341]: loading
> configuration from '/etc/named.conf'
> Jul 20 23:36:20 horlen /usr/sbin/named[3341]:
> /etc/named.conf:16: parse error near ;
> Jul 20 23:36:20 horlen /usr/sbin/named[3341]: loading
> configuration: failure
> Jul 20 23:36:20 horlen /usr/sbin/named[3341]: exiting (due to
> fatal error)
> Jul 20 23:36:20 horlen /usr/sbin/named[3344]: starting BIND
> 9.1.3 -f -u dns -t /home/dns
>
> And the contents of /etc/named.conf:
>
> [root@horlen root]# more /etc/named.conf
> # named chroot()ed to /home/dns
>
> I'm not sure what to do but I guess I should remove "()"?
> Will it work then?

No..

You should try first re-expanding that configuration file and then restart named, perhaps it isnt bogus except in its current state, and re-expanding the file may fix the configuration error.

I guess the easiest way is

/etc/e-smith/events/actions/named-conf foo
/etc/init.d/named reload

Then see if you get the same issues in /var/log/messages

btw the real file lives in /home/dns/etc/
--
 Damien

Damien Curtain

Re: SME 5.5 can't resolve hostnames
« Reply #7 on: July 21, 2002, 08:45:22 AM »
>
>         forwarders { 212.181.54.2; ; };
>

You need loose the second semi-colon after the first forwarder...

I think you may have a blank 2nd forwarder?

/sbin/e-smith/db configuration delprop named Forwarder2

would remove it if you do

Then run those previous 2 commands I suggested....
--
 Damien

Charlie Brady

Re: SME 5.5 can't resolve hostnames
« Reply #8 on: July 21, 2002, 08:49:02 AM »
Damien Curtain wrote:

> > Jul 20 23:36:20 horlen /usr/sbin/named[3341]:
> > /etc/named.conf:16: parse error near ;

I'd say there is a parse error near line 16.

That'd be this line:
 
>       forwarders { 212.181.54.2; ; };

> /etc/e-smith/events/actions/named-conf foo
> /etc/init.d/named reload

"/etc/init.d/named reload" won't work, since named is run from inittab, not by running the init script. Try:

/etc/e-smith/events/actions/named-reload

but that won't work until the problem is mixed. I'd try removing the DNS forwarder.

Charlie

Damien Curtain

Re: SME 5.5 can't resolve hostnames
« Reply #9 on: July 21, 2002, 08:57:10 AM »
Charlie Brady wrote:
>
> Damien Curtain wrote:
>
> > > Jul 20 23:36:20 horlen /usr/sbin/named[3341]:
> > > /etc/named.conf:16: parse error near ;
>
> I'd say there is a parse error near line 16.
>
> That'd be this line:
>  
> >       forwarders { 212.181.54.2; ; };
>
> > /etc/e-smith/events/actions/named-conf foo
> > /etc/init.d/named reload
>
> "/etc/init.d/named reload" won't work, since named is run
> from inittab, not by running the init script. Try:
>
> /etc/e-smith/events/actions/named-reload

Guess you've never looked at that file, the relevant part is

---- snip ----
my $status = db_get_prop(\%conf, 'named', 'status');
if (defined $status && $status eq "enabled")
{
    system("/etc/init.d/named", "reload") == 0
         or warn("named reload returned non-zero");
}
---- snip ----

So I guess thats a bug then?

> but that won't work until the problem is mixed. I'd try
> removing the DNS forwarder.

I still recommend first seeing if you have a blank or " " Forwarder2 set, which is the likely problem.
--
 Damien

Johan

THANK YOU ALL!!!
« Reply #10 on: July 21, 2002, 09:05:01 AM »
YOU ARE THE GREATEST!

I did as you told me and it worked :)
Almost, I had to reboot the computer to get it to work but if I had waited 5 min maybe it had worked anyway?

And thanks for replying so fast.

[root@horlen etc]# /sbin/e-smith/db configuration delprop named Forwarder2
[root@horlen etc]# /etc/e-smith/events/actions/named-conf foo
[root@horlen etc]# /etc/init.d/named reload
Hangup
[root@horlen etc]# /etc/e-smith/events/actions/named-reload
named reload returned non-zero at /etc/e-smith/events/actions/named-reload line 41.
[root@horlen etc]#
Broadcast message from root (tty) Sun Jul 21 05:48:43 2002...

The system is going down for reboot NOW !!

Thanks again Micheal Kelly, Des Dougan, Damien Curtain and Charlie Brady.
Now I haveto rest. As you can see it's about 6 AM here in Sweden.

Josh Turiel

Re: THANK YOU ALL!!!
« Reply #11 on: July 22, 2002, 05:41:01 PM »
I had the exact same problem when I upgraded, with the same resolution.  Rich Lafferty was terrific in helping me work through it - I would have posted the answer during your problem except I spent a weekend away from the PC- sorry!

I suspect this only is a problem on systems that've been upgraded - in my case, my box started as a 4.x box and I've upgraded it through the 5.x series - I'm guessing one of the prior versions set up the forwarder list in such a way that the new release broke it.  It probably ought to make the bug list at some point, but at least it's an easy workaround.

Dave

Re: THANK YOU ALL!!!
« Reply #12 on: August 06, 2002, 02:22:46 AM »
I have the same error showing up every 5 min
BUT I do not find the forwarders { 212.181.54.2; ; };
here is my message log
Aug  5 20:51:22 seaport /usr/sbin/named[2406]: starting BIND 9.1.3 -f -u dns -t /home/dns
Aug  5 20:51:22 seaport /usr/sbin/named[2406]: using 1 CPU
Aug  5 20:51:22 seaport /usr/sbin/named[2408]: loading configuration from '/etc/named.conf'
Aug  5 20:51:22 seaport /usr/sbin/named[2408]: zone configuration for 'seaport6.com' failed: already exists
Aug  5 20:51:22 seaport /usr/sbin/named[2408]: loading configuration: failure
Aug  5 20:51:22 seaport /usr/sbin/named[2408]: exiting (due to fatal error)
Aug  5 20:51:22 seaport /usr/sbin/named[2411]: starting BIND 9.1.3 -f -u dns -t /home/dns
Aug  5 20:51:22 seaport /usr/sbin/named[2411]: using 1 CPU
Aug  5 20:51:22 seaport /usr/sbin/named[2413]: loading configuration from '/etc/named.conf'
Aug  5 20:51:22 seaport /usr/sbin/named[2413]: zone configuration for 'seaport6.com' failed: already exists
Aug  5 20:51:22 seaport /usr/sbin/named[2413]: loading configuration: failure
Aug  5 20:51:22 seaport /usr/sbin/named[2413]: exiting (due to fatal error)
Aug  5 20:51:22 seaport /usr/sbin/named[2416]: starting BIND 9.1.3 -f -u dns -t /home/dns
Aug  5 20:51:22 seaport /usr/sbin/named[2416]: using 1 CPU
Aug  5 20:51:22 seaport /usr/sbin/named[2418]: loading configuration from '/etc/named.conf'
Aug  5 20:51:22 seaport /usr/sbin/named[2418]: zone configuration for 'seaport6.com' failed: already exists
Aug  5 20:51:22 seaport /usr/sbin/named[2418]: loading configuration: failure
Aug  5 20:51:22 seaport /usr/sbin/named[2418]: exiting (due to fatal error)
Aug  5 20:51:22 seaport /usr/sbin/named[2421]: starting BIND 9.1.3 -f -u dns -t /home/dns
Aug  5 20:51:22 seaport /usr/sbin/named[2421]: using 1 CPU
Aug  5 20:51:22 seaport /usr/sbin/named[2423]: loading configuration from '/etc/named.conf'
Aug  5 20:51:22 seaport /usr/sbin/named[2423]: zone configuration for 'seaport6.com' failed: already exists
Aug  5 20:51:22 seaport /usr/sbin/named[2423]: loading configuration: failure
Aug  5 20:51:22 seaport /usr/sbin/named[2423]: exiting (due to fatal error)
Aug

Dave

Re: THANK YOU ALL!!!
« Reply #13 on: August 06, 2002, 02:33:21 AM »
I find that there are 2 seaport6.com listed in named
how do I get rid of one?
like
# local network PTR records
#----------------------------------------

zone "1.168.192.in-addr.arpa."
{
        type master;
        file "named.localnetwork";
};

zone "SeaPort6.com"
{
    type master;
    file "db.SeaPort6.com";
};

zone "seaport6.com"
{
    type master;
    file "db.seaport6.com";
};

zone "rmace.com"
{
    type master;
    file "db.rmace.com";
};

GC

double zone in /home/dns/etc/named.conf
« Reply #14 on: March 25, 2003, 09:06:30 PM »
After I upgraded to 5.6 from 5.1.2 (via backup / restore) I have *two* instances of my primary domain in my /home/dns/etc/named.conf

This is a bugger because it means named fails to load on startup :
Mar 25 18:00:20 burrito named[22950]: starting BIND 9.2.1 -f -u dns -t /home/dns
Mar 25 18:00:20 burrito named[22950]: using 1 CPU
Mar 25 18:00:20 burrito named[22952]: loading configuration from '/etc/named.conf'
Mar 25 18:00:20 burrito named[22952]: /etc/named.conf:80: zone 'myprimarydomain.com': already exists
Mar 25 18:00:20 burrito named[22952]: loading configuration: failure
Mar 25 18:00:20 burrito named[22952]: exiting (due to fatal error)
Mar 25 10:00:20 burrito init: Id "nd" respawning too fast: disabled for 5 minutes

So o' course I could just edit  /home/dns/etc/named.conf but it's templated... but where? I guess all the zone info gets dumped out the e-smith datastore into the file, so where do i look for this duplicate zone?

Any ideas?

Cheers,

G