12

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?

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

2 Answers 2

25

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
  • 3
    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' Dec 15, 2017 at 14:48
  • I had also faced the same issue and resolved it. the solution can be find here stackoverflow.com/questions/43391729/… Feb 9, 2018 at 7:32
11

I faced the same problem. The solr starts when we execute solr start -p 8983 on the 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.