简体   繁体   中英

could not open connection to the host, on port 23: Connect failed

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?

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.

Try to make the telnet connection as

telnet 192.168.10.10 3333

without using :

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM