SearchStax Cloud Help Center

The SearchStax Help Center Frequently Asked Questions page includes FAQs about SearchStax Cloud, our hosted Apache Solr Cloud service.


What if zkcli returns an error?

New clients frequently consult us about zkcli script connection errors. They encounter this difficulty when they first attempt to upload the Solr configuration files to Zookeeper. (See zkcli download instructions.) This page lists the most common complaints and their solutions.

Security Best Practices

Be sure to see our page on securing Zookeeper using SearchStax.

Java-Related Issues

The Zookeeper Command-Line Interface (zkcli) has the following Java requirements when used with Solr:

  • The Zookeeper zkcli utility requires Java 8 or above when used with Solr 6.x, 7.x, or 8.x.
  • When zkcli is used with Solr 9.x, it requires Java 11 or above.

When zkcli gives you an error claiming “java command not known,” it means that Java is not properly installed on your computer.

An error saying “A JNI error has occurred, please check your installation and try again” appears when you try to use zkcli with Solr 9 from a computer that does not have Java 11+ installed.

Run $ java -version to see what version of Java is installed.

You can update Java at OpenJDK.

URL Confusion

Each SearchStax Studio deployment has its own Zookeeper and HTTP Endpoint URLs:

Managed Solr URLs

It is very common for a new user to confused one URL with the other. If you feed the HTTP Endpoint to the zkcli script, you will see some puzzling errors. (The Zookeeper Ensemble is at port 2181.)

Timeout at 30000 ms

Several SearchStax Cloud users have reported a 30-second timeout the first time they tried to upload a SOLR configuration.

The error message resembles this one:

Caused by java.util.concurrent.TimeoutException: Could not connect to ZooKeeper <instance url> within 30000 ms

This failure is often due to a blocked port 2181 (the ZooKeeper port) in the user’s local firewall. Have your local IT department open the port for you.

The same error appears when the Zookeeper ensemble is protected by IP Filtering and your IP address is not listed among the filters.

Something similar can happen if a Zookeeper instance stops running. That situation is very rare, and is not usually encountered on your first attempt to use zkcli. Please contact our Support Desk so we can check it for you.

Class Path Error

Sometimes zkcli returns the following error:

Error: Could not find or load main class org.apache.solr.cloud.ZkCLI

We have seen this error in situations where a Windows user tries to run zkcli.sh using a Linux emulator such as cygwin or MinGW. Class paths do not translate well between the emulator and the underlying Windows system.

The solution is to use zkcli.bat from a Windows command prompt. Switch to the emulator to run the subsequent cURL commands.

Config Path Error

Another common zkcli error is:

Error: Path ...\conf does not exist!

The config directory path was incorrect. Note that the conf directory paths are not the same for the solr-6 and solr-7 scripts. The choices are:

../configsets/basic_configs/conf/

and

../configsets/_default/conf/

respectively.

Questions?

Do not hesitate to contact the SearchStax Support Desk.


Return to Frequently Asked Questions.