10

I'm trying to install Solr service as described here. I use NSSM prelease build 2.2.4-101 to 'avoid an issue with services failing to start', but after installation the service cannot start anyway:

enter image description here

Windows logs say the following:

Started C:\solr\bin\solr.cmd start -f -p 8983 for service solr in C:\solr\bin.
Program C:\solr\bin\solr.cmd for service solr exited with return code 0.
Killing process tree of process 24764 for service solr with exit code 0
Killing PID 24764 in process tree of PID 24764 because service solr is stopping.
Service solr action for exit code 0 is Restart. Attempting to restart C:\solr\bin\solr.cmd.
Service solr ran for less than 1500 milliseconds. Restart will be delayed by 32000 milliseconds.

[Solr 5.4.1]

Update:
I managed to install it on Win10, but failed to install it on Win 2016 Server... All the tools and installation steps are the same. Any idea what is wrong?

closed as off-topic by maz, Patrick Barron, Zachary Kniebel, Gatogordo, Chris Auer Oct 4 '17 at 19:46

  • This question does not appear to be about Sitecore CMS and multichannel marketing software, within the scope defined in the help center.
If this question can be reworded to fit the rules in the help center, please edit the question.

  • 5
    This is purely a Solr question and would best be asked on Stack Overflow – maz Oct 4 '17 at 13:19
  • I had also faced the same issue and resolved it. the solution can be find here stackoverflow.com/questions/43391729/… – Arvind Gehlot Feb 9 '18 at 7:33
  • Another thing - if you have Java 10 installed, and solr is not working check this blog – Bakudan Sep 20 '18 at 14:13
15

It was because the port was already used by another solr service installed via Bitnami.

Update:
Tried to run solr.cmd start in C:\solr\bin foolder. Appeared that JAVA_HOME environment variable was missing. Adding the variable fixed the service.

  • 2
    Just to expand slightly on this answer, if you find you can start SOLR up via the command line, but the service fails to start as described in the question then you've probably but JAVA_HOME in your 'User Variables' rather than the 'System Variables' – Steve Newstead Dec 15 '17 at 14:48
  • I had also faced the same issue and resolved it. the solution can be find here stackoverflow.com/questions/43391729/… – Arvind Gehlot Feb 9 '18 at 7:32
8

I faced the same problem. The solr starts when we execute solr start -p 8983 on command prompt of solr bin folder. But when we try to start the same from services, then it gives the above error.

Solution : Please check the environment variable path of JAVA_HOME on your system. It should point to the path, where the java has been installed on the system.

I corrected the path, and this solves my problem.

Hope this helps.

Not the answer you're looking for? Browse other questions tagged or ask your own question.