LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Containers
User Name
Password
Linux - Containers This forum is for the discussion of all topics relating to Linux containers. Docker, LXC, LXD, runC, containerd, CoreOS, Kubernetes, Mesos, rkt, and all other Linux container platforms are welcome.

Notices


Reply
  Search this Thread
Old 04-13-2018, 01:37 PM   #1
vipul027
LQ Newbie
 
Registered: Apr 2015
Posts: 6

Rep: Reputation: Disabled
Connection closed by foreign host


HI All

I am trying to telnet a server and within few seconds it pops me out .



[S][Fri Apr 13 23:49:45] ~]$telnet 10.137.81.158 5044
Trying 10.137.81.158...
Connected to 10.137.81.158.
Escape character is '^]'.
Connection closed by foreign


[~]$ docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
b9750e12aec5 dev-ubuntu-docker.mycom-osi.com:5000/mycomosi/monitoring-logstash "supervisord -n -c /e" 6 hours ago Up 6 hours 0.0.0.0:5044->5044/tcp monitoring-logstash.container
d32058878d18 dev-ubuntu-docker.mycom-osi.com:5000/mycomosi/monitoring-influxdb "supervisord -n -c /e" 6 hours ago Up 6 hours 0.0.0.0:8083->8083/tcp, 0.0.0.0:8086->8086/tcp, 0.0.0.0:8089->8089/udp, 0.0.0.0:8088->8088/tcp, 0.0.0.0:25826->25826/udp monitoring-influxdb.container
[mycom@NVMBD1CGM270V04 ~]$
 
Old 04-13-2018, 08:20 PM   #2
frankbell
LQ Guru
 
Registered: Jan 2006
Location: Virginia, USA
Distribution: Slackware, Ubuntu MATE, Mageia, and whatever VMs I happen to be playing with
Posts: 19,323
Blog Entries: 28

Rep: Reputation: 6141Reputation: 6141Reputation: 6141Reputation: 6141Reputation: 6141Reputation: 6141Reputation: 6141Reputation: 6141Reputation: 6141Reputation: 6141Reputation: 6141
I can't speak to that particular server, but telnet is not secure in any way and many servers these days are configured to reject telnet connections. https://serverfault.com/questions/72...efused-message
 
Old 04-13-2018, 08:56 PM   #3
michaelk
Moderator
 
Registered: Aug 2002
Posts: 25,700

Rep: Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895
I am also unfamiliar with docker and probably can't help you with your real problem but in addition to what frankbell posted telnet can be used to test a connection but since it is text protocol it will fail as posted when trying to connect to a service that uses a binary protocol.
 
Old 04-13-2018, 10:11 PM   #4
frankbell
LQ Guru
 
Registered: Jan 2006
Location: Virginia, USA
Distribution: Slackware, Ubuntu MATE, Mageia, and whatever VMs I happen to be playing with
Posts: 19,323
Blog Entries: 28

Rep: Reputation: 6141Reputation: 6141Reputation: 6141Reputation: 6141Reputation: 6141Reputation: 6141Reputation: 6141Reputation: 6141Reputation: 6141Reputation: 6141Reputation: 6141
As an aside, the last time I used Telnet, I was on DOS 5.1 on an x386 helping my daughter, who is now all grown up and a fully functional adult of whom I am very proud, connect with a newspaper in Brazil for her homework.

A web search for "telnet rejected" will turn up lots of useful stuff, but I would bet a dollar to a doughnut that the Telnet port is closed.
 
Old 04-19-2018, 05:42 AM   #5
simosx
Member
 
Registered: Jul 2005
Posts: 66

Rep: Reputation: 11
Port 5044 is the port for logstash (https://www.elastic.co/guide/en/beat...sh-output.html).

If you are to use telnet (or better, nc), you should know how the protocol works. AFAIK, this one is not an interactive text protocol.
So, the fact that you get a connection is an indication that it works.
If you want to do more, then you should use other tools that are suggested for this case.

See https://www.elastic.co/guide/en/beat...-logstash.html for more.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Connection closed by foreign host shubha_nand Linux - Newbie 7 05-10-2017 07:52 AM
telnet to a port on RHEL 6 : Connection closed by foreign host after a few seconds linuxuser26 Linux - Networking 1 08-11-2015 03:07 PM
Telnet: Connection closed by a foreign host DBrenchley Linux - Server 3 05-16-2014 12:49 AM
telnet - connection closed by foreign host rbumann Linux - General 11 01-05-2012 08:43 AM
[SOLVED] Connection closed by foreign host kumpaka Linux - Wireless Networking 3 01-02-2011 02:09 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Containers

All times are GMT -5. The time now is 08:28 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration