You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@zookeeper.apache.org by Ben Sherman <be...@gmail.com> on 2016/11/29 19:54:37 UTC
four letter commands not working as expected.
Four letter word ruok is returning imok when the server is decidedly not
okay - is this the expected behavior?
bsherman@zk1:~$ nc localhost 2181 <<< mntr
This ZooKeeper instance is not currently serving requests
bsherman@zk1:~$ nc localhost 2181 <<< ruok
imok
I'm running 3.4.9.
--ben
Re: four letter commands not working as expected.
Posted by Chris Nauroth <cn...@apache.org>.
Yes, FWIW, I've generally had better success monitoring "stat", "srvr" or
"mntr". Any of these can tell you the server's leader/follower state, and
the latter offers a rich set of usage metrics. There are more details in
the documentation here:
https://zookeeper.apache.org/doc/r3.4.9/zookeeperAdmin.html#sc_zkCommands
Chris Nauroth
On Wed, Nov 30, 2016 at 10:52 AM, Michael Han <ha...@cloudera.com> wrote:
> 'ruok' is the very basic sanity check of the ZooKeeper server process - it
> will return ok as long as the server process is up and reachable through
> network (in fact, the server does not nothing but immediately return ok
> upon receives 'ruok' request).
> 'ruup' does seem a better naming semantically to me.
>
> On Tue, Nov 29, 2016 at 5:10 PM, Ben Sherman <be...@gmail.com> wrote:
>
> > I expect if none of the 4 letter commands except ruok give a response,
> then
> > the server is definitively not okay. ruup vs ruok maybe? We see the
> server
> > popping into a looking state quite often, and it's the cause of 100% of
> our
> > outages involving zookeeper. This isn't an initial state, it's down
> until
> > a restart.
> >
> > On Tue, Nov 29, 2016 at 3:08 PM, Flavio Junqueira <fp...@apache.org>
> wrote:
> >
> > > It looks like the server is in the LOOKING state, so it is not serving
> > > request but it is up. I'd say that ruok should return imok as long as
> the
> > > server is up, it's not necessarily a health check. We could review the
> > > semantics of the commands if this behavior and others are confusing.
> > >
> > > -Flavio
> > >
> > >
> > > > On 29 Nov 2016, at 19:54, Ben Sherman <be...@gmail.com> wrote:
> > > >
> > > > Four letter word ruok is returning imok when the server is decidedly
> > not
> > > > okay - is this the expected behavior?
> > > >
> > > > bsherman@zk1:~$ nc localhost 2181 <<< mntr
> > > > This ZooKeeper instance is not currently serving requests
> > > > bsherman@zk1:~$ nc localhost 2181 <<< ruok
> > > > imok
> > > >
> > > > I'm running 3.4.9.
> > > >
> > > > --ben
> > >
> > >
> >
>
>
>
> --
> Cheers
> Michael.
>
Re: four letter commands not working as expected.
Posted by Michael Han <ha...@cloudera.com>.
'ruok' is the very basic sanity check of the ZooKeeper server process - it
will return ok as long as the server process is up and reachable through
network (in fact, the server does not nothing but immediately return ok
upon receives 'ruok' request).
'ruup' does seem a better naming semantically to me.
On Tue, Nov 29, 2016 at 5:10 PM, Ben Sherman <be...@gmail.com> wrote:
> I expect if none of the 4 letter commands except ruok give a response, then
> the server is definitively not okay. ruup vs ruok maybe? We see the server
> popping into a looking state quite often, and it's the cause of 100% of our
> outages involving zookeeper. This isn't an initial state, it's down until
> a restart.
>
> On Tue, Nov 29, 2016 at 3:08 PM, Flavio Junqueira <fp...@apache.org> wrote:
>
> > It looks like the server is in the LOOKING state, so it is not serving
> > request but it is up. I'd say that ruok should return imok as long as the
> > server is up, it's not necessarily a health check. We could review the
> > semantics of the commands if this behavior and others are confusing.
> >
> > -Flavio
> >
> >
> > > On 29 Nov 2016, at 19:54, Ben Sherman <be...@gmail.com> wrote:
> > >
> > > Four letter word ruok is returning imok when the server is decidedly
> not
> > > okay - is this the expected behavior?
> > >
> > > bsherman@zk1:~$ nc localhost 2181 <<< mntr
> > > This ZooKeeper instance is not currently serving requests
> > > bsherman@zk1:~$ nc localhost 2181 <<< ruok
> > > imok
> > >
> > > I'm running 3.4.9.
> > >
> > > --ben
> >
> >
>
--
Cheers
Michael.
Re: four letter commands not working as expected.
Posted by Ben Sherman <be...@gmail.com>.
I expect if none of the 4 letter commands except ruok give a response, then
the server is definitively not okay. ruup vs ruok maybe? We see the server
popping into a looking state quite often, and it's the cause of 100% of our
outages involving zookeeper. This isn't an initial state, it's down until
a restart.
On Tue, Nov 29, 2016 at 3:08 PM, Flavio Junqueira <fp...@apache.org> wrote:
> It looks like the server is in the LOOKING state, so it is not serving
> request but it is up. I'd say that ruok should return imok as long as the
> server is up, it's not necessarily a health check. We could review the
> semantics of the commands if this behavior and others are confusing.
>
> -Flavio
>
>
> > On 29 Nov 2016, at 19:54, Ben Sherman <be...@gmail.com> wrote:
> >
> > Four letter word ruok is returning imok when the server is decidedly not
> > okay - is this the expected behavior?
> >
> > bsherman@zk1:~$ nc localhost 2181 <<< mntr
> > This ZooKeeper instance is not currently serving requests
> > bsherman@zk1:~$ nc localhost 2181 <<< ruok
> > imok
> >
> > I'm running 3.4.9.
> >
> > --ben
>
>
Re: four letter commands not working as expected.
Posted by Flavio Junqueira <fp...@apache.org>.
It looks like the server is in the LOOKING state, so it is not serving request but it is up. I'd say that ruok should return imok as long as the server is up, it's not necessarily a health check. We could review the semantics of the commands if this behavior and others are confusing.
-Flavio
> On 29 Nov 2016, at 19:54, Ben Sherman <be...@gmail.com> wrote:
>
> Four letter word ruok is returning imok when the server is decidedly not
> okay - is this the expected behavior?
>
> bsherman@zk1:~$ nc localhost 2181 <<< mntr
> This ZooKeeper instance is not currently serving requests
> bsherman@zk1:~$ nc localhost 2181 <<< ruok
> imok
>
> I'm running 3.4.9.
>
> --ben