DNS Literacy Series 6: use logs to troubleshoot BIND faults

Source: Internet
Author: User


DNS Literacy Series 6, the root cause of tracing is that it is not good at (or unknown) using the running logs provided by the software itself to solve the problem. This article briefly describes BIND server logs. Here, we assume that a netizen reported that the domain name resolution service configured after the named process is started does not work. This simple problem shows how to use the named log to solve the problem. First, let's take a look at a named startup parameter: "-g". This parameter can display the details of the named startup process. Naturally, the question is clearly displayed. Www.2cto.com [root @ test ~] # Named-gc/var/named/etc/named. conf02-Jan-2010 11:05:54. 687 starting BIND 9.5.1-P3-gc/var/named/etc/named. conf02-Jan-2010 11:05:54. 687 found 1 CPU, using 1 worker thread02-Jan-2010 11:05:54. 688 using up to 4096 sockets02-Jan-2010 11:05:54. 697 loading configuration from '/var/named/etc/named. conf '02-Jan-2010 11:05:54. 698/var/named/etc/named. conf: 45: missing '; 'before' key' 02-Jan-2010 11:05:54. 6 98 loading configuration: failure02-Jan-2010 11:05:54. 698 exiting (due to fatal error) We can see the log prompt in named. the 45th lines in the conf file write less ";". Well, it's easy to locate the troubleshooting problem. Open named. conf and add. [Root @ test ~] # Named-gc/var/named/etc/named. conf02-Jan-2010 11:06:33. 807 starting BIND 9.5.1-P3-gc/var/named/etc/named. conf02-Jan-2010 11:06:33. 807 found 1 CPU, using 1 worker thread02-Jan-2010 11:06:33. 808 using up to 4096 sockets02-Jan-2010 11:06:33. 817 loading configuration from '/var/named/etc/named. conf '02-Jan-2010 11:06:33. 819 using default UDP/IPv4 port range: [49152,655 35] 02-Jan-2010 11:06:33. 819 u Sing default UDP/IPv6 port range: [49152,655 35] 02-Jan-2010 11:06:33. 821 no IPv6 interfaces found02-Jan-2010 11:06:33. 821 listening on IPv4 interface re0, 192.168.0.20 #5302-Jan-2010 11:06:33. 822 listening on IPv4 interface re0, 192.168.0.10 #5302-Jan-2010 11:06:33. 823 listening on IPv4 interface lo0, 127.0.0.1 #5302-Jan-2010 11:06:33. 832 command channel listening on 127.0.0.1 #95302-Jan-2010 11:06:33. 833 ignoring config file logging statement due to-g option02-Jan-2010 11:06:33. 840 zone 127. IN-ADDR.ARPA/IN: loaded serial 102-Jan-2010 11:06:33. 840 zone test.com/IN: loaded serial 91220062002-Jan-2010 11:06:33. 841 running02-Jan-2010 11:06:33. 841 zone test.com/IN: sending notifies (serial 912200620) troubleshooting. The above method applies to the following situations: 1. debug named after BIND is installed to see if there are any problems. 2. a fatal error occurs. The named Operation is interrupted. 3. Non-important DNS servers can be shut down for inspection. If you do not want to stop a running DNS server, it is not appropriate to use the above method to discover potential problems. This requires that we allow named to record logs to specialized files for query at any time. The specific operation is in named. conf configuration log: logging {channel warning {file "log/named. log "versions 3 size 2048 k; severity warning; print-category yes; print-severity yes; print-time yes ;}; channel query {file" log/query. log "versions 3 size 2048 k; severity info; print-category yes; print-severity yes; print-time yes ;}; category default {warning ;}; category queries {query ;};}; www.2cto.com here we have the named Operation log and the daily query log recorded in the named In the. log and query. log files. Finally, test whether the resolution is normal: [root @ test ~] # Dig @ localhost www.test.com; <> DiG 9.5.1-P3 <> @ localhost www.test.com; (1 server found); global options: printcmd; Got answer :;; -> HEADER <-opcode: QUERY, status: NOERROR, id: 45637; flags: qr aa rd; QUERY: 1, ANSWER: 1, AUTHORITY: 3, ADDITIONAL: 3; WARNING: recursion requested but not available; question section:; www.test.com. in a; answer section: www.test.com. 3600 in a 12.1.1.1 ;; Authority section: test.com. 172800 in ns ns2.test.com.test.com. 172800 in ns ns1.test.com.test.com. 172800 in ns ns3.test.com .;; additional section: ns1.test.com. 3600 in a 12.2.2.2ns2.test.com. 3600 in a 12.3.3.3ns3.test.com. 3600 in a 12.4.4.4; Query time: 29 msec; SERVER: 127.0.0.1 #53 (127.0.0.1); WHEN: Sat Jan 2 11:48:03 2010 ;; msg size rcvd: 148 because it is intended for novice users, further details are not described here.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.