5

I try to connect to localhost with telnet:

% telnet localhost 6311

This connection succeed, but when I connect by external IP of my computer, connection fails:

% telnet x.x.x.x 6311
Trying x.x.x.x...
Connected to x.x.x.x
Escape character is '^]'.
Connection closed by foreign host.

What could be wrong?

3
  • Firstly, the site address. Try on SuperUser or ServerFault.
    – H2CO3
    May 5, 2013 at 13:29
  • I checked : % sudo telnet x.x.x.x 6311 same problem...
    – sunny
    May 5, 2013 at 13:33
  • It's not a web server there, it is RServe.. Then I don't have any site address...
    – sunny
    May 5, 2013 at 13:36

3 Answers 3

3

The problem was with the service ( that was running on 6311) The servise just was not configured to work with remote access.

It means, telnet was OK :)

1

Check what IP server is listening to. I am suspecting that your server is listening to localhost or 127.0.0.1. Make it listen to 0.0.0.0 (probably via some conf file).

You can verify it by running

netstat -tapnl | grep 6311

Check if it shows 127.0.0.1:6311 or 0.0.0.0:6311

1
  • If this answer solves your problem, you can mark this as accepted answer.. :)
    – anishsane
    May 14, 2013 at 7:00
0

first you need to see the ubuntu system log with this command

sudo gedit /var/log/syslog

and if you will see this error "execv( /usr/sbin/tcpd ) failed: No such file or directory" then run this command

sudo apt-get install tcpd

it will solve your problem (if not then you need to search your system error on google)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.