New installation of BIND on Oracle Linux
Mark Andrews
marka at isc.org
Tue Dec 1 23:33:33 UTC 2015
Do you have /var/named/etc/named.conf which is what named is attempting to
read based on the command line arguements?
daemon /usr/local/sbin/named -u named -t /var/named -c /etc/named.conf
Mark
In message <CADuSGK1hdJMAd=eixQdDevmGohFsLr2CGnKYPgPX7vkDucD-Ow at mail.gmail.com>
, chris liesfield writes:
> --===============7708246625151233221==
> Content-Type: multipart/alternative; boundary=001a114348e0679d7a0525de7a6b
>
> --001a114348e0679d7a0525de7a6b
> Content-Type: text/plain; charset=UTF-8
>
> Hi All.
>
> We've just installed BIND version "BIND 9.10.3 <id:2799933>" on Oracle
> Linux 6.5.
>
> Compiled from source, using defaults, with exception to the switches,
> '--with-openssl' '--enable-threads' '--with-libxml2'
>
> When attempting to start the daemon using the init.d script shown further
> below, we encounter the following error message:-
>
> Dec 2 10:15:37 sromelextdns02 named[5165]: BIND 9 is maintained by Internet
> Systems Consortium,
>
> Dec 2 10:15:37 sromelextdns02 named[5165]: Inc. (ISC), a non-profit
> 501(c)(3) public-benefit
>
> Dec 2 10:15:37 sromelextdns02 named[5165]: corporation. Support and
> training for BIND 9 are
>
> Dec 2 10:15:37 sromelextdns02 named[5165]: available at
> https://www.isc.org/support
>
> Dec 2 10:15:37 sromelextdns02 named[5165]:
> ----------------------------------------------------
>
> Dec 2 10:15:37 sromelextdns02 named[5165]: adjusted limit on open files
> from 4096 to 1048576
>
> Dec 2 10:15:37 sromelextdns02 named[5165]: found 4 CPUs, using 4 worker
> threads
>
> Dec 2 10:15:37 sromelextdns02 named[5165]: using 2 UDP listeners per
> interface
>
> Dec 2 10:15:37 sromelextdns02 named[5165]: using up to 4096 sockets
>
> *Dec 2 10:15:37 sromelextdns02 named[5165]: loading configuration from
> '/etc/named.conf' Dec 2 10:15:37 sromelextdns02 named[5165]: open:
> /etc/named.conf: file not found Dec 2 10:15:37 sromelextdns02 named[5165]:
> loading configuration: file not found *
>
> Dec 2 10:15:37 sromelextdns02 named[5165]: exiting (due to fatal error)
>
> We've disabled SELinux, thinking this may be the root cause, however it
> does not seem to make a difference.
>
> User named has been created and owns the relevant files.
>
> Any ideas on where we've gone wrong would be gratefully received, as we're
> stuck at this point ...
>
> /etc/named.conf below:-
>
> // SRO BIND configuration file
>
> // ... some name server ...
>
> // Written chapter and verse on 20130325 by Chris Liesfield
>
> // Last modified 201511271436 by Chris Liesfield
>
> options {
>
> directory "/var/named";
>
> pid-file "named.pid";
>
> allow-query { "any"; };
>
> also-notify { w.x.y.z; };
>
> recursion no;
>
> version "Not Telling";
>
> hostname none;
>
> querylog yes;
>
> };
>
> controls {
>
> inet 127.0.0.1 allow { localhost; } keys { rndc-key; };
>
> };
>
> key "rndc-key" {
>
> algorithm hmac-md5;
>
> secret "some secret";
>
> };
>
> controls {
>
> inet 127.0.0.1 port 953
>
> allow { 127.0.0.1; } keys { "rndc-key"; };
>
> };
>
> zone "." IN {
>
> type hint;
>
> file "named.cache";
>
> };
>
> zone "localhost" IN {
>
> type master;
>
> file "localhost.zone";
>
> allow-update { none; };
>
> };
>
> // ZONES //
>
> zone "0.0.127.in-addr.arpa" IN {
>
> type master;
>
> file "db.127.0.0";
>
> };
>
> include "/etc/rndc.key";
>
> logging {
>
> category "default" { "debug"; };
>
> category "general" { "debug"; };
>
> category "database" { "debug"; };
>
> category "security" { "debug"; };
>
> category "config" { "debug"; };
>
> category "resolver" { "debug"; };
>
> category "xfer-in" { "debug"; };
>
> category "xfer-out" { "debug"; };
>
> category "notify" { "debug"; };
>
> category "client" { "debug"; };
>
> category "unmatched" { "debug"; };
>
> category "network" { "debug"; };
>
> category "update" { "debug"; };
>
> category "queries" { "debug"; };
>
> category "dispatch" { "debug"; };
>
> category "dnssec" { "debug"; };
>
> category "lame-servers" { "debug"; };
>
> channel "debug" {
>
> file "/var/named/bind.log" versions 2 size 50m;
>
> print-time yes;
>
> print-category yes;
>
> };
>
> };
>
> Startup script below:-
>
> #!/bin/sh
>
> #
>
> # named This shell script takes care of starting and stopping
>
> # named (BIND DNS server).
>
> #
>
> # chkconfig: 345 55 45
>
> # description: named (BIND) is a Domain Name Server (DNS) \
>
> # that is used to resolve host names to IP addresses.
>
> # probe: true
>
> # Source function library.
>
> . /etc/rc.d/init.d/functions
>
> # Source networking configuration.
>
> . /etc/sysconfig/network
>
> # Check that networking is up.
>
> [ ${NETWORKING} = "no" ] && exit 0
>
> [ -f /usr/local/sbin/named ] || exit 0
>
> # See how we were called.
>
> case "$1" in
>
> start)
>
> # Start daemons.
>
> echo -n "Starting named: "
>
> daemon /usr/local/sbin/named -u named -t /var/named -c /etc/named.conf
>
> echo
>
> touch /var/lock/subsys/named
>
> ;;
>
> stop)
>
> # Stop daemons.
>
> echo -n "Shutting down named: "
>
> killproc named
>
> rm -f /var/lock/subsys/named
>
> echo
>
> ;;
>
> status)
>
> status named
>
> exit $?
>
> ;;
>
> restart)
>
> $0 stop
>
> $0 start
>
> exit $?
>
> ;;
>
> reload)
>
> /usr/local/sbin/rndc reload
>
> exit $?
>
> ;;
>
> probe)
>
> # named knows how to reload intelligently; we don't want linuxconf
>
> # to offer to restart every time
>
> /usr/local/sbin/rndc reload >/dev/null 2>&1 || echo start
>
> exit 0
>
> ;;
>
> *)
>
> echo "Usage: named {start|stop|status|restart|reload}"
>
> exit 1
>
> esac
>
> exit 0
>
> Your help is appreciated. Thanks in advance.
>
> Regards,
>
> *Chris Liesfield *
>
> BCompSc. (Dist), CISSP, CCNP/DP.
>
> *Manager - IT Facilities and Connectivity State Revenue Office Victoria *
>
> 121 Exhibition Street, Melbourne, 3000. *T* 03 9628 6735 *M* 0403 418558
>
> *E*
>
> *chris.liesfield at sro.vic.gov.au <chris.liesfield at sro.vic.gov.au>,
> sro.network at sro.vic.gov.au <sro.network at sro.vic.gov.au>*
>
> --001a114348e0679d7a0525de7a6b
> Content-Type: text/html; charset=UTF-8
> Content-Transfer-Encoding: quoted-printable
>
> <div dir=3D"ltr"><font size=3D"2" face=3D"Helv"><font size=3D"2" face=3D"He=
> lv"><p dir=3D"LTR">Hi All.</p>
>
> <p dir=3D"LTR">We've just installed BIND version "BIND 9.10.3 <=
> id:2799933>" on Oracle Linux 6.5.</p>
>
> <p dir=3D"LTR">Compiled from source, using defaults, with exception to the =
> switches, '--with-openssl' '--enable-threads' '--with-l=
> ibxml2'</p>
>
> <p dir=3D"LTR">When attempting to start the daemon using the init.d script =
> shown further below, we encounter the following error message:-</p>
>
> <p dir=3D"LTR">Dec 2 10:15:37 sromelextdns02 named[5165]: BIND 9 is mainta=
> ined by Internet Systems Consortium,</p>
> <p dir=3D"LTR">Dec 2 10:15:37 sromelextdns02 named[5165]: Inc. (ISC), a no=
> n-profit 501(c)(3) public-benefit</p>
> <p dir=3D"LTR">Dec 2 10:15:37 sromelextdns02 named[5165]: corporation. Su=
> pport and training for BIND 9 are</p>
> <p dir=3D"LTR">Dec 2 10:15:37 sromelextdns02 named[5165]: available at <a =
> href=3D"https://www.isc.org/support">https://www.isc.org/support</a></p>
> <p dir=3D"LTR">Dec 2 10:15:37 sromelextdns02 named[5165]: ----------------=
> ------------------------------------</p>
> <p dir=3D"LTR">Dec 2 10:15:37 sromelextdns02 named[5165]: adjusted limit o=
> n open files from 4096 to 1048576</p>
> <p dir=3D"LTR">Dec 2 10:15:37 sromelextdns02 named[5165]: found 4 CPUs, us=
> ing 4 worker threads</p>
> <p dir=3D"LTR">Dec 2 10:15:37 sromelextdns02 named[5165]: using 2 UDP list=
> eners per interface</p>
> <p dir=3D"LTR">Dec 2 10:15:37 sromelextdns02 named[5165]: using up to 4096=
> sockets</p>
> <b><p dir=3D"LTR">Dec 2 10:15:37 sromelextdns02 named[5165]: loading confi=
> guration from '/etc/named.conf'</p>
> <p dir=3D"LTR">Dec 2 10:15:37 sromelextdns02 named[5165]: open: /etc/named=
> .conf: file not found</p>
> <p dir=3D"LTR">Dec 2 10:15:37 sromelextdns02 named[5165]: loading configur=
> ation: file not found</p>
> </b><p dir=3D"LTR">Dec 2 10:15:37 sromelextdns02 named[5165]: exiting (due=
> to fatal error)</p>
>
> <p dir=3D"LTR">We've disabled SELinux, thinking this may be the root ca=
> use, however it does not seem to make a difference.</p>
>
> <p dir=3D"LTR">User named has been created and owns the relevant files.</p>
>
> <p dir=3D"LTR">Any ideas on where we've gone wrong would be gratefully =
> received, as we're stuck at this point ...</p>
>
> <p dir=3D"LTR">/etc/named.conf below:-</p>
>
> <p dir=3D"LTR">// SRO BIND configuration file</p>
> <p dir=3D"LTR">// ... some name server ...</p>
> <p dir=3D"LTR">// Written chapter and verse on 20130325 by Chris Liesfield<=
> /p>
> <p dir=3D"LTR">// Last modified 201511271436 by Chris Liesfield</p>
>
> <p dir=3D"LTR">options {</p>
> <p dir=3D"LTR"> directory "/var/named";</p>
> <p dir=3D"LTR"> pid-file "named.pid";</p>
> <p dir=3D"LTR"> allow-query { "any"; };</p>
> <p dir=3D"LTR"> also-notify { w.x.y.z; };</p>
> <p dir=3D"LTR"> recursion no;</p>
> <p dir=3D"LTR"> version "Not Telling";</p>
> <p dir=3D"LTR"> hostname none;</p>
> <p dir=3D"LTR"> querylog yes;</p>
> <p dir=3D"LTR">};</p>
>
> <p dir=3D"LTR">controls {</p>
> <p dir=3D"LTR"> inet 127.0.0.1 allow { localhost; } keys { rndc-key; =
> };</p>
> <p dir=3D"LTR">};</p>
>
> <p dir=3D"LTR">key "rndc-key" {</p>
> <p dir=3D"LTR"> algorithm hmac-md5;</p>
> <p dir=3D"LTR"> secret "some secret";</p>
> <p dir=3D"LTR">};</p>
>
> <p dir=3D"LTR">controls {</p>
> <p dir=3D"LTR"> inet 127.0.0.1 port 953</p>
> <p dir=3D"LTR"> allow { 127.0.0.1; } keys { "rndc-key"; };<=
> /p>
> <p dir=3D"LTR">};</p>
>
> <p dir=3D"LTR">zone "." IN {</p>
> <p dir=3D"LTR"> type hint;</p>
> <p dir=3D"LTR"> file "named.cache";</p>
> <p dir=3D"LTR">};</p>
>
> <p dir=3D"LTR">zone "localhost" IN {</p>
> <p dir=3D"LTR"> type master;</p>
> <p dir=3D"LTR"> file "localhost.zone";</p>
> <p dir=3D"LTR"> allow-update { none; };</p>
> <p dir=3D"LTR">};</p>
>
> <p dir=3D"LTR">// ZONES //</p>
>
> <p dir=3D"LTR">zone "0.0.127.in-addr.arpa" IN {</p>
> <p dir=3D"LTR"> type master;</p>
> <p dir=3D"LTR"> file "db.127.0.0";</p>
> <p dir=3D"LTR">};</p>
>
> <p dir=3D"LTR">include "/etc/rndc.key";</p>
>
> <p dir=3D"LTR">logging {</p>
> <p dir=3D"LTR">category "default" { "debug"; };</p>
> <p dir=3D"LTR">category "general" { "debug"; };</p>
> <p dir=3D"LTR">category "database" { "debug"; };</p>
> <p dir=3D"LTR">category "security" { "debug"; };</p>
> <p dir=3D"LTR">category "config" { "debug"; };</p>
> <p dir=3D"LTR">category "resolver" { "debug"; };</p>
> <p dir=3D"LTR">category "xfer-in" { "debug"; };</p>
> <p dir=3D"LTR">category "xfer-out" { "debug"; };</p>
> <p dir=3D"LTR">category "notify" { "debug"; };</p>
> <p dir=3D"LTR">category "client" { "debug"; };</p>
> <p dir=3D"LTR">category "unmatched" { "debug"; };</p>
> <p dir=3D"LTR">category "network" { "debug"; };</p>
> <p dir=3D"LTR">category "update" { "debug"; };</p>
> <p dir=3D"LTR">category "queries" { "debug"; };</p>
> <p dir=3D"LTR">category "dispatch" { "debug"; };</p>
> <p dir=3D"LTR">category "dnssec" { "debug"; };</p>
> <p dir=3D"LTR">category "lame-servers" { "debug"; };</p=
> >
> <p dir=3D"LTR">channel "debug" {</p>
> <p dir=3D"LTR">file "/var/named/bind.log" versions 2 size 50m;</p=
> >
> <p dir=3D"LTR">print-time yes;</p>
> <p dir=3D"LTR">print-category yes;</p>
> <p dir=3D"LTR">};</p>
> <p dir=3D"LTR">};</p>
>
> <p dir=3D"LTR">Startup script below:-</p>
>
> <p dir=3D"LTR">#!/bin/sh</p>
> <p dir=3D"LTR">#</p>
> <p dir=3D"LTR"># named This shell script takes care of starting a=
> nd stopping</p>
> <p dir=3D"LTR"># named (BIND DNS server).</p>
> <p dir=3D"LTR">#</p>
> <p dir=3D"LTR"># chkconfig: 345 55 45</p>
> <p dir=3D"LTR"># description: named (BIND) is a Domain Name Server (DNS) \<=
> /p>
> <p dir=3D"LTR"># that is used to resolve host names to IP addresses.</p>
> <p dir=3D"LTR"># probe: true</p>
>
> <p dir=3D"LTR"># Source function library.</p>
> <p dir=3D"LTR">. /etc/rc.d/init.d/functions</p>
>
> <p dir=3D"LTR"># Source networking configuration.</p>
> <p dir=3D"LTR">. /etc/sysconfig/network</p>
>
> <p dir=3D"LTR"># Check that networking is up.</p>
> <p dir=3D"LTR">[ ${NETWORKING} =3D "no" ] && exit 0</p>
>
> <p dir=3D"LTR">[ -f /usr/local/sbin/named ] || exit 0</p>
>
> <p dir=3D"LTR"># See how we were called.</p>
> <p dir=3D"LTR">case "$1" in</p>
> <p dir=3D"LTR"> start)</p>
> <p dir=3D"LTR"> # Start daemons.</p>
> <p dir=3D"LTR"> echo -n "Starting named: "</p>
> <p dir=3D"LTR"> daemon /usr/local/sbin/named -u named -t /var/named =
> -c /etc/named.conf</p>
> <p dir=3D"LTR"> echo</p>
> <p dir=3D"LTR"> touch /var/lock/subsys/named</p>
> <p dir=3D"LTR"> ;;</p>
> <p dir=3D"LTR"> stop)</p>
> <p dir=3D"LTR"> # Stop daemons.</p>
> <p dir=3D"LTR"> echo -n "Shutting down named: "</p>
> <p dir=3D"LTR"> killproc named</p>
> <p dir=3D"LTR"> rm -f /var/lock/subsys/named</p>
> <p dir=3D"LTR"> echo</p>
> <p dir=3D"LTR"> ;;</p>
> <p dir=3D"LTR"> status)</p>
> <p dir=3D"LTR"> status named</p>
> <p dir=3D"LTR"> exit $?</p>
> <p dir=3D"LTR"> ;;</p>
> <p dir=3D"LTR"> restart)</p>
> <p dir=3D"LTR"> $0 stop</p>
> <p dir=3D"LTR"> $0 start</p>
> <p dir=3D"LTR"> exit $?</p>
> <p dir=3D"LTR"> ;;</p>
> <p dir=3D"LTR"> reload)</p>
> <p dir=3D"LTR"> /usr/local/sbin/rndc reload</p>
> <p dir=3D"LTR"> exit $?</p>
> <p dir=3D"LTR"> ;;</p>
> <p dir=3D"LTR"> probe)</p>
> <p dir=3D"LTR"> # named knows how to reload intelligently; we don=
> 9;t want linuxconf</p>
> <p dir=3D"LTR"> # to offer to restart every time</p>
> <p dir=3D"LTR"> /usr/local/sbin/rndc reload >/dev/null 2>&=
> 1 || echo start</p>
> <p dir=3D"LTR"> exit 0</p>
> <p dir=3D"LTR"> ;;</p>
>
> <p dir=3D"LTR"> *)</p>
> <p dir=3D"LTR"> echo "Usage: named {start|stop|status|restart|r=
> eload}"</p>
> <p dir=3D"LTR"> exit 1</p>
> <p dir=3D"LTR">esac</p>
>
> <p dir=3D"LTR">exit 0</p>
>
> <p dir=3D"LTR">Your help is appreciated. Thanks in advance.</p>
>
> <p dir=3D"LTR">Regards,</p>
>
> <b><p dir=3D"LTR">Chris Liesfield</p>
> </b></font></font><font size=3D"1" face=3D"Helv"><font size=3D"1" face=3D"H=
> elv"><p dir=3D"LTR">BCompSc. (Dist), CISSP, CCNP/DP.</p>
> </font></font><b><font size=3D"2" face=3D"Helv"><font size=3D"2" face=3D"He=
> lv"><p dir=3D"LTR">Manager - IT Facilities and Connectivity</p>
> <p dir=3D"LTR">State Revenue Office Victoria</p>
> </font></font></b><font size=3D"2" face=3D"Helv"><font size=3D"2" face=3D"H=
> elv"></font></font><font size=3D"1" face=3D"Helv"><font size=3D"1" face=3D"=
> Helv"><p dir=3D"LTR">121 Exhibition Street, Melbourne, 3000. <b>T</b> 03 96=
> 28 6735 <b>M</b> 0403 418558</p>
> <b><p>E</p></b><p> <u><a href=3D"mailto:chris.liesfield at sro.vic.gov.au">chr=
> is.liesfield at sro.vic.gov.au</a>, <a href=3D"mailto:sro.network at sro.vic.gov.=
> au">sro.network at sro.vic.gov.au</a></u></p></font><p></p></font><p></p><div =
> class=3D"gmail_signature"><div><div>=C2=A0</div><div><span style=3D"font-fa=
> mily:Vollkorn,"Lucida Grande","Lucida Sans",sans-serif;=
> font-size:20px;font-style:italic"><pre style=3D"line-height:12px;font-famil=
> y:"Droid Sans Mono","Lucida Console","Andale Mono&=
> quot;,"Courier New",Courier,monospace;font-size:12px;font-style:n=
> ormal;font-weight:normal">=20
> </pre></span></div></div></div>
> </div>
>
> --001a114348e0679d7a0525de7a6b--
>
> --===============7708246625151233221==
> Content-Type: text/plain; charset="us-ascii"
> MIME-Version: 1.0
> Content-Transfer-Encoding: 7bit
> Content-Disposition: inline
>
> _______________________________________________
> Please visit https://lists.isc.org/mailman/listinfo/bind-users to unsubscribe
> from this list
>
> bind-users mailing list
> bind-users at lists.isc.org
> https://lists.isc.org/mailman/listinfo/bind-users
> --===============7708246625151233221==--
--
Mark Andrews, ISC
1 Seymour St., Dundas Valley, NSW 2117, Australia
PHONE: +61 2 9871 4742 INTERNET: marka at isc.org
More information about the bind-users
mailing list