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

28,839

Solution 1

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.

Solution 2

Try to make the telnet connection as

telnet 192.168.10.10 3333

without using :

Solution 3

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.

Share:
28,839
EnTrERy
Author by

EnTrERy

Senior Software Engineer

Updated on October 18, 2020

Comments

  • EnTrERy
    EnTrERy over 3 years

    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?

    • Recct
      Recct over 12 years
      Reminds me of an assignment I did in uni. Did he specify the port? Otherwise the default 23 was attempted and your program isn't listening on that. Also remotely possible that his ISP (or router) is filtering certain ports. Try with a different listening port, something even higher e.g. 43839
    • EnTrERy
      EnTrERy over 12 years
      He is typing telnet "myIP" 43839 and it is the same error (I switched the port). I'm newb with this network things and i cant see where is the problem, that means the filtering is not the problem ? there is other issue ?
    • EnTrERy
      EnTrERy over 12 years
      I cant ping him, is this because of a router he is using hiding his IP to the net ?
    • Grodriguez
      Grodriguez over 12 years
      @Recc: Doesn't look like filtering. The Telnet client is complaining about not being able to connect to port 23, not to port 5555 or 43839. So obviously the Telnet client is trying port 23.
  • EnTrERy
    EnTrERy over 12 years
    This is the telnet port everything is fine, the problem is somewhere in the road between me and him, on some step when I trace him I get the "request timeout"
  • Grodriguez
    Grodriguez over 12 years
    Unless I misunderstood something, your question says your server listens on port 5555, yet his client is trying to use the standard Telnet port (23).