You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@kafka.apache.org by Tech Bolek <te...@yahoo.com.INVALID> on 2016/08/29 14:55:35 UTC

kafka zookeeper: no route to host exception on connect. Strange address format?

Here is the scenario:
   
   - My kafka server and the zookeeper are running and working fine on the remote server as long as I launch the process on the same remote server.
   - I don't have any connectivity issues between my local machine and the server. I can ssh and access all other applications on my remote server from my local machine.
   - When trying to connect a client to the remote zookeeper directly from my local machine I get a a NoRouteToHost exception is being thrown.
   - The client logfile contains the following lines:
 org.apache.zookeeper.ZooKeeper: Initiating client connection, connectString=remotehost:2181 sessionTimeout=120000watcher=org.I0Itec.zkclient.ZkClient@62807a4d
 org.apache.zookeeper.ClientCnxn: Opening socket connection to server
remotehost/192.13.12.1:2181. Will not attempt to authenticate usingSASL (unknown error)The URL I'm specifying when connecting to zookeeper is remotehost:2181. However, note the "remotehost/192.13.12.1:2181" in the log. He appears to resolve the hostname to IP correctly and then... slapping a forward slash and the IP on to the URL which looks weird to me. Is this how he should resolve and pass down the URL to the socket?? 

Re: kafka zookeeper: no route to host exception on connect. Strange address format?

Posted by Tech Bolek <te...@yahoo.com.INVALID>.
Found the issue. The zookeeper listen port was not open to firewall. 

    On Monday, August 29, 2016 8:55 AM, Tech Bolek <te...@yahoo.com.INVALID> wrote:
 

 
Here is the scenario:
  
  - My kafka server and the zookeeper are running and working fine on the remote server as long as I launch the process on the same remote server.
  - I don't have any connectivity issues between my local machine and the server. I can ssh and access all other applications on my remote server from my local machine.
  - When trying to connect a client to the remote zookeeper directly from my local machine I get a a NoRouteToHost exception is being thrown.
  - The client logfile contains the following lines:
 org.apache.zookeeper.ZooKeeper: Initiating client connection, connectString=remotehost:2181 sessionTimeout=120000watcher=org.I0Itec.zkclient.ZkClient@62807a4d
 org.apache.zookeeper.ClientCnxn: Opening socket connection to server
remotehost/192.13.12.1:2181. Will not attempt to authenticate usingSASL (unknown error)The URL I'm specifying when connecting to zookeeper is remotehost:2181. However, note the "remotehost/192.13.12.1:2181" in the log. He appears to resolve the hostname to IP correctly and then... slapping a forward slash and the IP on to the URL which looks weird to me. Is this how he should resolve and pass down the URL to the socket??