Re: java.lang.NullPointerException on some commands (stats, conf)

2020-01-01 Thread Szalay-Bekő Máté
I am not sure, based on the email... Mike, can you clarify?

I tested it on the master branch and ruok sent back the same small JSON for
me on both secure-only and unsecure deployment. Although I haven't tested
it on 3.5.

Kind regards,
Mate

On Wed, Jan 1, 2020 at 2:44 PM Enrico Olivelli  wrote:

> Mate,
>
> IIUC Mike is sayisaying that no json is returned at all
>
>
> Enrico
>
>
> Il mer 1 gen 2020, 11:22 Szalay-Bekő Máté  ha
> scritto:
>
> > Hi Mike,
> >
> > the ruok command is used to find out if the server is running or not. In
> > this case, no specific response is needed, the json you get is the
> expected
> > outcome both in secure and in unsecure mode. The idea is that you can
> poll
> > this url and as long as you get back a 200 OK HTTP status response, you
> can
> > see that the given ZooKeeper server process is up.
> >
> > (this interface was mapped from the the ruok telnet command which also
> only
> > responses with a hardcoded "imok" text all the time)
> >
> > Kind regards,
> > Mate
> >
> > On Mon, Dec 30, 2019 at 5:55 PM Mike Smotritsky <
> mikesmotrit...@ongov.net>
> > wrote:
> >
> > > Hi Enrico, no - log is absolutely clean...other commands work well
> now...
> > >
> > > Thanks and Regards,
> > >
> > > Mike
> > >
> > > -Original Message-
> > > From: Enrico Olivelli [mailto:eolive...@gmail.com]
> > > Sent: Monday, December 30, 2019 8:24 AM
> > > To: UserZooKeeper
> > > Subject: Re: java.lang.NullPointerException on some commands (stats,
> > conf)
> > >
> > > Hi Mike
> > > Do you see errors on server logs?
> > >
> > >
> > > Enrico
> > >
> > > Il lun 30 dic 2019, 14:10 Mike Smotritsky 
> ha
> > > scritto:
> > >
> > > > Hey guys, Happy Holidays and thanks again for the fix!
> > > >
> > > > I've noticed that ruok in only secure mode gives no answer back at
> > all...
> > > > That's what I get back:
> > > > {
> > > >   "command" : "ruok",
> > > >   "error" : null
> > > > }
> > > >
> > > > Thanks and Regards,
> > > >
> > > > Mike
> > > >
> > > >
> > > > -Original Message-
> > > > From: Mate Szalay-Beko [mailto:msza...@cloudera.com.INVALID]
> > > > Sent: Friday, December 06, 2019 5:06 AM
> > > > To: user@zookeeper.apache.org
> > > > Subject: Re: java.lang.NullPointerException on some commands (stats,
> > > conf)
> > > >
> > > > yep, in general I think it makes sense to try / get used to build
> > > ZooKeeper
> > > > (or any other OpenSource product you use), one can never know when he
> > > > needs a security patch or bugfix. :)
> > > >
> > > > Anyway, as I already have my environment ready, I did a quick build
> and
> > > > shared it with Mike.
> > > >
> > > > Cheers,
> > > > Mate
> > > >
> > > > On Thu, Dec 5, 2019 at 4:35 PM Enrico Olivelli 
> > > > wrote:
> > > >
> > > > > Just run these commands:
> > > > >
> > > > > git clone https://github.com/apache/zookeeper
> > > > > git checkout branch-3.5
> > > > > mvn clean install -DskipTests
> > > > >
> > > > > you will find binaries for 3.5.7-SNAPSHOT inside
> > > > > "zookeeper-assembly/target"
> > > > >
> > > > > if you want to run unit tests run the command without
> '-DskipTests':
> > > > > mvn clean install
> > > > >
> > > > > you need "git", "Apache Maven" and a Java JDK 8.x (or greater),
> like
> > > the
> > > > > one from AdoptOpenJDK or which one you prefer
> > > > >
> > > > > Hope that helps
> > > > >
> > > > > Enrico
> > > > >
> > > > > Il giorno gio 5 dic 2019 alle ore 16:19 Mike Smotritsky <
> > > > > mikesmotrit...@ongov.net> ha scritto:
> > > > >
> > > > > > Hey Enrico,
> > > > > > If Mate can help to cut it - it would be great, if not - I'll
> need
> > > more
> > > > > > detailed instructions on how to cut it please.
> > > > > >
> > > > > > Thanks and Regards,
> > > > > > Mike
> > > > > >
> > > > > > -Original Message-
> > > > > > From: Enrico Olivelli [mailto:eolive...@gmail.com]
> > > > > > Sent: Thursday, December 05, 2019 10:08 AM
> > > > > > To: UserZooKeeper
> > > > > > Subject: Re: java.lang.NullPointerException on some commands
> > (stats,
> > > > > conf)
> > > > > >
> > > > > > Mike
> > > > > >
> > > > > > Il giorno gio 5 dic 2019 alle ore 15:55 Mike Smotritsky <
> > > > > > mikesmotrit...@ongov.net> ha scritto:
> > > > > >
> > > > > > > Hey Mate, thank you very much for a very quick action on this
> > > issue.
> > > > > > > If it's not very difficult can you please cut me a patched
> 3.5.6?
> > > > > > >
> > > > > >
> > > > > > I think the best procedure is that you build your own patched
> > version
> > > > by
> > > > > > yourself.
> > > > > > Just "mvn clean install -DskipTests" on branch-3.5
> > > > > >
> > > > > > Please be aware that the binaries you are going to use are not an
> > > > > official
> > > > > > Apache release.
> > > > > > I think it is fine, many companies run their own patched version
> of
> > > > Open
> > > > > > Source software
> > > > > >
> > > > > > Just my 2 cents
> > > > > >
> > > > > > Enrico
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > > > Again I very much 

Re: java.lang.NullPointerException on some commands (stats, conf)

2020-01-01 Thread Enrico Olivelli
Mate,

IIUC Mike is sayisaying that no json is returned at all


Enrico


Il mer 1 gen 2020, 11:22 Szalay-Bekő Máté  ha
scritto:

> Hi Mike,
>
> the ruok command is used to find out if the server is running or not. In
> this case, no specific response is needed, the json you get is the expected
> outcome both in secure and in unsecure mode. The idea is that you can poll
> this url and as long as you get back a 200 OK HTTP status response, you can
> see that the given ZooKeeper server process is up.
>
> (this interface was mapped from the the ruok telnet command which also only
> responses with a hardcoded "imok" text all the time)
>
> Kind regards,
> Mate
>
> On Mon, Dec 30, 2019 at 5:55 PM Mike Smotritsky 
> wrote:
>
> > Hi Enrico, no - log is absolutely clean...other commands work well now...
> >
> > Thanks and Regards,
> >
> > Mike
> >
> > -Original Message-
> > From: Enrico Olivelli [mailto:eolive...@gmail.com]
> > Sent: Monday, December 30, 2019 8:24 AM
> > To: UserZooKeeper
> > Subject: Re: java.lang.NullPointerException on some commands (stats,
> conf)
> >
> > Hi Mike
> > Do you see errors on server logs?
> >
> >
> > Enrico
> >
> > Il lun 30 dic 2019, 14:10 Mike Smotritsky  ha
> > scritto:
> >
> > > Hey guys, Happy Holidays and thanks again for the fix!
> > >
> > > I've noticed that ruok in only secure mode gives no answer back at
> all...
> > > That's what I get back:
> > > {
> > >   "command" : "ruok",
> > >   "error" : null
> > > }
> > >
> > > Thanks and Regards,
> > >
> > > Mike
> > >
> > >
> > > -Original Message-
> > > From: Mate Szalay-Beko [mailto:msza...@cloudera.com.INVALID]
> > > Sent: Friday, December 06, 2019 5:06 AM
> > > To: user@zookeeper.apache.org
> > > Subject: Re: java.lang.NullPointerException on some commands (stats,
> > conf)
> > >
> > > yep, in general I think it makes sense to try / get used to build
> > ZooKeeper
> > > (or any other OpenSource product you use), one can never know when he
> > > needs a security patch or bugfix. :)
> > >
> > > Anyway, as I already have my environment ready, I did a quick build and
> > > shared it with Mike.
> > >
> > > Cheers,
> > > Mate
> > >
> > > On Thu, Dec 5, 2019 at 4:35 PM Enrico Olivelli 
> > > wrote:
> > >
> > > > Just run these commands:
> > > >
> > > > git clone https://github.com/apache/zookeeper
> > > > git checkout branch-3.5
> > > > mvn clean install -DskipTests
> > > >
> > > > you will find binaries for 3.5.7-SNAPSHOT inside
> > > > "zookeeper-assembly/target"
> > > >
> > > > if you want to run unit tests run the command without '-DskipTests':
> > > > mvn clean install
> > > >
> > > > you need "git", "Apache Maven" and a Java JDK 8.x (or greater), like
> > the
> > > > one from AdoptOpenJDK or which one you prefer
> > > >
> > > > Hope that helps
> > > >
> > > > Enrico
> > > >
> > > > Il giorno gio 5 dic 2019 alle ore 16:19 Mike Smotritsky <
> > > > mikesmotrit...@ongov.net> ha scritto:
> > > >
> > > > > Hey Enrico,
> > > > > If Mate can help to cut it - it would be great, if not - I'll need
> > more
> > > > > detailed instructions on how to cut it please.
> > > > >
> > > > > Thanks and Regards,
> > > > > Mike
> > > > >
> > > > > -Original Message-
> > > > > From: Enrico Olivelli [mailto:eolive...@gmail.com]
> > > > > Sent: Thursday, December 05, 2019 10:08 AM
> > > > > To: UserZooKeeper
> > > > > Subject: Re: java.lang.NullPointerException on some commands
> (stats,
> > > > conf)
> > > > >
> > > > > Mike
> > > > >
> > > > > Il giorno gio 5 dic 2019 alle ore 15:55 Mike Smotritsky <
> > > > > mikesmotrit...@ongov.net> ha scritto:
> > > > >
> > > > > > Hey Mate, thank you very much for a very quick action on this
> > issue.
> > > > > > If it's not very difficult can you please cut me a patched 3.5.6?
> > > > > >
> > > > >
> > > > > I think the best procedure is that you build your own patched
> version
> > > by
> > > > > yourself.
> > > > > Just "mvn clean install -DskipTests" on branch-3.5
> > > > >
> > > > > Please be aware that the binaries you are going to use are not an
> > > > official
> > > > > Apache release.
> > > > > I think it is fine, many companies run their own patched version of
> > > Open
> > > > > Source software
> > > > >
> > > > > Just my 2 cents
> > > > >
> > > > > Enrico
> > > > >
> > > > >
> > > > >
> > > > >
> > > > > > Again I very much appreciate your help!
> > > > > >
> > > > > > You guys have a very dedicated team on this project!
> > > > > >
> > > > > > Thanks and Regards,
> > > > > > Mike
> > > > > >
> > > > > > -Original Message-
> > > > > > From: Mate Szalay-Beko [mailto:msza...@cloudera.com.INVALID]
> > > > > > Sent: Thursday, December 05, 2019 3:48 AM
> > > > > > To: user@zookeeper.apache.org
> > > > > > Subject: Re: java.lang.NullPointerException on some commands
> > (stats,
> > > > > conf)
> > > > > >
> > > > > > Hi Mike,
> > > > > >
> > > > > > 3.5.6 was already released a couple of weeks ago. Norbert
> > > cherry-picked
> > > > > the
> > > > > > NPE fix to 

Re: java.lang.NullPointerException on some commands (stats, conf)

2020-01-01 Thread Szalay-Bekő Máté
Hi Mike,

the ruok command is used to find out if the server is running or not. In
this case, no specific response is needed, the json you get is the expected
outcome both in secure and in unsecure mode. The idea is that you can poll
this url and as long as you get back a 200 OK HTTP status response, you can
see that the given ZooKeeper server process is up.

(this interface was mapped from the the ruok telnet command which also only
responses with a hardcoded "imok" text all the time)

Kind regards,
Mate

On Mon, Dec 30, 2019 at 5:55 PM Mike Smotritsky 
wrote:

> Hi Enrico, no - log is absolutely clean...other commands work well now...
>
> Thanks and Regards,
>
> Mike
>
> -Original Message-
> From: Enrico Olivelli [mailto:eolive...@gmail.com]
> Sent: Monday, December 30, 2019 8:24 AM
> To: UserZooKeeper
> Subject: Re: java.lang.NullPointerException on some commands (stats, conf)
>
> Hi Mike
> Do you see errors on server logs?
>
>
> Enrico
>
> Il lun 30 dic 2019, 14:10 Mike Smotritsky  ha
> scritto:
>
> > Hey guys, Happy Holidays and thanks again for the fix!
> >
> > I've noticed that ruok in only secure mode gives no answer back at all...
> > That's what I get back:
> > {
> >   "command" : "ruok",
> >   "error" : null
> > }
> >
> > Thanks and Regards,
> >
> > Mike
> >
> >
> > -Original Message-
> > From: Mate Szalay-Beko [mailto:msza...@cloudera.com.INVALID]
> > Sent: Friday, December 06, 2019 5:06 AM
> > To: user@zookeeper.apache.org
> > Subject: Re: java.lang.NullPointerException on some commands (stats,
> conf)
> >
> > yep, in general I think it makes sense to try / get used to build
> ZooKeeper
> > (or any other OpenSource product you use), one can never know when he
> > needs a security patch or bugfix. :)
> >
> > Anyway, as I already have my environment ready, I did a quick build and
> > shared it with Mike.
> >
> > Cheers,
> > Mate
> >
> > On Thu, Dec 5, 2019 at 4:35 PM Enrico Olivelli 
> > wrote:
> >
> > > Just run these commands:
> > >
> > > git clone https://github.com/apache/zookeeper
> > > git checkout branch-3.5
> > > mvn clean install -DskipTests
> > >
> > > you will find binaries for 3.5.7-SNAPSHOT inside
> > > "zookeeper-assembly/target"
> > >
> > > if you want to run unit tests run the command without '-DskipTests':
> > > mvn clean install
> > >
> > > you need "git", "Apache Maven" and a Java JDK 8.x (or greater), like
> the
> > > one from AdoptOpenJDK or which one you prefer
> > >
> > > Hope that helps
> > >
> > > Enrico
> > >
> > > Il giorno gio 5 dic 2019 alle ore 16:19 Mike Smotritsky <
> > > mikesmotrit...@ongov.net> ha scritto:
> > >
> > > > Hey Enrico,
> > > > If Mate can help to cut it - it would be great, if not - I'll need
> more
> > > > detailed instructions on how to cut it please.
> > > >
> > > > Thanks and Regards,
> > > > Mike
> > > >
> > > > -Original Message-
> > > > From: Enrico Olivelli [mailto:eolive...@gmail.com]
> > > > Sent: Thursday, December 05, 2019 10:08 AM
> > > > To: UserZooKeeper
> > > > Subject: Re: java.lang.NullPointerException on some commands (stats,
> > > conf)
> > > >
> > > > Mike
> > > >
> > > > Il giorno gio 5 dic 2019 alle ore 15:55 Mike Smotritsky <
> > > > mikesmotrit...@ongov.net> ha scritto:
> > > >
> > > > > Hey Mate, thank you very much for a very quick action on this
> issue.
> > > > > If it's not very difficult can you please cut me a patched 3.5.6?
> > > > >
> > > >
> > > > I think the best procedure is that you build your own patched version
> > by
> > > > yourself.
> > > > Just "mvn clean install -DskipTests" on branch-3.5
> > > >
> > > > Please be aware that the binaries you are going to use are not an
> > > official
> > > > Apache release.
> > > > I think it is fine, many companies run their own patched version of
> > Open
> > > > Source software
> > > >
> > > > Just my 2 cents
> > > >
> > > > Enrico
> > > >
> > > >
> > > >
> > > >
> > > > > Again I very much appreciate your help!
> > > > >
> > > > > You guys have a very dedicated team on this project!
> > > > >
> > > > > Thanks and Regards,
> > > > > Mike
> > > > >
> > > > > -Original Message-
> > > > > From: Mate Szalay-Beko [mailto:msza...@cloudera.com.INVALID]
> > > > > Sent: Thursday, December 05, 2019 3:48 AM
> > > > > To: user@zookeeper.apache.org
> > > > > Subject: Re: java.lang.NullPointerException on some commands
> (stats,
> > > > conf)
> > > > >
> > > > > Hi Mike,
> > > > >
> > > > > 3.5.6 was already released a couple of weeks ago. Norbert
> > cherry-picked
> > > > the
> > > > > NPE fix to branch 3.5, so the question is if we will have a 3.5.7
> or
> > > not.
> > > > > BTW if it is a blocker for you, I can create you a personal /
> > > unofficial
> > > > > patched version of 3.5.6 which contains this fix and then you can
> use
> > > it
> > > > > until you would have 3.6 or 3.5.7 later.
> > > > >
> > > > > You can do this for yourself as well, by cloning the 3.5 branch (
> > > > > https://github.com/apache/zookeeper/tree/branch-3.5) and