无法在端口 23 上打开与主机的连接:连接失败
我有一个非常简单的聊天服务器(Java 上的 100 行代码)并且它工作正常。当我在本地主机上使用 Telnet 进行测试时,一切都很好。当我让一些朋友用telnet测试它时(telnet
,我分配的端口是5555,服务器在我的电脑上以静态IP运行)一切都只是也很好,但我的一位朋友收到了错误
无法在端口 23 上打开与主机的连接:连接失败
尝试连接时连接失败。双方都关闭了所有防火墙、防病毒和反间谍软件。 为什么我的一些朋友可以连接,而他却不能?问题出在哪里:是在服务器上还是在他的电脑上?
I have extremely simple chat server (100 lines of code on Java) and it is working properly. When I'm testing it with Telnet on localhost everything is just fine. When I asked some of my friends to test it with telnet (telnet <myIP> <port>
, the port I assigned is 5555, server is running on my PC with static IP) everything is just fine too, but one of my friends received the error
Could not open connection to the host, on port 23: Connect failed
when he was trying to connect. Every firewall, anti-virus and anti-spyware software is turned off from both sides. Why could some of my friends connect but not him? Where is the problem: is it on the server or his PC?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
我之前也遇到过类似的问题,结果是语法问题。当我这样做时:
telnet 192.168.10.10:3333
我会得到端口 23 错误,但如果我输入:
telnet 192.168.10.10 3333
我会得到正确的结果。
I had a similar issue before and what it turns out to be is the syntax. When I do:
telnet 192.168.10.10:3333
I will get the port 23 error but if I type in:
telnet 192.168.10.10 3333
I will get correct result.
情况下建立 telnet 连接
尝试在不使用
:
的Try to make the telnet connection as
without using
:
您朋友的 Telnet 客户端显然正在尝试连接到端口 23,而不是 5555 或 43839,因为这就是他收到的错误消息中所说的内容。
请您的朋友检查他正在使用的 Telnet 客户端的文档,并确保他以正确的方式指定端口。
Your friend's Telnet client is obviously attempting to connect to port 23, not 5555 or 43839, since that's what it says in the error message he is getting.
Ask your friend to check the documentation for the Telnet client he's using, and make sure he's specifying the port the proper way.