On 7/18/2017 5:10 AM, Markus Jelsma wrote:
> The problem was never resolved but Shawn asked for the stack trace, here it 
> is:
<snip>
> Caused by: java.lang.IllegalStateException: Connection pool shut down 
> at org.apache.http.util.Asserts.check(Asserts.java:34) 

As I suspected, it is the connection pool inside HttpClient that is shut
down (closed).

Earlier today before I came into the office, I asked the HttpClient user
list whether this could ever happen for a reason other than an explicit
close/shutdown.  They looked at the code and found that the exception
only is thrown if the "isShutDown" boolean flag is true, and the only
place that ever gets set to true is when an explicit shutdown is called
on the connection pool.

When a solr client is built without an external HttpClient, calling
close() on the solr client will shut down the internal HttpClient.  If
an external HttpClient is used, the user code would need to shut it down
for this to happen.  Recent versions of SolrJ are using
CloseableHttpClient, which will shut down the connection pool if close()
is called.

It's looking like this error has happened because the HttpClient object
inside the solr client has been shut down explicitly, which might have
happened because one of the outer layers had close() called.

Thanks,
Shawn

Reply via email to