Hello, I am using single instance CloudSolrClient using my HttpClinet. Problem with using this httpClient is that, whenever I add more than one document, LBHttpSolrClient complains about connection not released. Everything works fine is I do not use my own HttpClient.
HttpClient httpClient = new DefaultHttpClient(); // also set timeout and authentication parameters server = new CloudSolrClient("localhost:2198", httpClient); //singleton for the app, have tried multi-instance too CloudSolrClient.add(document); //adding document in a loop result sin error Documents get updated but I end up seeing many Zookeeper connections established depending on number of documents added. How do I release connection when my HttpClient is wrapped within CluodSolrClient? I tried calling shutting down httpClient connection manager, it did not work. ERRORS: org.apache.solr.common.cloud.ConnectionManager] (zkCallback-2-thread-1) Watcher org.apache.solr.common.cloud.ConnectionManager@29e14ddb name:ZooKeeperConnection Watcher:localhost.harvard.edu:2181 got event WatchedEvent …. org.apache.solr.client.solrj.SolrServerException: java.lang.IllegalStateException: Invalid use of BasicClientConnManager: connection still allocated. Make sure to release the connection before allocating another one. org.apache.solr.client.solrj.impl.LBHttpSolrClient.doRequest(LBHttpSolrClient.java:410) org.apache.solr.client.solrj.impl.LBHttpSolrClient.request(LBHttpSolrClient.java:325) Thank you in advance Putul