Skip to content

Troubleshooting

Karen Majewicz edited this page Apr 6, 2021 · 2 revisions

If you are having trouble getting Solr to run

this info current with Geoportal version 2.2.1 - steps from @Ziiiiing

Besides updating the local Gemfile with gem 'solr_wrapper', '~> 3.1', we should also check the version of Java before running the application. The Java has to be version 1.8 ( or called Java 8) only so that the Solr is able to start successfully. The default Java version on my laptop was 1.15 and that's why I failed to start it.

First, check your default (or let's say current) Java version before running the application with:

$ java -version
java version "15.0.2" 2021-01-19

If you got the version rather than 1.8, try to run /usr/libexec/java_home -V to check all Java versions installed on your computer, and the output might look like this:

$ /usr/libexec/java_home -V
Matching Java Virtual Machines (2):
    15.0.2 (x86_64) "Oracle Corporation" - "Java SE 15.0.2" /Library/Java/JavaVirtualMachines/jdk-15.0.2.jdk/Contents/Home
    1.8.271.09 (x86_64) "Oracle Corporation" - "Java" /Library/Internet Plug-Ins/JavaAppletPlugin.plugin/Contents/Home
/Library/Java/JavaVirtualMachines/jdk-15.0.2.jdk/Contents/Home

Swith the default version to Java 8 (1.8.271.09 on my laptop) with:

export JAVA_HOME=`/usr/libexec/java_home -v 1.8.271.09`

Then you will get the Java 8 in the end, and you are good to start the Solr and run the application:

$ java -version
java version "1.8.0_271"

Reminder: If you do not have Java 8 installed on your local computer, try to follow this website to install Java 8 first.

Clone this wiki locally