Reputation: 1007
I am facing some issue while connecting to Solr through CloudSolrClient
.
I used the following piece of code.
CloudSolrClient server = new CloudSolrClient("ip:8983");
server.setDefaultCollection("hadoop_logs_shard3_replica1");
I am getting following error
java.io.IOException: Packet len1213486160 is out of range! at org.apache.zookeeper.ClientCnxnSocket.readLength(ClientCnxnSocket.java:112) at org.apache.zookeeper.ClientCnxnSocketNIO.doIO(ClientCnxnSocketNIO.java:79) at org.apache.zookeeper.ClientCnxnSocketNIO.doTransport(ClientCnxnSocketNIO.java:366) at org.apache.zookeeper.ClientCnxn$SendThread.run(ClientCnxn.java:1081)
Upvotes: 1
Views: 942
Reputation: 139
1213486160 is ASCII "HTTP" interpreted as a 32-bit big-endian integer. As YoungHobbit suggests, you are not speaking to the correct service.
Upvotes: 0
Reputation: 13402
public CloudSolrClient(String zkHost)
Create a new client object that connects to
Zookeeper
and is always aware of the SolrCloud state. Updates will be sent to shard leaders by default.
You are specifying solr instance host:port
instead of zookeeper host:port
. Fix that, It should work afterwards.
Upvotes: 0