3

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
  • 233
  • 2
  • 3
  • 10

2 Answers2

1

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)

Hassan Saeed
  • 111
  • 2
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.

TLin
  • 99
  • 6