Bug 461913

Summary: BIND 9.5.0-P2 fails to start up - 'files' limit (128)
Product: [Fedora] Fedora Reporter: Wolfgang Rupprecht <wolfgang.rupprecht>
Component: bindAssignee: Adam Tkac <atkac>
Status: CLOSED DUPLICATE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: high Docs Contact:
Priority: medium    
Version: rawhideCC: atkac, ovasik
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2008-09-22 13:14:53 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
strace output none

Description Wolfgang Rupprecht 2008-09-11 12:16:50 UTC
Description of problem:

BIND 9.5.0-P2 fails to start up complaining of an internal files limit mismatch.

Version-Release number of selected component (if applicable):

BIND 9.5.0-P2

How reproducible:

every time

Steps to Reproduce:
1. start bind
2. watch it fail
3.
  
Actual results:
bind fails to open the ip and ipv6 udp sockets complaining of an internal files limit mismatch

Expected results:
bind runs as before without problems opening udp sockets

Additional info:

Sep 10 04:24:18 arbol named[20283]: starting BIND 9.5.0-P2 -u named
Sep 10 04:24:18 arbol named[20283]: found 1 CPU, using 1 worker thread
Sep 10 04:24:18 arbol named[20283]: loading configuration from '/etc/named.conf'
Sep 10 04:24:18 arbol named[20283]: the working directory is not writable
Sep 10 04:24:18 arbol named[20283]: the 'files' limit (128) is less than FD_SETSIZE (1024), increase 'files' in named.conf or recompile with a smaller FD_SETSIZE.
Sep 10 04:24:18 arbol named[20283]: less than 128 UDP sockets available after applying 'reserved-sockets' and 'files'
Sep 10 04:24:18 arbol named[20283]: listening on IPv6 interfaces, port 53
Sep 10 04:24:18 arbol named[20283]: could not listen on UDP socket: address family not supported
Sep 10 04:24:18 arbol named[20283]: listening on all IPv6 interfaces failed
Sep 10 04:24:18 arbol named[20283]: listening on IPv4 interface lo, 127.0.0.1#53
Sep 10 04:24:18 arbol named[20283]: could not listen on UDP socket: address family not supported
Sep 10 04:24:18 arbol named[20283]: creating IPv4 interface lo failed; interface ignored
Sep 10 04:24:18 arbol named[20283]: listening on IPv4 interface eth0, 64.142.50.224#53
Sep 10 04:24:18 arbol named[20283]: could not listen on UDP socket: address family not supported
Sep 10 04:24:18 arbol named[20283]: creating IPv4 interface eth0 failed; interface ignored
Sep 10 04:24:18 arbol named[20283]: listening on IPv4 interface eth1, 192.83.197.1#53
Sep 10 04:24:18 arbol named[20283]: could not listen on UDP socket: address family not supported
Sep 10 04:24:18 arbol named[20283]: creating IPv4 interface eth1 failed; interface ignored
Sep 10 04:24:18 arbol named[20283]: not listening on any interfaces
Sep 10 04:24:18 arbol named[20283]: default max-cache-size (33554432) applies: view recursive
Sep 10 04:24:18 arbol named[20283]: server.c:1285: unexpected error:
Sep 10 04:24:18 arbol named[20283]: unable to obtain neither an IPv4 nor an IPv6 dispatch
Sep 10 04:24:18 arbol named[20283]: listening on IPv6 interfaces, port 53
Sep 10 04:24:18 arbol named[20283]: could not listen on UDP socket: address family not supported
Sep 10 04:24:18 arbol named[20283]: listening on all IPv6 interfaces failed
Sep 10 04:24:18 arbol named[20283]: additionally listening on IPv4 interface lo, 127.0.0.1#53
Sep 10 04:24:18 arbol named[20283]: could not listen on UDP socket: address family not supported
Sep 10 04:24:18 arbol named[20283]: creating IPv4 interface lo failed; interface ignored
Sep 10 04:24:18 arbol named[20283]: additionally listening on IPv4 interface eth0, 64.142.50.224#53
Sep 10 04:24:18 arbol named[20283]: could not listen on UDP socket: address family not supported
Sep 10 04:24:18 arbol named[20283]: creating IPv4 interface eth0 failed; interface ignored
Sep 10 04:24:18 arbol named[20283]: additionally listening on IPv4 interface eth1, 192.83.197.1#53
Sep 10 04:24:18 arbol named[20283]: could not listen on UDP socket: address family not supported
Sep 10 04:24:18 arbol named[20283]: creating IPv4 interface eth1 failed; interface ignored
Sep 10 04:24:18 arbol named[20283]: loading configuration: unexpected error
Sep 10 04:24:18 arbol named[20283]: exiting (due to fatal error)

Temporary workaround:
The workaround is to add "files 1024;" to the options section in
named.conf.  (I can't believe bind really thinks it needs 1024 files
open at one point.)

.../etc/named.conf:

options {
        ...
	// Sep 10 04:24:18 arbol named[20283]: the 'files' limit (128)
	// is less than FD_SETSIZE (1024), increase 'files' in
	// named.conf or recompile with a smaller FD_SETSIZE.
	//
	files 1024;     // needed on BIND 9.5.0-P2 -u named -wsr 2008-09-10
        ...
};

Comment 1 Adam Tkac 2008-09-11 15:31:22 UTC
I'm not able to reproduce problem on my machine. Could you please attach output from "strace /usr/sbin/named -gunamed", please? Thanks

Comment 2 Wolfgang Rupprecht 2008-09-11 15:52:52 UTC
Created attachment 316453 [details]
strace output

attached is the strace output from a failed run

Comment 3 Adam Tkac 2008-09-11 16:36:14 UTC
Hm, strace says

...
getrlimit(RLIMIT_NOFILE, {rlim_cur=128, rlim_max=128}) = 0
...

It seems you have to configured to small open files limit by default. Would it be possible try increase it, please?

This change (= checking of open files limit) was needed due recent CVE-2008-1447 and performance problems.

Comment 4 Wolfgang Rupprecht 2008-09-11 16:48:08 UTC
I can certainly increase the limit via the named.conf config file (and have done so to get it running).  I'm just concerned that the compiled in limits as delivered by the fedora RPM don't set a good initial value.

The error message leads me to believe that the correct initial compiled in value should be 1024 (FD_SETSIZE).

Comment 5 Adam Tkac 2008-09-11 17:19:45 UTC
This problem is due bug #461458 in kernel.

Comment 6 Adam Tkac 2008-09-22 13:14:53 UTC

*** This bug has been marked as a duplicate of bug 461458 ***