打开APP
userphoto
未登录

开通VIP,畅享免费电子书等14项超值服

开通VIP
telnet: connect to address 127.0.0.1: Connection refused问题
telnet: connect to address 127.0.0.1: Connection refused问题,有需要的朋友可以参考下。
今天在使用telnet连接本机的Memcached服务时,遇到如下问题:
[root@iZ94imebuqwZ ~]# telnet localhost 11211
Trying ::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的有关防火墙配置的文章。
本站仅提供存储服务,所有内容均由用户发布,如发现有害或侵权内容,请点击举报
打开APP,阅读全文并永久保存 查看更多类似文章
猜你喜欢
类似文章
【热】打开小程序,算一算2024你的财运
如何测试端口通不通(四种方法)
Linux telnet服务开启步骤
suse开启telnet服务
【Telnet服务是如何开启的】
debiab远程连接
CentOS 6.5 Rsync sersync 实现数据实时同步备份
更多类似文章 >>
生活服务
热点新闻
分享 收藏 导长图 关注 下载文章
绑定账号成功
后续可登录账号畅享VIP特权!
如果VIP功能使用有故障,
可点击这里联系客服!

联系客服