Solr关闭与Zookeeper的连接

时间:2013-06-04 13:35:59

标签: tcp solr apache-zookeeper

我有两台服务器,一台服务器运行apache zookeeper,服务器二运行Solr。 当启动zookeeper时,我可以在服务器1上连接它(通过bin / zkCli.sh),但不能通过服务器2连接到solr。 Zookeeper是通过supervisor启动的,但我也试过通过bind/zkServer.sh启动它而没有任何改进。 当查看tomcat日志(Solr正在登录)时,我得到:

WARNING: Overseer cannot talk to ZK
Jun 04, 2013 3:26:52 PM org.apache.solr.cloud.Overseer$ClusterStateUpdater amILeader
WARNING:
org.apache.zookeeper.KeeperException$SessionExpiredException: KeeperErrorCode = Session expired for /overseer_elect/leader
        at org.apache.zookeeper.KeeperException.create(KeeperException.java:127)
        at org.apache.zookeeper.KeeperException.create(KeeperException.java:51)
        at org.apache.zookeeper.ZooKeeper.getData(ZooKeeper.java:1151)
        at org.apache.solr.common.cloud.SolrZkClient$7.execute(SolrZkClient.java:253)
        at org.apache.solr.common.cloud.SolrZkClient$7.execute(SolrZkClient.java:250)
        at org.apache.solr.common.cloud.ZkCmdExecutor.retryOperation(ZkCmdExecutor.java:65)
        at org.apache.solr.common.cloud.SolrZkClient.getData(SolrZkClient.java:250)
        at org.apache.solr.cloud.Overseer$ClusterStateUpdater.amILeader(Overseer.java:199)
        at org.apache.solr.cloud.Overseer$ClusterStateUpdater.run(Overseer.java:122)
        at java.lang.Thread.run(Thread.java:722)

...


Jun 04, 2013 3:31:04 PM org.apache.zookeeper.ClientCnxn$SendThread logStartConnect
INFO: Opening socket connection to server XXX.XXX.XXX.XXX/XXX.XXX.XXX.XXX:2181. Will not attempt to authenticate using SASL (unknown error)
Jun 04, 2013 3:31:04 PM org.apache.zookeeper.ClientCnxn$SendThread run
INFO: Client session timed out, have not heard from server in 46974ms for sessionid 0x13f0f5a570c0006, closing socket connection and attempting reconnect
Jun 04, 2013 3:31:05 PM org.apache.zookeeper.ClientCnxn$SendThread logStartConnect
INFO: Opening socket connection to server XXX.XXX.XXX.XXXXXX.XXX.XXX.XXX.75:2181. Will not attempt to authenticate using SASL (unknown error)
Jun 04, 2013 3:32:01 PM org.apache.zookeeper.ClientCnxn$SendThread run
INFO: Client session timed out, have not heard from server in 56627ms for sessionid 0x13f0f5a570c0006, closing socket connection and attempting reconnect

如何设置zookeeper,以便服务器2上的solr可以访问它?

其他信息:在服务器1上使用netstat -l,我得到以下信息:

tcp6       0      0 [::]:2181               [::]:*                  LISTEN

即。它只是监听tcp6,而不是tcp。

1 个答案:

答案 0 :(得分:0)

检查zookeeper服务器上的防火墙配置,确保端口2181,2888和3888全部打开。 2181是客户端通信端口,2888和3888用于zookeeper集群通信(如果您决定在集合中运行zookeeper)。