You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-user@lucene.apache.org by Zheng Lin Edwin Yeo <ed...@gmail.com> on 2019/08/14 02:46:26 UTC

Running Solr as a service

Hi,

Is there anyway that we can run Solr as a service, and allow it to start
automatically during the startup of the system?

I have tried to set up the service by using nssm, but it only works for
ZooKeeper and not Solr.

I am using Solr 8.2.0.

Regards,
Edwin

Re: Running Solr as a service

Posted by Zheng Lin Edwin Yeo <ed...@gmail.com>.
Hi Eileen,

I have found that it was due to the "-f" in the command.

The "-f" was not included in my original startup script that is run
manually and not as a service, and it works properly. However, the issue
occurs if I do not include the "-f" when it is run as a service. Now it
works normally after I include it.

Thank you for your help.

Regards,
Edwin

On Wed, 14 Aug 2019 at 19:56, Eileen Mosch <ei...@logiball.de> wrote:

> Hi Edwin,
>
> we also connect to an external Zookeeper cluster wihtout any problems.
>
> If Solr stops/crashes the service stops as well. Sounds like Solr cannot
> connect to Zookeeper. Have you checked if you can access Zookeeper from
> your Solr instance? And have you looked inside solr.log? Or maybe the event
> manager of Windows will have some details?
>
> I have no further ideas here. Sorry.
>
> Regards,
> Eileen
>
> -----Ursprüngliche Nachricht-----
> Von: Zheng Lin Edwin Yeo <ed...@gmail.com>
> Gesendet: Mittwoch, 14. August 2019 11:27
> An: solr-user@lucene.apache.org
> Betreff: Re: Running Solr as a service
>
> Hi Eileen,
>
> Thanks for the reply.
>
> I am using SolrCloud with external ZooKeeper ensemble.
> The service can be started, but the connection to Solr is intermittent. It
> will keep losing connection with Solr, and after which, Solr is not
> functioning.
>
> Any idea on this issue?
>
> Regards,
> Edwin
>
>
> On Wed, 14 Aug 2019 at 15:53, Eileen Mosch <ei...@logiball.de>
> wrote:
>
> > Hi Edwin,
> >
> > yes, it's possible. We already use Solr as service created with
> > nssm.exe and it works fine.
> >
> > Example command:
> > nssm install mySolrService path/to/solr/bin/solr.cmd "start -f -c -z
> > "zkInstance:2181" -p 8983 -s "path/to/store/solr/data" -m 4g"
> >
> > Good luck!
> >
> > Regards,
> > Eileen
> >
> > -----Ursprüngliche Nachricht-----
> > Von: Zheng Lin Edwin Yeo <ed...@gmail.com>
> > Gesendet: Mittwoch, 14. August 2019 04:46
> > An: solr-user@lucene.apache.org
> > Betreff: Running Solr as a service
> >
> > Hi,
> >
> > Is there anyway that we can run Solr as a service, and allow it to
> > start automatically during the startup of the system?
> >
> > I have tried to set up the service by using nssm, but it only works
> > for ZooKeeper and not Solr.
> >
> > I am using Solr 8.2.0.
> >
> > Regards,
> > Edwin
> >
>

AW: Running Solr as a service

Posted by Eileen Mosch <ei...@logiball.de>.
Hi Edwin,

we also connect to an external Zookeeper cluster wihtout any problems.

If Solr stops/crashes the service stops as well. Sounds like Solr cannot connect to Zookeeper. Have you checked if you can access Zookeeper from your Solr instance? And have you looked inside solr.log? Or maybe the event manager of Windows will have some details?

I have no further ideas here. Sorry.

Regards,
Eileen

-----Ursprüngliche Nachricht-----
Von: Zheng Lin Edwin Yeo <ed...@gmail.com> 
Gesendet: Mittwoch, 14. August 2019 11:27
An: solr-user@lucene.apache.org
Betreff: Re: Running Solr as a service

Hi Eileen,

Thanks for the reply.

I am using SolrCloud with external ZooKeeper ensemble.
The service can be started, but the connection to Solr is intermittent. It will keep losing connection with Solr, and after which, Solr is not functioning.

Any idea on this issue?

Regards,
Edwin


On Wed, 14 Aug 2019 at 15:53, Eileen Mosch <ei...@logiball.de> wrote:

> Hi Edwin,
>
> yes, it's possible. We already use Solr as service created with 
> nssm.exe and it works fine.
>
> Example command:
> nssm install mySolrService path/to/solr/bin/solr.cmd "start -f -c -z 
> "zkInstance:2181" -p 8983 -s "path/to/store/solr/data" -m 4g"
>
> Good luck!
>
> Regards,
> Eileen
>
> -----Ursprüngliche Nachricht-----
> Von: Zheng Lin Edwin Yeo <ed...@gmail.com>
> Gesendet: Mittwoch, 14. August 2019 04:46
> An: solr-user@lucene.apache.org
> Betreff: Running Solr as a service
>
> Hi,
>
> Is there anyway that we can run Solr as a service, and allow it to 
> start automatically during the startup of the system?
>
> I have tried to set up the service by using nssm, but it only works 
> for ZooKeeper and not Solr.
>
> I am using Solr 8.2.0.
>
> Regards,
> Edwin
>

Re: Running Solr as a service

Posted by Zheng Lin Edwin Yeo <ed...@gmail.com>.
Hi Eileen,

Thanks for the reply.

I am using SolrCloud with external ZooKeeper ensemble.
The service can be started, but the connection to Solr is intermittent. It
will keep losing connection with Solr, and after which, Solr is not
functioning.

Any idea on this issue?

Regards,
Edwin


On Wed, 14 Aug 2019 at 15:53, Eileen Mosch <ei...@logiball.de> wrote:

> Hi Edwin,
>
> yes, it's possible. We already use Solr as service created with nssm.exe
> and it works fine.
>
> Example command:
> nssm install mySolrService path/to/solr/bin/solr.cmd "start -f -c -z
> "zkInstance:2181" -p 8983 -s "path/to/store/solr/data" -m 4g"
>
> Good luck!
>
> Regards,
> Eileen
>
> -----Ursprüngliche Nachricht-----
> Von: Zheng Lin Edwin Yeo <ed...@gmail.com>
> Gesendet: Mittwoch, 14. August 2019 04:46
> An: solr-user@lucene.apache.org
> Betreff: Running Solr as a service
>
> Hi,
>
> Is there anyway that we can run Solr as a service, and allow it to start
> automatically during the startup of the system?
>
> I have tried to set up the service by using nssm, but it only works for
> ZooKeeper and not Solr.
>
> I am using Solr 8.2.0.
>
> Regards,
> Edwin
>

AW: Running Solr as a service

Posted by Eileen Mosch <ei...@logiball.de>.
Hi Edwin,

yes, it's possible. We already use Solr as service created with nssm.exe and it works fine.

Example command:
nssm install mySolrService path/to/solr/bin/solr.cmd "start -f -c -z "zkInstance:2181" -p 8983 -s "path/to/store/solr/data" -m 4g"

Good luck!

Regards,
Eileen

-----Ursprüngliche Nachricht-----
Von: Zheng Lin Edwin Yeo <ed...@gmail.com> 
Gesendet: Mittwoch, 14. August 2019 04:46
An: solr-user@lucene.apache.org
Betreff: Running Solr as a service

Hi,

Is there anyway that we can run Solr as a service, and allow it to start automatically during the startup of the system?

I have tried to set up the service by using nssm, but it only works for ZooKeeper and not Solr.

I am using Solr 8.2.0.

Regards,
Edwin