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 ...
随机推荐
- SharePoint : 使用SPQuery对象时要注意的事项
转:http://www.cnblogs.com/chenxizhang/archive/2009/10/23/1588415.html 我们经常需要对一个列表进行查询,此时最灵活的方式就是直接使用S ...
- 社区商业试玩O2O:良渚文化村新街坊牵手阿里巴巴
在电商时代,越来越多的人选择便捷的网上购物,使得实体商业受到了不小的冲击,各种大型的购物中心.购物广场已经不再那么人气十足,因此一些特色商业街区.社区商业频频出现,也不乏一些新玩儿法. 阿里巴巴(专题 ...
- [CODEVS1048]石子归并
时间限制: 1 s 空间限制: 128000 KB 题目等级 : 黄金 Gold 题目描述 Description 有n堆石子排成一列,每堆石子有一个重量w[i], 每次合并可以合并相邻的两堆石子 ...
- vijosP1092 全排列
vijosP1092 全排列 链接:https://vijos.org/p/1092 [思路] 数学+搜索. 根据序号依次确定每一个数. 首先我们可以把未选的数看作一个可选择集合,其次把寻找过程看作一 ...
- iOS开发——View的透明属性hidden、alpha、opaque
Hidden.Alpha.Opaque的区别 在iOS中,每个View都有Hidden.Alpha.Opaque三个关于透明的属性,官方文档介绍如下: 1. @property(nonatomic) ...
- 全面产品管理-从细微处认识"用户体验"
转载: 让我以一个故事开始本文,我觉得这个故事能概括大多数人听到“用户体验”这个术语时的想法. 我经常访问的一个财经网站给我发了一封电子邮件,请求我点击里面的一个链接,对一些信息进行审核.所以我就点了 ...
- HW3.15
import java.util.Scanner; public class Solution { public static void main(String[] args) { int lotte ...
- CentOS的Redis内存分配策略配置
安装了一主两从节点,启动之后发现有一个警告: 大概是说overcommit_memory设置成了0,在低内存环境下后台保存可能会失败,设置成1重启可解决. 然后,不太懂这个配置的含义,google一把 ...
- usb 设备的端点 及输入输出方向
- 数据库ACID和CAP理论
1.ACID是RDBMS的理论基石: A原子(Atomiclty )事务原子性: C一致(Consistency)插入一张表数据,会 影响其它(索引/其它表)等一致. I ...