[opensuse] Why Bind dies, where is its log file?
Hi, My Bind daemon dies but I do not know why. I want to debug my system but I am not sure where bind error log file is? Does someone help me where I find bind error log file? Thanks, PS My system configuration: Opensuse-10.2 kernel-default-2.6.18.2-34 bind-9.3.2-56.3 Starting name server BIND - Warning: /var/lib/named/var/run/named/named.pid exists! It dies and leaves named.pid. I delete it then it runs but it dies after a minute leaving .pid file. -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 The Tuesday 2008-01-22 at 03:39 +0900, shigeru serizawa wrote:
Does someone help me where I find bind error log file?
It should be /var/log/messages (syslog) but also /var/lib/named/log if chrooted. - -- Cheers, Carlos E. R. -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.4-svn0 (GNU/Linux) iD8DBQFHlO5FtTMYHG2NR9URAi1NAJ9SrxeOGkDP3th3ez/SoZC5gp/TAgCffqqG yRJGapGxdtagN+H3CIqqeGk= =i+Ka -----END PGP SIGNATURE----- -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
shigeru serizawa wrote:
Hi,
My Bind daemon dies but I do not know why.
I want to debug my system but I am not sure where bind error log file is?
Does someone help me where I find bind error log file?
Thanks,
PS My system configuration: Opensuse-10.2 kernel-default-2.6.18.2-34 bind-9.3.2-56.3 Starting name server BIND - Warning: /var/lib/named/var/run/named/named.pid exists! ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
This shows you were BIND keeps records. So did you try looking in /var/lib/named/log?
It dies and leaves named.pid. I delete it then it runs but it dies after a minute leaving .pid file.
-- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
shigeru serizawa wrote:
Hi,
My Bind daemon dies but I do not know why.
I want to debug my system but I am not sure where bind error log file is?
Does someone help me where I find bind error log file?
Thanks,
PS My system configuration: Opensuse-10.2 kernel-default-2.6.18.2-34 bind-9.3.2-56.3 Starting name server BIND - Warning: /var/lib/named/var/run/named/named.pid exists! It dies and leaves named.pid. I delete it then it runs but it dies after a minute leaving .pid file.
Bind can be finicky on symtax. Unless debugging is turned up, you are not going to get a wealth of information from /var/log/messages. The following is part of a server howto I put together so I don't have to reinvent the wheel when I install a new server for the office. This is my configuration for bind where dhcpd provides dynamic update to the zone files. Section 3. is for bind config and section 4. is for dhcpd. This will leave you with a fully functioning dns for you local lan with forward and reverse lookups. Of course, you will have to change your ISP dns and configure the files to match your subnet. (Don't forget the "." at the end of the zone records for the reverse lookup zone and don't forget to update the "serial" before you start bind each time you manually edit the zone files. Hope it helps. Section 3. named BIND 9 DNS "Berkley Internet Nameservice Daemon Ver. 9 Domain Name Service" see: /usr/share/doc/packages/dhcp-server/DDNS-howto.txt make sure to edit /etc/sysconfig/named and add /etc/named.keys as an include file. The line should read: NAMED_CONF_INCLUDE_FILES="/etc/named.keys" Next, in /etc generate the DHCP_UPDATER key: genDDNSkey The genDDNSkey script is in /usr/share/doc/packages/dhcp-server/ Confirm the keys were created: david@nemesis:~> l /etc/Kdhcp_updater* -rw------- 1 root root 119 2005-12-08 23:35 /etc/Kdhcp_updater.+157+02929.key -rw------- 1 root root 145 2005-12-08 23:35 /etc/Kdhcp_updater.+157+02929.private Confirm named.keys and rndc.key exist and the permissions and ownership are correct root@bonza:/home/david # l /etc/*.key* -rw-r----- 1 root named 211 2008-01-04 23:09 /etc/named.keys -rw-r----- 1 root named 141 2008-01-02 21:11 /etc/rndc.key Create named.conf root@bonza:/srv/www/htdocs # cat /etc/named.conf #include "/etc/named.keys"; (may have to comment due to /etc/named.conf.local and /etc/sysconfig/named init calling /usr/share/bind/createNamedConfInclude) include "/etc/rndc.key"; controls { inet 127.0.0.1 allow { localhost; } keys { rndc-key; }; }; options { directory "/var/lib/named"; dump-file "/var/log/named_dump.db"; statistics-file "/var/log/named.stats"; forwarders { 208.180.42.68; 208.180.42.100; 68.1.208.30; }; forward first; #listen-on port 53 { 127.0.0.1; }; listen-on-v6 { none; }; notify no; }; zone "." in { type hint; file "root.hint"; }; zone "localhost" in { type master; file "localhost.zone"; }; zone "0.0.127.in-addr.arpa" in { type master; file "127.0.0.zone"; }; zone "rbpllc.com" in { file "dyn/rbpllc.com"; type master; allow-update{ key DHCP_UPDATER; }; }; zone "7.168.192.in-addr.arpa" in { file "dyn/192.168.7.zone"; type master; allow-update{ key DHCP_UPDATER; }; }; include "/etc/named.conf.include"; logging { category default { log_syslog; }; channel log_syslog { syslog; }; }; Create the domain specific zone files specified above ( "dyn/rbpllc.com" and "dyn/192.168.7.zone" ) in the /var/lib/named/dyn directory making sure to set the correct ownership and permissions on both the directories and files. File and directory ownership and permissions: root@bonza:/home/david # l /var/lib/named total 48 drwxr-xr-x 9 root root 4096 2007-09-21 18:56 ./ drwxr-xr-x 44 root root 4096 2008-01-05 22:01 ../ -rw-r--r-- 1 root root 192 2001-07-04 02:27 127.0.0.zone drwxr-xr-x 2 root root 4096 2008-01-04 15:37 dev/ drwxr-xr-x 2 named named 4096 2008-01-05 05:09 dyn/ drwxr-xr-x 3 root root 4096 2008-01-04 23:45 etc/ -rw-r--r-- 1 root root 158 2001-07-04 02:27 localhost.zone drwxr-xr-x 2 named named 4096 2007-09-21 19:12 log/ drwxr-xr-x 2 root root 4096 2007-09-21 19:12 master/ -rw-r--r-- 1 root root 2517 2007-09-21 19:13 root.hint drwxr-xr-x 2 named named 4096 2007-09-21 19:12 slave/ drwxr-xr-x 4 root root 4096 2008-01-02 21:10 var/ root@bonza:/srv/www/htdocs # l /var/lib/named/dyn drwxr-xr-x 9 root root 4096 2007-09-21 18:56 ../ -rw-r--r-- 1 named named 820 2008-01-04 23:36 192.168.7.zone -rw-r--r-- 1 named named 812 2008-01-04 23:31 rbpllc.com Create the "Forward" zone file: root@bonza:/srv/www/htdocs # cat /var/lib/named/dyn/rbpllc.com $ORIGIN . $TTL 172800 ; 2 days rbpllc.com IN SOA bonza.rbpllc.com. root.bonza.rbpllc.com. ( 2008010400 ; serial 10800 ; refresh (3 hours) 3600 ; retry (1 hour) 604800 ; expire (1 week) 86400 ; minimum (1 day) ) NS bonza.rbpllc.com. MX 0 bonza.rbpllc.com. $ORIGIN rbpllc.com. gw A 192.168.7.13 bonza A 192.168.7.15 ftp CNAME bonza mail CNAME bonza www CNAME bonza providence A 192.168.7.16 Create the "Reverse" zone file: root@bonza:/srv/www/htdocs # cat /var/lib/named/dyn/192.168.7.zone $ORIGIN . $TTL 172800 ; 2 days 7.168.192.in-addr.arpa IN SOA bonza.rbpllc.com. root.bonza.rbpllc.com. ( 2008010400 ; serial 10800 ; refresh (3 hours) 3600 ; retry (1 hour) 604800 ; expire (1 week) 86400 ; minimum (1 day) ) NS bonza.rbpllc.com. $ORIGIN 7.168.192.in-addr.arpa. 13 PTR gw.rbpllc.com. 15 PTR ftp.rbpllc.com. PTR www.rbpllc.com. PTR mail.rbpllc.com. PTR bonza.rbpllc.com. 16 PTR providence.rbpllc.com. Section 4. dhcpd "Dynamic Host Control Protocol Daemon" see: /usr/share/doc/packages/dhcp-server/DDNS-howto.txt make sure to edit /etc/sysconfig/dhcpd and add /etc/named.keys as an include file. The line should look like this: DHCPD_CONF_INCLUDE_FILES="/etc/named.keys" Create dhcpd.conf root@bonza:/srv/www/htdocs # cat /etc/dhcpd.conf # dhcpd.conf # # David Rankin config # # option definitions common to all supported networks... option domain-name "rbpllc.com"; option domain-name-servers 192.168.7.15; option routers 192.168.7.13; option ntp-servers 192.168.7.15; option netbios-name-servers 192.168.7.15; default-lease-time 28800; ddns-update-style interim; ddns-updates on; ignore client-updates; include "/etc/named.keys"; # If this DHCP server is the official DHCP server for the local # network, the authoritative directive should be uncommented. authoritative; subnet 192.168.7.0 netmask 255.255.255.0 { option domain-name "rbpllc.com"; ddns-domainname "rbpllc.com"; option subnet-mask 255.255.255.0; range dynamic-bootp 192.168.7.110 192.168.7.150; default-lease-time 28800; max-lease-time 172800; zone rbpllc.com. {primary 127.0.0.1; key DHCP_UPDATER; } zone 7.168.192.in-addr.arpa. { primary 127.0.0.1; key DHCP_UPDATER; } # # We want Rankin-P35a to appear at the same fixed address regardless of which OS is booted # to prevent multiple dhcp leases belonging to the same hardware address # host Rankin-P35a.rbpllc.com { hardware ethernet 00:11:f5:15:2d:83; fixed-address 192.168.7.101; } # we want the copier/scanner to appear at a fixed address host SC1FC09D { hardware ethernet 08:00:1F:1F:C0:9D; fixed-address 192.168.7.20; } } -- David C. Rankin, J.D., P.E. Rankin Law Firm, PLLC 510 Ochiltree Street Nacogdoches, Texas 75961 Telephone: (936) 715-9333 Facsimile: (936) 715-9339 www.rankinlawfirm.com -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
kill bind and run it with the -g flag: -g Run the server in the foreground and force all logging to stderr. Then watch it's death spasms LIVE FROM THE CONSOLE :) Linc Lincoln Rutledge Network Engineer OSC Networking 800-627-6420
shigeru serizawa <serizawakic@h7.dion.ne.jp> 01/21/08 1:39 PM >>> Hi,
My Bind daemon dies but I do not know why. I want to debug my system but I am not sure where bind error log file is? Does someone help me where I find bind error log file? Thanks, PS My system configuration: Opensuse-10.2 kernel-default-2.6.18.2-34 bind-9.3.2-56.3 Starting name server BIND - Warning: /var/lib/named/var/run/named/named.pid exists! It dies and leaves named.pid. I delete it then it runs but it dies after a minute leaving .pid file. -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
participants (5)
-
Aaron Kulkis
-
Carlos E. R.
-
David C. Rankin
-
Lincoln Rutledge
-
shigeru serizawa