telnet: Unable to connect to remote host: Connection refused
Solution 1
Verify zookeeper is actually running, via
ps aux | grep -i zookeeper
If it is, then it may not be bound to 127.0.0.1 or 0.0.0.0. So check which IP address it's actually bound to,
netstat -tlpn
Then try to telnet to it using that address.
Solution 2
check your 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)
Related videos on Youtube
Avinash
I’m passionate about applying my knowledge of computer science and machine learning to areas in machine learning and deep learning where we can really engineer better solutions for helping people to have a better life. I believe, machine learning and computer science really have the power to make the computers understand real-life problems and produce great solutions for humanity which has never been seen. If you are working in some innovative Data Science field, feel free to reach out to me.
Updated on September 18, 2022Comments
-
Avinash over 1 year
I am inside docker and I have installed zookeeper and trying to test it using telnet But it is not working
$ telnet localhost 2181 Trying ::1... Trying 127.0.0.1... telnet: Unable to connect to remote host: Connection refused
I tried these also
telnet 127.0.0.1 2181 telnet 172.17.0.2 2181
But same error.
netstat status
# netstat -tlpn Active Internet connections (only servers) Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name
Please help.
-
Avinash about 7 yearsJust now I found even
telnet locahost
is not working. Has same error. -
TLin about 7 yearsSimply using
telnet localhost
would attempt to connect to a local server process listening port 23. Most servers/containers I know don't enable telnet servers by default since it's insecure. -
Avinash about 7 yearsAny idea how to fix it.
-
TLin about 7 yearsCan you update your post with the output of
netstat -tlpn
-
Avinash about 7 yearsI have updated.
-
TLin about 7 yearsIt's clear from your netstat output that there's no server process listening. Are you sure zookeeper is running? I suggest trying out this guide if you haven't already: zookeeper.apache.org/doc/r3.3.3/zookeeperStarted.html
-
thewebjackal about 7 yearsDid you check your firewall?