Solr does not find cores when started as a Windows Service

503 views Asked by At

On Windows Server 2012 R2:

I'd like to run Solr as a Windows Service. But if I do so (via NSSM 2.24), the service restarts every few seconds and the Solr cores are not found (the backend says: No cores available). This is my NSSM configuration: NSSM config When I start Solr with the common command

solr start -p 8991 -m 1g

Solr works as expected.

I tried to modify the Path to D:\SOLR\bc-solr5-dev\bin\solr, but then, the service won't start.

The same behavior can be observed by using Solr 6.

What am I doing wrong?

1

There are 1 answers

0
AudioBubble On BEST ANSWER

Well, that was easy... I just forgot to put the -f flag into the NSSM configs

start -f -p 8991 -m 1g

NSSM needs the service to be running in foreground so that it can stop it successfully and so on.