Zookeeper cannot open socket for localhost / 0: 0: 0: 0: 0: 0: 0: 1: 2181

I am using zookeeper ensemble for hbase. Zookeeper runs on 3 machines. Although HBase is also in fully distributed mode. I have a version of Nutch 2.x. When I start a nut to scan some data, it gives the following errors in the nut log file.

ERROR zookeeper.ClientCnxnSocketNIO - Unable to open socket to localhost/0:0:0:0:0:0:0:1:2181 2015-01-23 16:34:21,956 WARN zookeeper.ClientCnxn - Session 0x0 for server null, unexpected error, closing socket connection and attempting reconnect java.net.SocketException: Network is unreachable at sun.nio.ch.Net.connect0(Native Method) at sun.nio.ch.Net.connect(Net.java:457) at sun.nio.ch.Net.connect(Net.java:449) at sun.nio.ch.SocketChannelImpl.connect(SocketChannelImpl.java:647) at org.apache.zookeeper.ClientCnxnSocketNIO.registerAndConnect(ClientCnxnSocketNIO.java:266) at org.apache.zookeeper.ClientCnxnSocketNIO.connect(ClientCnxnSocketNIO.java:276) at org.apache.zookeeper.ClientCnxn$SendThread.startConnect(ClientCnxn.java:958) at org.apache.zookeeper.ClientCnxn$SendThread.run(ClientCnxn.java:993) 2015-01-23 16:34:22,063 WARN zookeeper.RecoverableZooKeeper - Possibly transient ZooKeeper exception: org.apache.zookeeper.KeeperException$ConnectionLossException: KeeperErrorCode = ConnectionLoss for /hbase/hbaseid 

When I run the command on three instances of zookeepers

 echo ruok | nc 1.1.1.1 2181 it says imok 

What's bad about it? My hbase version is 0.94.14 and the zookeeper version is 3.4.5, the solr version is 4.10.3 (for indexing) and the Nutch version is 2.2.3

+5
source share
2 answers

(CentOS) Check the / etc / hosts file and, if it agrees,

 127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4 ::1 localhost localhost.localdomain localhost6 localhost6.localdomain6 

change it to

 127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4 ::1 ip6-localhost ip6-localhost.localdomain localhost6 localhost6.localdomain6 
+6
source

I do not know zookeeper, but the two IP addresses you publish have nothing to do with each other:

1.1.1.1 is the IPV4 address. 0:0:0:0:0:0:0:1 is the IPV6 address (and it is for the local host). The abbreviation for the local IPV6 address is ::1

Thus, if you are expecting a server on localhost , make sure that it also binds to IPV6, not just 127.0.0.1 (which is the IPV4 address of the local host). I saw similar problems with servers that listened only 127.0.0.1, or with firewalls that allowed access to localhost on IPV4, but not on IPV6.

I'm not sure what you expect when you get to 1.1.1.1. Do you use this address locally? AFAIK is a publicly routable address, but I assume that it receives a lot of such unwanted traffic that it is more or less unsuitable.

+2
source

Source: https://habr.com/ru/post/1211763/


All Articles