rndc: connect failed: 127.0.0.1#953: connection refused
[root@localhost sbin]# ./named -v
bind 9.5.1-p3-v3.0.9
问题现象:
[root@localhost sbin]# ./rndc flush -p 10056
rndc: connect failed: 127.0.0.1#953: connection refused
问题分析:
看报错认为rndc使用的953端口,将端口换为953后报同样的错误
首先看了下bind的named.conf文件
......
include "/home/alipms/zxtest/bind981/etc/rndc.key";
controls {
inet 127.0.0.1 port 10056 allow { 127.0.0.1; } keys { "rndc-key"; };
};
......
再看下rndc.key
key "rndc-key" {
algorithm hmac-md5;
secret "zwKd/d9neRFzJ8v/FVB8oA==";
};
最后查看了下bind的启动日志:
......
23-Jan-2014 08:47:55.106 command channel listening on 127.0.0.1#10056
......
可以确定rndc使用的是10056端口
[root@localhost sbin]# ./rndc -h
Usage: rndc [-b address] [-c config] [-s server] [-p port]
[-k key-file ] [-y key] [-V] command
......
可以看到是rndc命令输入有误
解决方式:
将命令换为:
[root@localhost sbin]# ./rndc -p 10056 flush
查看bind日志为:
23-Jan-2014 09:15:33.387 received control channel command 'flush'
23-Jan-2014 09:15:33.388 flushing caches in all views succeeded
PS:
可以使用rndc-confgen直接生成rndc.key,rndc-confgen和rndc在同一目录下
[root@localhost sbin]# ./rndc-confgen -h
Usage:
rndc-confgen [-a] [-b bits] [-c keyfile] [-k keyname] [-p port] [-r randomfile] [-s addr] [-t chrootdir] [-u user]
-a: generate just the key clause and write it to keyfile (/home/alipms/zxtest/bind981/etc/rndc.key)
-b bits: from 1 through 512, default 128; total length of the secret
-c keyfile: specify an alternate key file (requires -a)
-k keyname: the name as it will be used in named.conf and rndc.conf
-p port: the port named will listen on and rndc will connect to
-r randomfile: source of random data (use "keyboard" for key timing)
-s addr: the address to which rndc should connect
-t chrootdir: write a keyfile in chrootdir as well (requires -a)
-u user: set the keyfile owner to "user" (requires -a)
[root@localhost sbin]# ./rndc-confgen -p 10056 > ./rndc.key
查看生成的rndc.key
# Start of rndc.conf
key "rndc-key" {
algorithm hmac-md5;
secret "FT/3Iknv/lqLDlJFp9MkkQ==";
}; options {
default-key "rndc-key";
default-server 127.0.0.1;
default-port 10056;
};
# End of rndc.conf # Use with the following in named.conf, adjusting the allow list as needed:
# key "rndc-key" {
# algorithm hmac-md5;
# secret "FT/3Iknv/lqLDlJFp9MkkQ==";
# };
#
# controls {
# inet 127.0.0.1 port 10056
# allow { 127.0.0.1; } keys { "rndc-key"; };
# };
# End of named.conf
然后将注释部分:
key "rndc-key" {
algorithm hmac-md5;
secret "FT/3Iknv/lqLDlJFp9MkkQ==";
};
controls {
inet 127.0.0.1 port 10056
allow { 127.0.0.1; } keys { "rndc-key"; };
};
拷贝至named.conf文件中或拷贝至特定文件中,然后将该文件include至named.conf文件中即可
rndc: connect failed: 127.0.0.1#953: connection refused的更多相关文章
- Bind 远程连接出现rndc: connect failed: 192.168.1.66#953: connection refused
远程连接IP地址为192.168.1.66的BIND DNS服务器,出现 rndc: connect failed: 192.168.1.66#953: connection refused 原因:1 ...
- connect failed: 127.0.0.1#953: connection refused
Problem1 : root@jeremy-VirtualBox:/etc/bind# /etc/init.d/bind9 restart * Stopping domain name servic ...
- 解决git Failed to connect to 127.0.0.1 port xxxx: Connection refused
某天,用git拉取,提交代码的时候出现了git Failed to connect to 127.0.0.1 port xxxx: Connection refused的问题, 开始百度,看了一通.都 ...
- 【MongoDB】 Failed to connect to 127.0.0.1:27017, reason: Connection refused
由于项目需要,在一台虚拟机上安装了MongoDB,但是在启动的时候,出现如下错误: [root@localhost bin]# ./mongo MongoDB shell version v3.4.0 ...
- Failed to connect to 127.0.0.1 port 1080: Connection refused package 问题解决方法
错误: fatal: unable to access 'https://github.com/******': Failed to connect to 127.0.0.1 port 1080: C ...
- zabbix-Get value from agent failed: cannot connect to [[127.0.0.1]:10050]: [111] Connection refused
监控zabbix服务端这台服务器,然后显示Get value from agent failed: cannot connect to [[127.0.0.1]:10050]: [111] Conne ...
- 我遇到的错误curl: (7) Failed to connect to 127.0.0.1 port 1086: Connection refused
今天我用curl命令,无论如何都是出现: curl: (7) Failed to connect to 127.0.0.1 port 1086: Connection refused 找了很久,不知道 ...
- curl: (7) Failed to connect to 127.0.0.1 port 1086: Connection refused
今天我用curl命令,无论如何都是出现: curl: (7) Failed to connect to 127.0.0.1 port 1086: Connection refused 找了很久,不知道 ...
- git时 Failed to connect to 127.0.0.1 port 1080: Connection refused
在公司换了一台电脑之后发现git clone 和 npm install都失败,报错为 fatal: unable to access 'https://github.com/netease-im/N ...
随机推荐
- poj炮兵阵地(状压)(25+10+20=55)
http://poj.org/problem?id=1185 刚开始思路就错了 想着用保存这一行的状态 然后再去枚举前面两行的状态 这样不能保证前面两行的状态同时满足要求 正解:保存两行的状态 再依次 ...
- Struts 2.3.1.1 命令执行漏洞
漏洞版本: Struts 2.3.1.1 漏洞描述: CVE ID:CVE-2011-3923 Struts2的核心使用的是WebWork框架,而WebWork通过XWork来处理用户的请求参数.Xw ...
- FZU2235 国王的出游 水题
因为只有1e5个点,所以直接离散化bfs就好 #include <cstdio> #include <cstring> #include <queue> #incl ...
- XML的SelectNodes使用方法以及XPath
XPath 是 XML 的内容,这里 SelectNodes 是 C# 中 XmlDocument 或 XmlNode 的一个方法.SelectNodes 使用 XPath 来选取节点. 重要语法 S ...
- Android 单字阅读
package com.desmand.screencapture; import android.app.Activity; import android.content.Intent; impor ...
- linux下mysql的表名问题
最近从win转移到了linux,在本机跑好的程序但在linux下一个SQL语句报了错误,发现是表名未找到,错误原因是在linux下mysql的表名是严格区分大小写的.. MYSQL在LINUX下数据库 ...
- ndk-gdb of NDK r9d modified to *always* debug the ":remote"-process of your app
https://gist.github.com/TomTasche/9690186 ndk-gdb of NDK r9d modified to *always* debug the ":r ...
- 原来DataTable的Distinct竟如此简单![转]
本文转自:http://www.cnblogs.com/BlueFly/archive/2009/01/08/1372151.html 有时我们需要从DataTable中抽取Distinct数据,以前 ...
- 问题-RZ安装后报错“RzBorder.pas”
错误象现:[Error] RzBorder.pas(1429): Number of elements differs from declaration [Fatal Error] RzEdit.pa ...
- 8-13-Exercise
链接:夜间活动 昨天的比赛好郁闷.......倒不是因为题目......在快要比赛的时候突然所有的网站都进不去了.......改了半天的DNS & IP......比赛都比了1个多小时才进去. ...