I recently had the problem that my SOLR Service was not starting all of a sudden. So I searched the internet and asked colleages but I had quite a hard time figuring out what the issue was. So here is a summary of possible reasons that you can check.
I usually install SOLR through a script created by Jeremy Davis (you can find it here).
I had several SOLR Versions installed already all starting using a different port to differentiate them.
But all of a sudden, they were not started automatically anymore with start of the computer. Also a manual start through the Services App was not possible. But manual start in command prompt (in bin folder) using solr.cmd start started it with port 8983 and using solr.cmd start -p 8750 started it with Port 8750.
Here you find the 3 most common reasons:
Scroll down for details :-)
In Windows 10 hit Windows key or Start button and type "Windows Services".
Start the Services App.
Search for your service and see if status is Running.
Running = OK
Paused = not OK
nothing = not OK
Hit Start the service
If it starts, don't read further ;-) If it doesn't hope you find a solution in this blogpost.
As I had updated my Java Version, that was actually the reason for me.
You can check two things here:
Check the path you have installed Java. In my case it is C:\Program Files\Java\jre1.8.0_221
a) in Windows 10 hit start/ windows button and type/search "System Variables"
b) In System Properties dialog on Advanced Tab hit "Environment Variables" Button
c) Check your JAVA_HOME Variable. Is the path correctly pointing to your Java JRE folder? If not Edit.
While browsing for reasons why my SOLR Service is not starting one reason pointed out in some pages was that the nssm version is not correct. It was pointed out that the featured pre-release nssm 2.24-101-g897c7ad should be used (check here).
As the Script by Jeremy Davis creates SOLR service using nssm I checked if service be started using correct port.
a) Open Command Prompt
b) navigate to C:\nssm\nssm-2.24\win64
c) type nssm.exe edit [SERVICE_NAME] e.g. nssm.exe edit solr-7.5.0
d) Check if arguments, path and startup directory (in Application Tab) are set correctly. Arguments should show: to -f -p 8750 (or what ever port you want to use)
a) So I downloaded this version.
b) placed it under C:\nssm\
c) Open command prompt as Administrator
d) navigate to your newly added nssm e.g.: C:\nssm\nssm-2.24-101-g897c7ad\win64
d) type nssm.exe install [Service_Name] e.g.: nssm.exe install solr75-1
e) fill in Path e.g.: C:\solr\solr-7.5.0\bin\solr.cmd
f) Startup Directory is created automatically
g) fill in Argutments: -f -p [Your PORT] e.g.: -f -p 8750
h) Your Service should now appear in Service App. Try to Start it.
Check your certificates and create new ones. You can find a good article I used here. No need to rewrite it: https://www.thewindowsclub.com/manage-trusted-root-certificates-windows
To open Console Root type mmc to your run box.
Just in case your tryed and errored like I did you should cleanup the windows services that you created and don't need anymore.
a) Open Command Prompt as Admin
b) Type sc delete [Service_Name] e.g.: sc delete solr75test2
Note: if you do not have permission to delete the service you probably did not open cmd prompt as admin.
Created: 17.10.2019
SOLR