telnet: connect to address 127.0.0.1: Connection refused问题
来源:互联网 发布:大数据技能大赛试题 编辑:程序博客网 时间:2024/05/17 04:46
今天在使用telnet连接本机的Memcached服务时,遇到如下问题:
[root@iZ94imebuqwZ ~]# telnet localhost 11211Trying ::1...
telnet: connect to address ::1: Connection refused
Trying 127.0.0.1...
telnet: connect to address 127.0.0.1: Connection refused解决:【请确保memcached已成功安装,且已开启memcached服务】
- 检查telnet是否已安装:[root@iZ94imebuqwZ ~]# rpm -qa telnet
telnet-0.17-41.e15 【有输出说明已安装,如果没有输出则没有安装,使用yum install telnet进行安装】 - 检查telnet-server是否已安装:[root@iZ94imebuqwZ ~]# rpm -qa telnet-server
telnet-server-0.17-41.el5 【有输出说明已安装,如果没有输出则没有安装,使用yum install telnet-server进行安装】 如果第2步进行了telnet-server安装操作,且已成功安装,则由于telnet服务是由xinetd守护的,所以我们需要重新启动xinetd。
[root@iZ94imebuqwZ ~]# service xinetd restart
Stopping xinetd: [ OK ]
Starting xinetd: [OK ]- xinetd启动成功,可以查看xinetd的运行情况。【非必须】[root@iZ94imebuqwZ ~]# netstat -tnlp 【或使用netstat -tnl | grep 23只查看目标端口】
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name
tcp 0 0 0.0.0.0:11211 0.0.0.0:* LISTEN 1866/memcached
tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN 343/sshd
tcp 0 0 0.0.0.0:23 0.0.0.0:* LISTEN 8923/xinetd
[root@iZ94imebuqwZ ~]#
[root@iZ94imebuqwZ ~]#
[root@iZ94imebuqwZ ~]# telnet localhost 23
Trying ::1...
Connected to localhost.
Escape character is '^]'.
CentOS release 5.10 (Final)
Kernel 2.6.18-371.11.1.el5 on an x86_64
login: - 如果仍然无法连接到telnet,需要修改/etc/xinetd.d/telnet文件。【非必须】[root@iZ94imebuqwZ ~]# vim /etc/xinetd.d/telnet
# default: on
# description: The telnet server serves telnet sessions; it uses \
# unencrypted username/password pairs for authentication.
service telnet
{
flags = REUSE
socket_type = stream
wait = no
user = root
server = /usr/sbin/in.telnetd
log_on_failure += USERID
#disable = yes 【将disable=yes行前加#注释掉,或者把yes改为no】
}[oot@iZ94imebuqwZ ~]# service xinetd restart
Stopping xinetd: [OK ]
Starting xinetd: [OK ] 如果仍然无法连接到telnet,请检查防火墙配置(添加telnet的23端口服务)。防火墙配置请参考Allen.W的有关防火墙配置的文章。
0 0
- telnet: connect to address 127.0.0.1: Connection refused问题
- telnet 安装---telnet: connect to address 127.0.0.1: Connection refused问题 ----
- telnet: connect to address 127.0.0.1: Connection refused
- 【转载】telnet: connect to address 127.0.0.1: Connection refused
- telnet: connect to address 127.0.0.1: Connection refused
- telnet: connect to address 127.0.0.1: Connection refused
- telnet: connect to address 127.0.0.1: Connection refused解决
- 解决telnet: connect to address 127.0.0.1: Connection refused的错误信息(2)
- telnet: connect to address 192.168.1.103: Connection refused
- 阿里云安装svn失败,提示telnet: connect to address Connection refused的解决办法
- ssh: connect to host 127.0.0.1 port 2222: Connection refused
- UE4 connect to 127.0.0.1 port 52314 failed: Connection refused)
- linux telnet 之 telnet: Unable to connect to remote host: Connection refused
- 解决连接mongoDB出现问题:MongoDB : Failed to connect to 127.0.0.1:27017, reason: errno:61 Connection refused
- linux memcached telnet 出现 Connection refused ,Unable to connect to remote host
- ssh: connect to host localhost port 22: Connection refused 问题
- ssh: connect to host localhost port 22: Connection refused 问题
- ssh: connect to host localhost port 22: Connection refused 问题
- js实例属性和原型属性示例详解
- UML中的关系
- 曹操乃奸雄----(奸贼、奸雄、枭雄定义)、曹操他爸花了一亿元钱买官来的
- 第13周项目5-字符串操作(2.3)
- [Swift]可选链和ARC引用计数
- telnet: connect to address 127.0.0.1: Connection refused问题
- 第十三周项目四(三):选择排序
- Android事件分发机制完全解析,带你从源码的角度彻底理解(上)
- hdu 1016 Prime Ring Problem
- CHAR数组初始化
- 学生作业4
- CMarkup类简介
- ZZUOJ-1194-ARM立即数寻址 (郑州大学第七届ACM大学生程序设计竞赛正式赛F题)
- struts2,hibernate4,spring3配置时问题汇总及解决办法