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 "Karthikeyan.Kannappan" <ka...@gmail.com> on 2014/01/09 08:07:26 UTC

Zookeeper as Service

Is it possible to have zookeeper as a service as like SolrCloud in Tomcat. I
dont want to start the Zookeeper from the command prompt, which will be
difficult to maintain if the machine restarts. If its possible, please share
a link/steps to follow
With Regards,
Karthik



--
View this message in context: http://lucene.472066.n3.nabble.com/Zookeeper-as-Service-tp4110396.html
Sent from the Solr - User mailing list archive at Nabble.com.

Re: Zookeeper as Service

Posted by Peter Keegan <pe...@gmail.com>.
There's also: http://www.tanukisoftware.com/


On Thu, Jan 9, 2014 at 11:18 AM, Nazik Huq <na...@yahoo.com> wrote:

>
>
> From your email I gather your main concern is starting zookeeper on server
> startups.
>
> You may want to look at these non-native service oriented options too:
> Create  a script( cmd or bat) to start ZK on server bootup. This method
> may not restart Zk if Zk crashes(not the server).
> Create C# commad line program that starts on server bootup(see above) that
> uses the .Net System.Diagnostics.Process.Start method to start Zk on
> sever start and monitor the Zk process via a loop. Restart when Zk process
> crash or "hang". I prefer this method. There might be a Java equivalent of
> this. There are many exmaples avaialble on the web.
> Cheers,
> @nazik_huq
>
>
>
> On Thursday, January 9, 2014 10:07 AM, Charlie Hull <ch...@flax.co.uk>
> wrote:
>
> On 09/01/2014 09:44, Karthikeyan.Kannappan wrote:
>
> > I am hosting in windows OS
> >
> >
> >
> > --
> > View this message in context:
> http://lucene.472066.n3.nabble.com/Zookeeper-as-Service-tp4110396p4110413.html
> > Sent from the Solr - User mailing list archive at Nabble.com.
> >
>
> There are various ways to 'servicify' (yes that may not be an actual
> word) executable applications on Windows. The venerable SrvAny is one
> such option as is the newer
>  nssm.exe (Non-Sucking Service Manager).
>
> Bear in mind that a Windows Service doesn't operate quite the same way
> with regard to stdout and stderr which may mean any error messages end
> up in a black hole, with you simply
>  getting something unhelpful 'service
> failed to start' error messages from Windows itself if something goes
> wrong. The 'working directory' is another thing that needs careful
> setting up.
>
> Cheers
>
> Charlie
>
> --
> Charlie Hull
> Flax - Open Source Enterprise Search
>
> tel/fax: +44 (0)8700 118334
> mobile:  +44 (0)7767 825828
> web: www.flax.co.uk
>

Re: Zookeeper as Service

Posted by Nazik Huq <na...@yahoo.com>.

From your email I gather your main concern is starting zookeeper on server startups.

You may want to look at these non-native service oriented options too:
Create  a script( cmd or bat) to start ZK on server bootup. This method may not restart Zk if Zk crashes(not the server).
Create C# commad line program that starts on server bootup(see above) that uses the .Net System.Diagnostics.Process.Start method to start Zk on sever start and monitor the Zk process via a loop. Restart when Zk process crash or "hang". I prefer this method. There might be a Java equivalent of this. There are many exmaples avaialble on the web.
Cheers,
@nazik_huq



On Thursday, January 9, 2014 10:07 AM, Charlie Hull <ch...@flax.co.uk> wrote:
  
On 09/01/2014 09:44, Karthikeyan.Kannappan wrote:

> I am hosting in windows OS
>
>
>
> --
> View this message in context: http://lucene.472066.n3.nabble.com/Zookeeper-as-Service-tp4110396p4110413.html
> Sent from the Solr - User mailing list archive at Nabble.com.
>

There are various ways to 'servicify' (yes that may not be an actual 
word) executable applications on Windows. The venerable SrvAny is one 
such option as is the newer
 nssm.exe (Non-Sucking Service Manager).

Bear in mind that a Windows Service doesn't operate quite the same way 
with regard to stdout and stderr which may mean any error messages end 
up in a black hole, with you simply
 getting something unhelpful 'service 
failed to start' error messages from Windows itself if something goes 
wrong. The 'working directory' is another thing that needs careful 
setting up.

Cheers

Charlie

-- 
Charlie Hull
Flax - Open Source Enterprise Search

tel/fax: +44 (0)8700 118334
mobile:  +44 (0)7767 825828
web: www.flax.co.uk

Re: Zookeeper as Service

Posted by Charlie Hull <ch...@flax.co.uk>.
On 09/01/2014 09:44, Karthikeyan.Kannappan wrote:
> I am hosting in windows OS
>
>
>
> --
> View this message in context: http://lucene.472066.n3.nabble.com/Zookeeper-as-Service-tp4110396p4110413.html
> Sent from the Solr - User mailing list archive at Nabble.com.
>

There are various ways to 'servicify' (yes that may not be an actual 
word) executable applications on Windows. The venerable SrvAny is one 
such option as is the newer nssm.exe (Non-Sucking Service Manager).

Bear in mind that a Windows Service doesn't operate quite the same way 
with regard to stdout and stderr which may mean any error messages end 
up in a black hole, with you simply getting something unhelpful 'service 
failed to start' error messages from Windows itself if something goes 
wrong. The 'working directory' is another thing that needs careful 
setting up.

Cheers

Charlie

-- 
Charlie Hull
Flax - Open Source Enterprise Search

tel/fax: +44 (0)8700 118334
mobile:  +44 (0)7767 825828
web: www.flax.co.uk

Re: Zookeeper as Service

Posted by "Karthikeyan.Kannappan" <ka...@gmail.com>.
I am hosting in windows OS



--
View this message in context: http://lucene.472066.n3.nabble.com/Zookeeper-as-Service-tp4110396p4110413.html
Sent from the Solr - User mailing list archive at Nabble.com.

Re: Zookeeper as Service

Posted by Shawn Heisey <so...@elyograg.org>.
On 1/9/2014 12:07 AM, Karthikeyan.Kannappan wrote:
> Is it possible to have zookeeper as a service as like SolrCloud in Tomcat. I
> dont want to start the Zookeeper from the command prompt, which will be
> difficult to maintain if the machine restarts. If its possible, please share
> a link/steps to follow
> With Regards,
> Karthik

What operating system is this for?  I have a pretty simple way to get it
done on a Linux system, but if it's Windows, I haven't got a clue.

The following is a really short init script that can start zookeeper
installed at /opt/zoo:

#!/bin/sh

# chkconfig: - 75 50
# description: Starts and stops Zookeeper

cd /opt/zoo
bin/zkServer.sh $1