Unable to telnet to a server

Clash Royale CLAN TAG#URR8PPP
up vote
-1
down vote
favorite
Here are 2 servers
- 192.168.0.12
- 192.168.0.21
there is a service running in 50070 port in server 192.168.0.12
when I do telnet from 192.168.0.21 server it fails:
$telnet 192.168.0.12 50070
Trying 192.168.0.12...
telnet: connect to address 192.168.0.12: Connection refused
When I give hostname then also it fails:
$telnet master1.mycluster 50070
Trying 192.168.0.12...
telnet: connect to address 192.168.0.12: Connection refused
Even when I try from 192.168.0.12 it fails if I give the IP address:
$telnet 192.168.0.12 50070
Trying 192.168.0.12...
telnet: connect to address 192.168.0.12: Connection refused
But it works if I give the hostname:
$telnet master1.mycluster 50070
Trying 127.0.0.1...
Connected to master1.mycluster.
Escape character is '^]'.
I found this question can not telnet to a server connection refuse, but I tried all the possibilities. These are what I tried:
Turned off iptables in both the servers
Added ALL: ALL in cat /etc/hosts.allow
Made sure that the service is running in that port
But none of these work for me.
Here is my /etc/hosts
127.0.0.1 master1.mycluster master1
127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4
::1 localhost localhost.localdomain localhost6 localhost6.localdomain6
192.168.0.12 master1.mycluster master1
192.168.0.21 slave1.mycluster slave1
Is there anything else that I am missing to make it working ?
networking iptables firewall telnet connectivity
 |Â
show 4 more comments
up vote
-1
down vote
favorite
Here are 2 servers
- 192.168.0.12
- 192.168.0.21
there is a service running in 50070 port in server 192.168.0.12
when I do telnet from 192.168.0.21 server it fails:
$telnet 192.168.0.12 50070
Trying 192.168.0.12...
telnet: connect to address 192.168.0.12: Connection refused
When I give hostname then also it fails:
$telnet master1.mycluster 50070
Trying 192.168.0.12...
telnet: connect to address 192.168.0.12: Connection refused
Even when I try from 192.168.0.12 it fails if I give the IP address:
$telnet 192.168.0.12 50070
Trying 192.168.0.12...
telnet: connect to address 192.168.0.12: Connection refused
But it works if I give the hostname:
$telnet master1.mycluster 50070
Trying 127.0.0.1...
Connected to master1.mycluster.
Escape character is '^]'.
I found this question can not telnet to a server connection refuse, but I tried all the possibilities. These are what I tried:
Turned off iptables in both the servers
Added ALL: ALL in cat /etc/hosts.allow
Made sure that the service is running in that port
But none of these work for me.
Here is my /etc/hosts
127.0.0.1 master1.mycluster master1
127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4
::1 localhost localhost.localdomain localhost6 localhost6.localdomain6
192.168.0.12 master1.mycluster master1
192.168.0.21 slave1.mycluster slave1
Is there anything else that I am missing to make it working ?
networking iptables firewall telnet connectivity
1
My guess is that /etc/hosts has a 127.0.0.1 entry for âÂÂmaster1.myclusterâ â notice what it resolves to.
â Jeff Schaller
May 30 at 12:38
What doestelnet 127.0.0.1 50070do? What addresses is the server configured to listen on. Show config file, or code.
â ctrl-alt-delor
May 30 at 12:56
@ctrl-alt-delor telnet 127.0.0.1 50070 works when running on the server where the process runs in 50070. I am pretty new to this world so where can I find the addresses that server configured to listen on? I spinned up these 2 machines using vagrant.
â Gerg
May 30 at 13:19
@JeffSchaller this is how /etc/hosts looks like 127.0.0.1 master1.mycluster master1 127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4 ::1 localhost localhost.localdomain localhost6 localhost6.localdomain6 192.168.0.12 master1.mycluster master1 192.168.0.21 slave1.mycluster slave1
â Gerg
May 30 at 13:21
2
You are sure the service is running on the public address (192) and not just the local one (127)?
â Raman Sailopal
May 30 at 13:48
 |Â
show 4 more comments
up vote
-1
down vote
favorite
up vote
-1
down vote
favorite
Here are 2 servers
- 192.168.0.12
- 192.168.0.21
there is a service running in 50070 port in server 192.168.0.12
when I do telnet from 192.168.0.21 server it fails:
$telnet 192.168.0.12 50070
Trying 192.168.0.12...
telnet: connect to address 192.168.0.12: Connection refused
When I give hostname then also it fails:
$telnet master1.mycluster 50070
Trying 192.168.0.12...
telnet: connect to address 192.168.0.12: Connection refused
Even when I try from 192.168.0.12 it fails if I give the IP address:
$telnet 192.168.0.12 50070
Trying 192.168.0.12...
telnet: connect to address 192.168.0.12: Connection refused
But it works if I give the hostname:
$telnet master1.mycluster 50070
Trying 127.0.0.1...
Connected to master1.mycluster.
Escape character is '^]'.
I found this question can not telnet to a server connection refuse, but I tried all the possibilities. These are what I tried:
Turned off iptables in both the servers
Added ALL: ALL in cat /etc/hosts.allow
Made sure that the service is running in that port
But none of these work for me.
Here is my /etc/hosts
127.0.0.1 master1.mycluster master1
127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4
::1 localhost localhost.localdomain localhost6 localhost6.localdomain6
192.168.0.12 master1.mycluster master1
192.168.0.21 slave1.mycluster slave1
Is there anything else that I am missing to make it working ?
networking iptables firewall telnet connectivity
Here are 2 servers
- 192.168.0.12
- 192.168.0.21
there is a service running in 50070 port in server 192.168.0.12
when I do telnet from 192.168.0.21 server it fails:
$telnet 192.168.0.12 50070
Trying 192.168.0.12...
telnet: connect to address 192.168.0.12: Connection refused
When I give hostname then also it fails:
$telnet master1.mycluster 50070
Trying 192.168.0.12...
telnet: connect to address 192.168.0.12: Connection refused
Even when I try from 192.168.0.12 it fails if I give the IP address:
$telnet 192.168.0.12 50070
Trying 192.168.0.12...
telnet: connect to address 192.168.0.12: Connection refused
But it works if I give the hostname:
$telnet master1.mycluster 50070
Trying 127.0.0.1...
Connected to master1.mycluster.
Escape character is '^]'.
I found this question can not telnet to a server connection refuse, but I tried all the possibilities. These are what I tried:
Turned off iptables in both the servers
Added ALL: ALL in cat /etc/hosts.allow
Made sure that the service is running in that port
But none of these work for me.
Here is my /etc/hosts
127.0.0.1 master1.mycluster master1
127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4
::1 localhost localhost.localdomain localhost6 localhost6.localdomain6
192.168.0.12 master1.mycluster master1
192.168.0.21 slave1.mycluster slave1
Is there anything else that I am missing to make it working ?
networking iptables firewall telnet connectivity
edited May 30 at 13:24
asked May 30 at 12:17
Gerg
82
82
1
My guess is that /etc/hosts has a 127.0.0.1 entry for âÂÂmaster1.myclusterâ â notice what it resolves to.
â Jeff Schaller
May 30 at 12:38
What doestelnet 127.0.0.1 50070do? What addresses is the server configured to listen on. Show config file, or code.
â ctrl-alt-delor
May 30 at 12:56
@ctrl-alt-delor telnet 127.0.0.1 50070 works when running on the server where the process runs in 50070. I am pretty new to this world so where can I find the addresses that server configured to listen on? I spinned up these 2 machines using vagrant.
â Gerg
May 30 at 13:19
@JeffSchaller this is how /etc/hosts looks like 127.0.0.1 master1.mycluster master1 127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4 ::1 localhost localhost.localdomain localhost6 localhost6.localdomain6 192.168.0.12 master1.mycluster master1 192.168.0.21 slave1.mycluster slave1
â Gerg
May 30 at 13:21
2
You are sure the service is running on the public address (192) and not just the local one (127)?
â Raman Sailopal
May 30 at 13:48
 |Â
show 4 more comments
1
My guess is that /etc/hosts has a 127.0.0.1 entry for âÂÂmaster1.myclusterâ â notice what it resolves to.
â Jeff Schaller
May 30 at 12:38
What doestelnet 127.0.0.1 50070do? What addresses is the server configured to listen on. Show config file, or code.
â ctrl-alt-delor
May 30 at 12:56
@ctrl-alt-delor telnet 127.0.0.1 50070 works when running on the server where the process runs in 50070. I am pretty new to this world so where can I find the addresses that server configured to listen on? I spinned up these 2 machines using vagrant.
â Gerg
May 30 at 13:19
@JeffSchaller this is how /etc/hosts looks like 127.0.0.1 master1.mycluster master1 127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4 ::1 localhost localhost.localdomain localhost6 localhost6.localdomain6 192.168.0.12 master1.mycluster master1 192.168.0.21 slave1.mycluster slave1
â Gerg
May 30 at 13:21
2
You are sure the service is running on the public address (192) and not just the local one (127)?
â Raman Sailopal
May 30 at 13:48
1
1
My guess is that /etc/hosts has a 127.0.0.1 entry for âÂÂmaster1.myclusterâ â notice what it resolves to.
â Jeff Schaller
May 30 at 12:38
My guess is that /etc/hosts has a 127.0.0.1 entry for âÂÂmaster1.myclusterâ â notice what it resolves to.
â Jeff Schaller
May 30 at 12:38
What does
telnet 127.0.0.1 50070 do? What addresses is the server configured to listen on. Show config file, or code.â ctrl-alt-delor
May 30 at 12:56
What does
telnet 127.0.0.1 50070 do? What addresses is the server configured to listen on. Show config file, or code.â ctrl-alt-delor
May 30 at 12:56
@ctrl-alt-delor telnet 127.0.0.1 50070 works when running on the server where the process runs in 50070. I am pretty new to this world so where can I find the addresses that server configured to listen on? I spinned up these 2 machines using vagrant.
â Gerg
May 30 at 13:19
@ctrl-alt-delor telnet 127.0.0.1 50070 works when running on the server where the process runs in 50070. I am pretty new to this world so where can I find the addresses that server configured to listen on? I spinned up these 2 machines using vagrant.
â Gerg
May 30 at 13:19
@JeffSchaller this is how /etc/hosts looks like 127.0.0.1 master1.mycluster master1 127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4 ::1 localhost localhost.localdomain localhost6 localhost6.localdomain6 192.168.0.12 master1.mycluster master1 192.168.0.21 slave1.mycluster slave1
â Gerg
May 30 at 13:21
@JeffSchaller this is how /etc/hosts looks like 127.0.0.1 master1.mycluster master1 127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4 ::1 localhost localhost.localdomain localhost6 localhost6.localdomain6 192.168.0.12 master1.mycluster master1 192.168.0.21 slave1.mycluster slave1
â Gerg
May 30 at 13:21
2
2
You are sure the service is running on the public address (192) and not just the local one (127)?
â Raman Sailopal
May 30 at 13:48
You are sure the service is running on the public address (192) and not just the local one (127)?
â Raman Sailopal
May 30 at 13:48
 |Â
show 4 more comments
1 Answer
1
active
oldest
votes
up vote
3
down vote
accepted
Your service is listening on the loopback address only, 127.0.0.1.
When you make a connection from 192.168.0.21 or when you specify the ip address it does not work, as your service is not listening on that ip.
When you use the hostname from 192.168.0.12 it works because it is connecting to the loopback address. This is because it will look in your hosts file first, /etc/hosts, which has an entry pointing that hostname to your loopback ip: 127.0.0.1 master1.mycluster
shackle ford. Thank you, this explains what is going on. If I need to make it listen on connection from other servers then what I need to do? I know this question needs lot of details, but if you can give me an idea then I at least try to find how to do it from google. Mine is cantos 7 VMS.
â Gerg
May 31 at 12:07
This will depend on the service, a lot of applications will only listen onloopbackby default. There will normally be an option to tell it which address to listen on, and normally setting it to 0.0.0.0 means listen on all addresses. But this will depend on the the application.
â rusty shackleford
May 31 at 12:26
add a comment |Â
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
3
down vote
accepted
Your service is listening on the loopback address only, 127.0.0.1.
When you make a connection from 192.168.0.21 or when you specify the ip address it does not work, as your service is not listening on that ip.
When you use the hostname from 192.168.0.12 it works because it is connecting to the loopback address. This is because it will look in your hosts file first, /etc/hosts, which has an entry pointing that hostname to your loopback ip: 127.0.0.1 master1.mycluster
shackle ford. Thank you, this explains what is going on. If I need to make it listen on connection from other servers then what I need to do? I know this question needs lot of details, but if you can give me an idea then I at least try to find how to do it from google. Mine is cantos 7 VMS.
â Gerg
May 31 at 12:07
This will depend on the service, a lot of applications will only listen onloopbackby default. There will normally be an option to tell it which address to listen on, and normally setting it to 0.0.0.0 means listen on all addresses. But this will depend on the the application.
â rusty shackleford
May 31 at 12:26
add a comment |Â
up vote
3
down vote
accepted
Your service is listening on the loopback address only, 127.0.0.1.
When you make a connection from 192.168.0.21 or when you specify the ip address it does not work, as your service is not listening on that ip.
When you use the hostname from 192.168.0.12 it works because it is connecting to the loopback address. This is because it will look in your hosts file first, /etc/hosts, which has an entry pointing that hostname to your loopback ip: 127.0.0.1 master1.mycluster
shackle ford. Thank you, this explains what is going on. If I need to make it listen on connection from other servers then what I need to do? I know this question needs lot of details, but if you can give me an idea then I at least try to find how to do it from google. Mine is cantos 7 VMS.
â Gerg
May 31 at 12:07
This will depend on the service, a lot of applications will only listen onloopbackby default. There will normally be an option to tell it which address to listen on, and normally setting it to 0.0.0.0 means listen on all addresses. But this will depend on the the application.
â rusty shackleford
May 31 at 12:26
add a comment |Â
up vote
3
down vote
accepted
up vote
3
down vote
accepted
Your service is listening on the loopback address only, 127.0.0.1.
When you make a connection from 192.168.0.21 or when you specify the ip address it does not work, as your service is not listening on that ip.
When you use the hostname from 192.168.0.12 it works because it is connecting to the loopback address. This is because it will look in your hosts file first, /etc/hosts, which has an entry pointing that hostname to your loopback ip: 127.0.0.1 master1.mycluster
Your service is listening on the loopback address only, 127.0.0.1.
When you make a connection from 192.168.0.21 or when you specify the ip address it does not work, as your service is not listening on that ip.
When you use the hostname from 192.168.0.12 it works because it is connecting to the loopback address. This is because it will look in your hosts file first, /etc/hosts, which has an entry pointing that hostname to your loopback ip: 127.0.0.1 master1.mycluster
answered May 30 at 13:50
rusty shackleford
1,135115
1,135115
shackle ford. Thank you, this explains what is going on. If I need to make it listen on connection from other servers then what I need to do? I know this question needs lot of details, but if you can give me an idea then I at least try to find how to do it from google. Mine is cantos 7 VMS.
â Gerg
May 31 at 12:07
This will depend on the service, a lot of applications will only listen onloopbackby default. There will normally be an option to tell it which address to listen on, and normally setting it to 0.0.0.0 means listen on all addresses. But this will depend on the the application.
â rusty shackleford
May 31 at 12:26
add a comment |Â
shackle ford. Thank you, this explains what is going on. If I need to make it listen on connection from other servers then what I need to do? I know this question needs lot of details, but if you can give me an idea then I at least try to find how to do it from google. Mine is cantos 7 VMS.
â Gerg
May 31 at 12:07
This will depend on the service, a lot of applications will only listen onloopbackby default. There will normally be an option to tell it which address to listen on, and normally setting it to 0.0.0.0 means listen on all addresses. But this will depend on the the application.
â rusty shackleford
May 31 at 12:26
shackle ford. Thank you, this explains what is going on. If I need to make it listen on connection from other servers then what I need to do? I know this question needs lot of details, but if you can give me an idea then I at least try to find how to do it from google. Mine is cantos 7 VMS.
â Gerg
May 31 at 12:07
shackle ford. Thank you, this explains what is going on. If I need to make it listen on connection from other servers then what I need to do? I know this question needs lot of details, but if you can give me an idea then I at least try to find how to do it from google. Mine is cantos 7 VMS.
â Gerg
May 31 at 12:07
This will depend on the service, a lot of applications will only listen on
loopback by default. There will normally be an option to tell it which address to listen on, and normally setting it to 0.0.0.0 means listen on all addresses. But this will depend on the the application.â rusty shackleford
May 31 at 12:26
This will depend on the service, a lot of applications will only listen on
loopback by default. There will normally be an option to tell it which address to listen on, and normally setting it to 0.0.0.0 means listen on all addresses. But this will depend on the the application.â rusty shackleford
May 31 at 12:26
add a comment |Â
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f446893%2funable-to-telnet-to-a-server%23new-answer', 'question_page');
);
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
1
My guess is that /etc/hosts has a 127.0.0.1 entry for âÂÂmaster1.myclusterâ â notice what it resolves to.
â Jeff Schaller
May 30 at 12:38
What does
telnet 127.0.0.1 50070do? What addresses is the server configured to listen on. Show config file, or code.â ctrl-alt-delor
May 30 at 12:56
@ctrl-alt-delor telnet 127.0.0.1 50070 works when running on the server where the process runs in 50070. I am pretty new to this world so where can I find the addresses that server configured to listen on? I spinned up these 2 machines using vagrant.
â Gerg
May 30 at 13:19
@JeffSchaller this is how /etc/hosts looks like 127.0.0.1 master1.mycluster master1 127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4 ::1 localhost localhost.localdomain localhost6 localhost6.localdomain6 192.168.0.12 master1.mycluster master1 192.168.0.21 slave1.mycluster slave1
â Gerg
May 30 at 13:21
2
You are sure the service is running on the public address (192) and not just the local one (127)?
â Raman Sailopal
May 30 at 13:48