【发布时间】:2016-08-21 21:53:13
【问题描述】:
我正在尝试使用 Vagrant 测试 SolrCloud。我让 Zookeeper 在一个盒子上运行,而 Solr 在另一个盒子上运行。这些盒子位于专用网络上(我可以从每个盒子 ssh 进入其中一个)。
当我尝试通过 Solr CLI 创建一个集合时,它会超时,我想它是在尝试与 Zookeeper 通信时。
Zookeeper 正在按预期运行。我使用以下命令在前台模式下启动它:
sudo bin/zkServer.sh start-foreground
我的 zoo.cfg 文件:
tickTime=2000
dataDir=/var/lib/zookeeper/1
clientPort=2181
server.1=localhost:2888:3888
然后我在云模式下启动 Solr:
bin/solr start -c -z 172.28.128.3:2181
在这一点上,一切似乎都很好。 Solr 日志中没有显示任何不良信息,Zookeeper 的控制台中也没有出现任何警告消息。
然后我尝试使用以下命令创建一个集合:
bin/solr create -c mycollection -d data_driven_schema_configs
然后我开始在 Solr 日志中看到很多错误,并且 Zookeeper 中出现了很多重复的消息:
这两个 Solr 错误反复出现:
java.io.IOException: Xid out of order. Got Xid 1299 with err 0
expected Xid 1298 for a packet with details: clientPath:null
serverPath:null finished:false header:: 1298,14 replyHeader:: 0,0,-4
request:: org.apache.zookeeper.MultiTransactionRecord@95acc4f3
response:: org.apache.zookeeper.MultiResponse@0
There was a problem trying to register as the leader:org.apache.solr.common.SolrException:
Could not register as the leader because creating the ephemeral registration
node in ZooKeeper failed
这是来自 Zookeeper 的:
[NIOServerCxn.Factory:0.0.0.0/0.0.0.0:2181:NIOServerCnxn$Factory@251] - Accepted socket connection from /172.28.128.4:54548
2016-08-21 21:33:39,137 - INFO [NIOServerCxn.Factory:0.0.0.0/0.0.0.0:2181:NIOServerCnxn@770] - Client attempting to renew session 0x156aefeba2d0004 at /172.28.128.4:54548
2016-08-21 21:33:39,145 - INFO [NIOServerCxn.Factory:0.0.0.0/0.0.0.0:2181:NIOServerCnxn@1580] - Established session 0x156aefeba2d0004 with negotiated timeout 15000 for client /172.28.128.4:54548
2016-08-21 21:33:39,147 - WARN [NIOServerCxn.Factory:0.0.0.0/0.0.0.0:2181:ZooKeeperServer@593] - Dropping packet at server of type 14
2016-08-21 21:33:39,154 - WARN [NIOServerCxn.Factory:0.0.0.0/0.0.0.0:2181:NIOServerCnxn@634] - EndOfStreamException: Unable to read additional data from client sessionid 0x156aefeba2d0004, likely client has closed socket
2016-08-21 21:33:39,155 - INFO [NIOServerCxn.Factory:0.0.0.0/0.0.0.0:2181:NIOServerCnxn@1435] - Closed socket connection for client /172.28.128.4:54548 which had sessionid 0x156aefeba2d0004
2016-08-21 21:33:40,698 - INFO
我不明白这里发生了什么。我觉得关键在于那个 Solr 错误:
Could not register as the leader because creating the ephemeral registration node in ZooKeeper failed
但是在搜索该错误时,我找不到任何有用的东西。谁能解释一下这里发生了什么?
【问题讨论】:
标签: solr apache-zookeeper solrcloud