Running Solr as a service

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

Running Solr as a service

Zheng Lin Edwin Yeo
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
Reply | Threaded
Open this post in threaded view
|

AW: Running Solr as a service

Eileen Mosch
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 <[hidden email]>
Gesendet: Mittwoch, 14. August 2019 04:46
An: [hidden email]
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
Reply | Threaded
Open this post in threaded view
|

Re: Running Solr as a service

Zheng Lin Edwin Yeo
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 <[hidden email]> 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 <[hidden email]>
> Gesendet: Mittwoch, 14. August 2019 04:46
> An: [hidden email]
> 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
>
Reply | Threaded
Open this post in threaded view
|

AW: Running Solr as a service

Eileen Mosch
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 <[hidden email]>
Gesendet: Mittwoch, 14. August 2019 11:27
An: [hidden email]
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 <[hidden email]> 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 <[hidden email]>
> Gesendet: Mittwoch, 14. August 2019 04:46
> An: [hidden email]
> 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
>
Reply | Threaded
Open this post in threaded view
|

Re: Running Solr as a service

Zheng Lin Edwin Yeo
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 <[hidden email]> 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 <[hidden email]>
> Gesendet: Mittwoch, 14. August 2019 11:27
> An: [hidden email]
> 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 <[hidden email]>
> 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 <[hidden email]>
> > Gesendet: Mittwoch, 14. August 2019 04:46
> > An: [hidden email]
> > 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
> >
>