LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Server (http://www.linuxquestions.org/questions/linux-server-73/)
-   -   named does not listen on eth0 right after boot. (http://www.linuxquestions.org/questions/linux-server-73/named-does-not-listen-on-eth0-right-after-boot-659899/)

algogeek 08-02-2008 03:47 AM

named does not listen on eth0 right after boot.
 
Hi friends,

This is a weird problem I'm pitted against on my Fedora 9 server which I would like to have as a local dns caching server on my network.

What happens is that right after reboot, named refuses to listen on the ethernet interface. I have to do /etc/init.d/named restart to read the named.conf file again and begin working.

I came to know this through this log entry (showing the named restart cycle)

Code:

Aug  2 12:58:25 india named[2165]: received control channel command 'stop'
Aug  2 12:58:25 india named[2165]: shutting down: flushing changes
Aug  2 12:58:25 india named[2165]: stopping command channel on 127.0.0.1#953
Aug  2 12:58:25 india named[2165]: stopping command channel on ::1#953
Aug  2 12:58:25 india named[2165]: no longer listening on ::1#53
Aug  2 12:58:25 india named[2165]: no longer listening on 127.0.0.1#53
Aug  2 12:58:25 india named[2165]: exiting
Aug  2 12:58:28 india named[4122]: starting BIND 9.5.0-P1 -u named -t /var/named/chroot
Aug  2 12:58:28 india named[4122]: found 2 CPUs, using 2 worker threads
Aug  2 12:58:28 india named[4122]: loading configuration from '/etc/named.conf'
Aug  2 12:58:28 india named[4122]: the working directory is not writable
Aug  2 12:58:28 india named[4122]: listening on IPv6 interface lo, ::1#53
Aug  2 12:58:28 india named[4122]: listening on IPv4 interface lo, 127.0.0.1#53
Aug  2 12:58:28 india named[4122]: listening on IPv4 interface eth0, 192.168.1.6#53

The log file also contains many entries showing:
Code:

Aug  2 12:47:01 india named[2165]: too many timeouts resolving '1.fedora.pool.ntp.org/A' (in '.'?): disabling EDNS
which I cannot understand, but would like to get rid of.

My firewall ports are open, and things work well right after a named restart, but I certainly wouldn't like doing it after each reboot of the server.

Can anyone tell me what the problem is? Is it a bug in named?

I had added this entry to the named.conf file to listen on the ethernet interface:
Code:

        listen-on port 53 { 127.0.0.1; 192.168.1.6; };
        listen-on-v6 port 53 { ::1; };


Mr. C. 08-02-2008 03:57 AM

Have you verified that the interface is actually up and working at the point named starts?

To eliminate the edns timeouts, add:

Code:

logging {
    ...
    category edns-disabled { null; };
    ...
}

to named.conf.

algogeek 08-02-2008 11:25 AM

Quote:

Originally Posted by Mr. C. (Post 3234053)
Have you verified that the interface is actually up and working at the point named starts?

To eliminate the edns timeouts, add:

Code:

logging {
    ...
    category edns-disabled { null; };
    ...
}

to named.conf.

Thanks, I added that part to named.conf, and restarted named. I am yet to see the results, but it seems like its working. Thanks a ton.

About the listening issue, that is something that had also occurred to me, but I didn't know how to do it. Some pointers please.

Mr. C. 08-02-2008 12:54 PM

You can test the theory by adding a line to the /etc/rc.d/named script that shows the output of ifconfig -a. Add the line:

ifconfig -a > /tmp/testing.out

somewhere near the top. Then either reboot, or bring the system down to run level 1 and back up to either 3 or 5 as is normal for you (stated in /etc/inittab). Check the contents of /tmp/testing.out. Either eth0 will exist and be up, or not.

If eth0 is not up, look in /var/log/messages and /var/log/dmesg for clues as to eth0.

It is possible it is coming up slowly, and/or named is started before the interface is fully ready.

The scripts in /etc/init.d are run in numeric order. I don't recall what scripts exist in Fedora. If there is a named or bind startup/stop script, determine its number and determine where it is relative to the script that starts up networking.

If this isn't clear, show output of :

ls -ld /etc/rc2.d/* /etc/rc3.d/*

Your goal is to

Chobel 09-04-2008 03:08 PM

I had the same problem, and the way I fixed it is as follows

Using system-config-services:

1. Disable "Network Manager" from the list of services at boot-up time
2. Enable "network"

Using system-config-network:

1. Uncheck the "Controlled by NetworkManager" from the Device (in my case eth0)

Reboot the machine and presto!

I don't have a good explanation, but I think if Bind is started before the computer acquires an IP address (by Network Manager) then it won't Listen on the IP address that doesn't know at that time.


All times are GMT -5. The time now is 03:23 AM.