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

2019-11-28 Thread Mate Szalay-Beko
FYI: https://jira.apache.org/jira/browse/ZOOKEEPER-3633


On Thu, Nov 28, 2019 at 4:53 PM Mate Szalay-Beko 
wrote:

> Hi Mike,
>
> I was able to reproduce the issue. I guess in your config you are using
> client SSL. You defined 'secureClientPort', but no regular 'clientPort'.
> I think we missed to test the admin API for this case... I will create a
> Jira issue and try to fix it soon.
>
> Thanks for your time on testing ZooKeeper and reporting the problem! :)
>
> Mate
>
> On Wed, Nov 27, 2019 at 8:56 PM Mike Smotritsky 
> wrote:
>
>> Hi, I've installed 3.5.5 and 3.5.6 3-server cluster. Secured and using
>> SSLQuorum.
>> All works well except that I'm getting NullPointerException when invoking
>> certain commands through Web AdminServer (stats,conf)
>> Others works well.
>> 
>> java.lang.NullPointerException
>> at
>> org.apache.zookeeper.server.ZooKeeperServer.getConf(ZooKeeperServer.java:220)
>> at
>> org.apache.zookeeper.server.admin.Commands$ConfCommand.run(Commands.java:162)
>> at
>> org.apache.zookeeper.server.admin.Commands.runCommand(Commands.java:95)
>> at
>> org.apache.zookeeper.server.admin.JettyAdminServer$CommandServlet.doGet(JettyAdminServer.java:175)
>> at javax.servlet.http.HttpServlet.service(HttpServlet.java:687)
>> at javax.servlet.http.HttpServlet.service(HttpServlet.java:790)
>> at
>> org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:873)
>> at
>> org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:542)
>> at
>> org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:255)
>> at
>> org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:1700)
>> at
>> org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:255)
>> at
>> org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1345)
>> at
>> org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:203)
>> at
>> org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:480)
>> at
>> org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:1667)
>> at
>> org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:201)
>> at
>> org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1247)
>> at
>> org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:144)
>> at
>> org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:132)
>> at org.eclipse.jetty.server.Server.handle(Server.java:505)
>> at
>> org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:370)
>> at
>> org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:267)
>> at org.eclipse.jetty.io
>> .AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:305)
>> at org.eclipse.jetty.io
>> .FillInterest.fillable(FillInterest.java:103)
>> at org.eclipse.jetty.io
>> .ChannelEndPoint$2.run(ChannelEndPoint.java:117)
>> at
>> org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.runTask(EatWhatYouKill.java:333)
>> at
>> org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.doProduce(EatWhatYouKill.java:310)
>> at
>> org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.tryProduce(EatWhatYouKill.java:168)
>> at
>> org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.run(EatWhatYouKill.java:126)
>> at
>> org.eclipse.jetty.util.thread.ReservedThreadExecutor$ReservedThread.run(ReservedThreadExecutor.java:366)
>> at
>> org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:786)
>> at
>> org.eclipse.jetty.util.thread.QueuedThreadPool$2.run(QueuedThreadPool.java:743)
>> at java.base/java.lang.Thread.run(Thread.java:834)
>> java.lang.NullPointerException
>> at
>> org.apache.zookeeper.server.admin.Commands$StatCommand.run(Commands.java:461)
>> at
>> org.apache.zookeeper.server.admin.Commands.runCommand(Commands.java:95)
>> at
>> org.apache.zookeeper.server.admin.JettyAdminServer$CommandServlet.doGet(JettyAdminServer.java:175)
>> at javax.servlet.http.HttpServlet.service(HttpServlet.java:687)
>> at javax.servlet.http.HttpServlet.service(HttpServlet.java:790)
>> at
>> org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:873)
>> at
>> org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:542)
>> at
>> org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:255)
>> at
>> org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:1700)
>> at
>> org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:255)
>> at
>> 

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

2019-11-28 Thread Mate Szalay-Beko
Hi Mike,

I was able to reproduce the issue. I guess in your config you are using
client SSL. You defined 'secureClientPort', but no regular 'clientPort'.
I think we missed to test the admin API for this case... I will create a
Jira issue and try to fix it soon.

Thanks for your time on testing ZooKeeper and reporting the problem! :)

Mate

On Wed, Nov 27, 2019 at 8:56 PM Mike Smotritsky 
wrote:

> Hi, I've installed 3.5.5 and 3.5.6 3-server cluster. Secured and using
> SSLQuorum.
> All works well except that I'm getting NullPointerException when invoking
> certain commands through Web AdminServer (stats,conf)
> Others works well.
> 
> java.lang.NullPointerException
> at
> org.apache.zookeeper.server.ZooKeeperServer.getConf(ZooKeeperServer.java:220)
> at
> org.apache.zookeeper.server.admin.Commands$ConfCommand.run(Commands.java:162)
> at
> org.apache.zookeeper.server.admin.Commands.runCommand(Commands.java:95)
> at
> org.apache.zookeeper.server.admin.JettyAdminServer$CommandServlet.doGet(JettyAdminServer.java:175)
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:687)
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:790)
> at
> org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:873)
> at
> org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:542)
> at
> org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:255)
> at
> org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:1700)
> at
> org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:255)
> at
> org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1345)
> at
> org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:203)
> at
> org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:480)
> at
> org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:1667)
> at
> org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:201)
> at
> org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1247)
> at
> org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:144)
> at
> org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:132)
> at org.eclipse.jetty.server.Server.handle(Server.java:505)
> at
> org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:370)
> at
> org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:267)
> at org.eclipse.jetty.io
> .AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:305)
> at org.eclipse.jetty.io
> .FillInterest.fillable(FillInterest.java:103)
> at org.eclipse.jetty.io
> .ChannelEndPoint$2.run(ChannelEndPoint.java:117)
> at
> org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.runTask(EatWhatYouKill.java:333)
> at
> org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.doProduce(EatWhatYouKill.java:310)
> at
> org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.tryProduce(EatWhatYouKill.java:168)
> at
> org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.run(EatWhatYouKill.java:126)
> at
> org.eclipse.jetty.util.thread.ReservedThreadExecutor$ReservedThread.run(ReservedThreadExecutor.java:366)
> at
> org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:786)
> at
> org.eclipse.jetty.util.thread.QueuedThreadPool$2.run(QueuedThreadPool.java:743)
> at java.base/java.lang.Thread.run(Thread.java:834)
> java.lang.NullPointerException
> at
> org.apache.zookeeper.server.admin.Commands$StatCommand.run(Commands.java:461)
> at
> org.apache.zookeeper.server.admin.Commands.runCommand(Commands.java:95)
> at
> org.apache.zookeeper.server.admin.JettyAdminServer$CommandServlet.doGet(JettyAdminServer.java:175)
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:687)
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:790)
> at
> org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:873)
> at
> org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:542)
> at
> org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:255)
> at
> org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:1700)
> at
> org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:255)
> at
> org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1345)
> at
> org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:203)
> at
> 

Re: Any interest in a gRPC version of ZooKeeper

2019-11-28 Thread Jordan Zimmerman
I’ll ping Infra and see what they say

> On Nov 28, 2019, at 8:04 AM, Enrico Olivelli  wrote:
> 
> Il gio 28 nov 2019, 14:02 Andor Molnar  ha scritto:
> 
>> Unfortunately non-committers are having some difficulties joining that
>> channel.
>> 
>> For example:
>> "@Mate Szalay-Beko is a Multi-Channel Guest. Only your Workspace Admin can
>> invite them to a public channel.”
>> 
>> Does anyone have an idea what does that mean?
>> 
> 
> No.
> But I am sure that we can invite people.
> Some ASF projects have a link on the website (Beam?)
> 
> Enrico
> 
> 
> 
>> Andor
>> 
>> 
>> 
>>> On 2019. Nov 27., at 19:18, Jordan Zimmerman 
>> wrote:
>>> 
>>> FYI
>>> 
>>> We have an open discussion regarding replacing Jute, using gRPC and
>> related things in this sub channel on the ASF Slack board. All are welcome
>> to join in:
>>> 
>>> https://the-asf.slack.com/archives/CQKS7A3FT <
>> https://the-asf.slack.com/archives/CQKS7A3FT>
>>> 
>>> -Jordan
>>> 
 On Nov 18, 2019, at 9:25 AM, Jordan Zimmerman <
>> jor...@jordanzimmerman.com> wrote:
 
 Hi Folks,
 
 I've written a proof of concept implementation of a ServerCnxnFactory
>> that implements gRPC. The goal is to make it possible to easily write
>> ZooKeeper clients in non-JVM languages. Using the proof of concept I was
>> able to write a Golang client easily. What's the interest level of
>> something like this? Let's discuss if it's worth pursuing. I'd be willing
>> to move this from proof of concept to production but I'll need help (1 or 2
>> co-developers).
 
 If you want to try it, I've pushed the Golang client and some
>> instructions here (let me know if you have any issues - I'm a go neophyte).
>> Note: "zookeeper/test.go" is the interesting file:
 
 https://github.com/Randgalt/zkgrpc <
>> https://github.com/Randgalt/zkgrpc>
 
 Here's the proof of concept on the ZK server side (the interesting
>> files are RpcServerCnxn.java, RpcServerCnxnFactory.java,
>> RpcZooKeeperServer.java and zookeeper.proto):
 
 
>> https://github.com/apache/zookeeper/compare/master...Randgalt:wip-grpc <
>> https://github.com/apache/zookeeper/compare/master...Randgalt:wip-grpc>
 
 Issues:
 Writing a client, even with gRPC, will require some work. Sessions have
>> to be maintained, watchers have to be maintained, etc.
 Currently, Jute is deeply embedded in ZooKeeper. The proof of concept
>> has to emulate Jute byte buffers. Ideally, this will be abstracted so that
>> only records could be used so that the gRPC connection doesn't have to keep
>> marshalling/unmarshalling byte buffers
 I don't know enough about the gRPC client/server implementations to
>> know if it will meet the needs of ZooKeeper. Anyone have experience here?
 I haven't completely thought through how much work it will take to
>> write useful clients. As I've shown with the proof of concept simple ZK
>> CRUD db operations work well. I need to spend time writing a recipe such as
>> Leader Election to see how much work is required.
 I'm not sure how things like SASL and reconfig would work with gRPC
 
 -Jordan
>>> 
>> 
>> 



Re: Any interest in a gRPC version of ZooKeeper

2019-11-28 Thread Enrico Olivelli
Il gio 28 nov 2019, 14:02 Andor Molnar  ha scritto:

> Unfortunately non-committers are having some difficulties joining that
> channel.
>
> For example:
> "@Mate Szalay-Beko is a Multi-Channel Guest. Only your Workspace Admin can
> invite them to a public channel.”
>
> Does anyone have an idea what does that mean?
>

No.
But I am sure that we can invite people.
Some ASF projects have a link on the website (Beam?)

Enrico



> Andor
>
>
>
> > On 2019. Nov 27., at 19:18, Jordan Zimmerman 
> wrote:
> >
> > FYI
> >
> > We have an open discussion regarding replacing Jute, using gRPC and
> related things in this sub channel on the ASF Slack board. All are welcome
> to join in:
> >
> > https://the-asf.slack.com/archives/CQKS7A3FT <
> https://the-asf.slack.com/archives/CQKS7A3FT>
> >
> > -Jordan
> >
> >> On Nov 18, 2019, at 9:25 AM, Jordan Zimmerman <
> jor...@jordanzimmerman.com> wrote:
> >>
> >> Hi Folks,
> >>
> >> I've written a proof of concept implementation of a ServerCnxnFactory
> that implements gRPC. The goal is to make it possible to easily write
> ZooKeeper clients in non-JVM languages. Using the proof of concept I was
> able to write a Golang client easily. What's the interest level of
> something like this? Let's discuss if it's worth pursuing. I'd be willing
> to move this from proof of concept to production but I'll need help (1 or 2
> co-developers).
> >>
> >> If you want to try it, I've pushed the Golang client and some
> instructions here (let me know if you have any issues - I'm a go neophyte).
> Note: "zookeeper/test.go" is the interesting file:
> >>
> >>  https://github.com/Randgalt/zkgrpc <
> https://github.com/Randgalt/zkgrpc>
> >>
> >> Here's the proof of concept on the ZK server side (the interesting
> files are RpcServerCnxn.java, RpcServerCnxnFactory.java,
> RpcZooKeeperServer.java and zookeeper.proto):
> >>
> >>
> https://github.com/apache/zookeeper/compare/master...Randgalt:wip-grpc <
> https://github.com/apache/zookeeper/compare/master...Randgalt:wip-grpc>
> >>
> >> Issues:
> >> Writing a client, even with gRPC, will require some work. Sessions have
> to be maintained, watchers have to be maintained, etc.
> >> Currently, Jute is deeply embedded in ZooKeeper. The proof of concept
> has to emulate Jute byte buffers. Ideally, this will be abstracted so that
> only records could be used so that the gRPC connection doesn't have to keep
> marshalling/unmarshalling byte buffers
> >> I don't know enough about the gRPC client/server implementations to
> know if it will meet the needs of ZooKeeper. Anyone have experience here?
> >> I haven't completely thought through how much work it will take to
> write useful clients. As I've shown with the proof of concept simple ZK
> CRUD db operations work well. I need to spend time writing a recipe such as
> Leader Election to see how much work is required.
> >> I'm not sure how things like SASL and reconfig would work with gRPC
> >>
> >> -Jordan
> >
>
>


Re: Any interest in a gRPC version of ZooKeeper

2019-11-28 Thread Andor Molnar
Unfortunately non-committers are having some difficulties joining that channel.

For example:
"@Mate Szalay-Beko is a Multi-Channel Guest. Only your Workspace Admin can 
invite them to a public channel.”

Does anyone have an idea what does that mean?

Andor



> On 2019. Nov 27., at 19:18, Jordan Zimmerman  
> wrote:
> 
> FYI
> 
> We have an open discussion regarding replacing Jute, using gRPC and related 
> things in this sub channel on the ASF Slack board. All are welcome to join in:
> 
> https://the-asf.slack.com/archives/CQKS7A3FT 
> 
> 
> -Jordan
> 
>> On Nov 18, 2019, at 9:25 AM, Jordan Zimmerman  
>> wrote:
>> 
>> Hi Folks,
>> 
>> I've written a proof of concept implementation of a ServerCnxnFactory that 
>> implements gRPC. The goal is to make it possible to easily write ZooKeeper 
>> clients in non-JVM languages. Using the proof of concept I was able to write 
>> a Golang client easily. What's the interest level of something like this? 
>> Let's discuss if it's worth pursuing. I'd be willing to move this from proof 
>> of concept to production but I'll need help (1 or 2 co-developers).
>> 
>> If you want to try it, I've pushed the Golang client and some instructions 
>> here (let me know if you have any issues - I'm a go neophyte). Note: 
>> "zookeeper/test.go" is the interesting file:
>> 
>>  https://github.com/Randgalt/zkgrpc 
>> 
>> Here's the proof of concept on the ZK server side (the interesting files are 
>> RpcServerCnxn.java, RpcServerCnxnFactory.java, RpcZooKeeperServer.java and 
>> zookeeper.proto):
>> 
>>  https://github.com/apache/zookeeper/compare/master...Randgalt:wip-grpc 
>>  
>> 
>> Issues:
>> Writing a client, even with gRPC, will require some work. Sessions have to 
>> be maintained, watchers have to be maintained, etc.
>> Currently, Jute is deeply embedded in ZooKeeper. The proof of concept has to 
>> emulate Jute byte buffers. Ideally, this will be abstracted so that only 
>> records could be used so that the gRPC connection doesn't have to keep 
>> marshalling/unmarshalling byte buffers
>> I don't know enough about the gRPC client/server implementations to know if 
>> it will meet the needs of ZooKeeper. Anyone have experience here?
>> I haven't completely thought through how much work it will take to write 
>> useful clients. As I've shown with the proof of concept simple ZK CRUD db 
>> operations work well. I need to spend time writing a recipe such as Leader 
>> Election to see how much work is required.
>> I'm not sure how things like SASL and reconfig would work with gRPC
>> 
>> -Jordan
>