How to find whether solr server is running or not

Viewed 28154

I am running an application that get search results from solr server. But when server is not running i get no response from the server. Is there any way i can found that my server is not running so that i can give proper error message regarding it

5 Answers

Seems like there should be a simple way to do this via HTTP, a generic on/off response from the server would be ideal. Short of that, one thing you could do is just GET host:port/solr and if you get any response other than 200 then assume it's down.

Related