3

Is there a command, similar to /opt/solr/bin/solr version that will tell you whether Solr is running in SolrCloud or Standalone mode?

I am running Solr 7.2.1 on Centos7

Flea
  • 1,490
  • 2
  • 19
  • 43

2 Answers2

3

The current system state is available at the REST endpoint /solr/admin/info/system. You're looking for the mode entry, which will be solrcloud in cluster mode and std in regular, non-cloud mode.

MatsLindh
  • 49,529
  • 4
  • 53
  • 84
  • This gives a more concise solution than the other suggestion. Thank you. – Flea Mar 09 '18 at 15:57
  • Could you provide the link to where this is documented? – Kai Schneider Feb 19 '20 at 12:20
  • 1
    @KaiSchneider As far as I know the actual response from the endpoints isn't documented anywhere, except as the reference to the actual source where this behavior is implemented, as linked in the answer. The endpoints themselves are listed in the implicit request handler definition list: https://lucene.apache.org/solr/guide/8_4/implicit-requesthandlers.html#available-implicit-endpoints – MatsLindh Feb 19 '20 at 21:39
0

why not something simple like:

curl http://localhost:8983/solr/zookeeper?detail=true&path=%2Fclusterstate.json

and check that it returns some valid json?

Persimmonium
  • 15,593
  • 11
  • 47
  • 78
  • That's probably the best I'll get. Without zookeeper running it returns an HTTP 500 error: Problem accessing /solr/admin/zookeeper. Reason: {trace=java.lang.NullPointerException – Flea Mar 09 '18 at 15:55