The Problem
I was working on Sitecore installation on a new machine. Everything was running smooth but the SOLR service always ended up in PAUSED state.
The Research
I tried stopping the service and then starting it using NSSM multiple times but it did not help. Then I thought of removing and recreating the service but again no help. And then it was followed by a machine restart and the service still ended up in PAUSED state.
I started googling about this issue and found answers suggesting that may be JAVA_HOME environment variable is not set or may be JAVA is not installed. I opened my command prompt to execute echo %java_home% to get value for JAVA_HOME environment variable and it returned a blank value. This proved there is definitely an issue with JAVA setup on my new machine. Next, I executed java -version in cmd prompt and I found that the new machine is using Microsoft build of openJDK instead of JRE (snapshot below)
It was found that new machine is using openJDK because OpenJDK is a free and open-source implementation of the Java Platform, Standard Edition. Oracle decided to charge for JRE and as a result of that a lot organizations decided to not use JRE and looked for alternatives like openJDK. This seemed like a viable reason why SOLR service stays in PAUSED state.
So, how do I make SOLR service work with Miecrosoft build for openJDK?
- Open up Add/Remove programs in Windows
- Type in JDK, and click Modify for the Microsoft Build of OpenJDK with Hotspot app
- Next, click the Change button
- In the Custom Setup for the Set JAVA_HOME variable, select "Entire feature will be installed on local hard drive" and click next
- After the installation completed, I executed echo %java_home% and this time it returned a value -
- Next, I attempted on restarting my SOLR service and this time is started successfully.
- Navigate to your local SOLR admin and confirm it's up and running
- Recycle your local app pool and restart your website, then check your index manager to confirm your local site's connection to SOLR.
Though, this is more of SOLR setup issue but even such challenges can delay setup of Sitecore instances. Thanks for reading, I hope it helps you!!!
Comments
Post a Comment