手机版
你好,游客 登录 注册
背景:
阅读新闻

一次关于DNS服务器的故障排错记录——RNDC故障

[日期:2012-03-30] 来源:Linux社区  作者:dgd2010 [字体:大 中 小]

说明:这是一篇对DNS排错的文章,因为在网上(包括RedHat知识库)几乎没有对文中提到的错误进行直接描述和提出最好最快的解决方案的报告,经过长达尽一个小时的排错和资料查阅才有了这篇文章的脱稿。

昨天我刚刚在非生产环境中的Red Hat Enterprise Linux Server上配置了一台DNS服务器,以做测试使用。但是很快遇到了一个奇怪的错误。

我在执行“service named status”后,其中第一行显示如下内容:
 

  1. [root@localhost ~]# service named status 
  2. rndc: connect failed: 127.0.0.1#953: connection refused 
  3. named (pid  6207) is running... 
  4. [root@localhost ~]#  

一般大家都知道,rndc 主要是用来控制named进程及其配置文件的,可以用来连接DNS服务器并对配置进行重新载入,其端口号就是953。那么导致这个错误的原因可能是什么呢?

我的解决思路:

首先,发现问题,仔细阅读查看命令的回显信息。例如我详细的查看service的状态信息。

  1. [root@localhost gdd]# service --status-all 
  2. abrtd (pid  2371) is running... 
  3. abrt-dump-oops (pid 2379) is running... 
  4. acpid (pid  2111) is running... 
  5. atd (pid  5396) is running... 
  6. auditd (pid  1833) is running... 
  7. automount (pid  2195) is running... 
  8. avahi-daemon (pid  2016) is running... 
  9. Usage: /etc/init.d/bluetooth {start|stop} 
  10. certmonger is stopped 
  11. Stopped 
  12. cgred is stopped 
  13. Frequency scaling enabled using ondemand governor 
  14. crond (pid  2423) is running... 
  15. cupsd (pid  2086) is running... 
  16. dnsmasq is stopped 
  17. dovecot is stopped 
  18. Usage: /etc/init.d/firstboot {start|stop} 
  19. hald (pid  2120) is running... 
  20. I don't know of any running hsqldb server. 
  21. httpd (pid  6595) is running... 
  22. Table: filter 
  23. Chain INPUT (policy ACCEPT) 
  24. num  target     prot opt source               destination          
  25. 1    ACCEPT     all      ::/0                 ::/0                state RELATED,ESTABLISHED  
  26. 2    ACCEPT     icmpv6    ::/0                 ::/0                 
  27. 3    ACCEPT     all      ::/0                 ::/0                 
  28. 4    ACCEPT     tcp      ::/0                 ::/0                state NEW tcp dpt:22  
  29. 5    REJECT     all      ::/0                 ::/0                reject-with icmp6-adm-prohibited  
  30.  
  31. Chain FORWARD (policy ACCEPT) 
  32. num  target     prot opt source               destination          
  33. 1    REJECT     all      ::/0                 ::/0                reject-with icmp6-adm-prohibited  
  34.  
  35. Chain OUTPUT (policy ACCEPT) 
  36. num  target     prot opt source               destination          
  37.  
  38. IPsec stopped 
  39. Table: filter 
  40. Chain INPUT (policy ACCEPT) 
  41. num  target     prot opt source               destination          
  42. 1    ACCEPT     all  --  0.0.0.0/0            0.0.0.0/0           state RELATED,ESTABLISHED  
  43. 2    ACCEPT     icmp --  0.0.0.0/0            0.0.0.0/0            
  44. 3    ACCEPT     all  --  0.0.0.0/0            0.0.0.0/0            
  45. 4    ACCEPT     tcp  --  10.0.0.0/8           0.0.0.0/0           tcp dpt:953  
  46. 5    ACCEPT     tcp  --  10.0.0.0/8           0.0.0.0/0           tcp dpt:53  
  47. 6    ACCEPT     tcp  --  10.0.0.0/8           0.0.0.0/0           tcp dpt:443  
  48. 7    ACCEPT     tcp  --  0.0.0.0/0            0.0.0.0/0           state NEW tcp dpt:22  
  49. 8    REJECT     all  --  0.0.0.0/0            0.0.0.0/0           reject-with icmp-host-prohibited  
  50.  
  51. Chain FORWARD (policy ACCEPT) 
  52. num  target     prot opt source               destination          
  53. 1    REJECT     all  --  0.0.0.0/0            0.0.0.0/0           reject-with icmp-host-prohibited  
  54.  
  55. Chain OUTPUT (policy ACCEPT) 
  56. num  target     prot opt source               destination          
  57.  
  58. Table: mangle 
  59. Chain PREROUTING (policy ACCEPT) 
  60. num  target     prot opt source               destination          
  61.  
  62. Chain INPUT (policy ACCEPT) 
  63. num  target     prot opt source               destination          
  64.  
  65. Chain FORWARD (policy ACCEPT) 
  66. num  target     prot opt source               destination          
  67.  
  68. Chain OUTPUT (policy ACCEPT) 
  69. num  target     prot opt source               destination          
  70.  
  71. Chain POSTROUTING (policy ACCEPT) 
  72. num  target     prot opt source               destination          
  73.  
  74. Table: nat 
  75. Chain PREROUTING (policy ACCEPT) 
  76. num  target     prot opt source               destination          
  77.  
  78. Chain POSTROUTING (policy ACCEPT) 
  79. num  target     prot opt source               destination          
  80.  
  81. Chain OUTPUT (policy ACCEPT) 
  82. num  target     prot opt source               destination          
  83.  
  84. irqbalance (pid  1895) is running... 
  85. Kdump is operational 
  86. started 
  87. qpidd is stopped 
  88. matahari-qmf-hostd is stopped 
  89. matahari-qmf-networkd is stopped 
  90. matahari-qmf-serviced is stopped 
  91. matahari-qmf-sysconfigd is stopped 
  92. Checking for mcelog 
  93. mcelog is stopped 
  94. mdmonitor is stopped 
  95. messagebus (pid  1993) is running... 
  96. mysqld is stopped 
  97. rndc: connect failed: 127.0.0.1#953: connection refused 
  98. named is stopped 
  99. No open transaction 
  100. netconsole module not loaded 
  101. Configured devices: 
  102. lo eth0 
  103. Currently active devices: 
  104. lo eth0 
  105. NetworkManager (pid  2004) is running... 
  106. rpc.svcgssd is stopped 
  107. rpc.mountd is stopped 
  108. nfsd is stopped 
  109. rpc.rquotad is stopped 
  110. rpc.statd (pid  2037) is running... 
  111. nmbd is stopped 
  112. ntpd (pid  2243) is running... 
  113. oddjobd is stopped 
  114. portreserve (pid  1851) is running... 
  115. master (pid  2347) is running... 
  116. postmaster is stopped 
  117. Process accounting is disabled. 
  118. qpidd (pid  2390) is running... 
  119. quota_nld is stopped 
  120. rdisc is stopped 
  121. restorecond (pid 10836) is running... 
  122. rhnsd (pid  2445) is running... 
  123. rhsmcertd (pid 2457 2456) is running... 
  124. rngd is stopped 
  125. rpcbind (pid  1909) is running... 
  126. rpc.gssd is stopped 
  127. rpc.idmapd (pid 2076) is running... 
  128. rpc.svcgssd is stopped 
  129. rsyslogd (pid  1858) is running... 
  130. sandbox is stopped 
  131. saslauthd is stopped 
  132. sfcb is not running, but pid file exists 
  133. smartd is stopped 
  134. smbd is stopped 
  135. snmpd is stopped 
  136. snmptrapd is stopped 
  137. spamd is stopped 
  138. spice-vdagentd is stopped 
  139. openssh-daemon (pid  2233) is running... 
  140. sssd is stopped 
  141. CIM server (2470) is runningtomcat6 is stopped             [  OK  ] 
  142. vsftpd is stopped 
  143. wdaemon is stopped 
  144. Webmin (pid 2498) is running 
  145. wpa_supplicant (pid  2020) is running... 
  146. ypbind is stopped 

很显然,上面的显示中的第97行显示的

  • rndc: connect failed: 127.0.0.1#953: connection refused 
  • named is stopped

是错误的信息。

linux
相关资讯       DNS服务器 
本文评论   查看全部评论 (0)
表情: 表情 姓名: 字数

       

评论声明
  • 尊重网上道德,遵守中华人民共和国的各项有关法律法规
  • 承担一切因您的行为而直接或间接导致的民事或刑事法律责任
  • 本站管理人员有权保留或删除其管辖留言中的任意内容
  • 本站有权在网站内转载或引用您的评论
  • 参与本评论即表明您已经阅读并接受上述条款