Home | About | Sematext search-lucene.com search-hadoop.com
 Search Hadoop and all its subprojects:

Switch to Threaded View
Zookeeper >> mail # user >> why does ZK ignore null pointer errors?


Copy link to this message
-
Re: why does ZK ignore null pointer errors?
Hi,

I found similar issue in zookeeper 3.4.5:
2013-02-07 21:06:48,043 [myid:3] - WARN  [NIOServerCxn.Factory:
0.0.0.0/0.0.0.0:2181:NIOServerCnxnFactory@218] - Ignoring unexpected
runtime exception
java.nio.channels.CancelledKeyException
   at gnu.java.nio.SelectionKeyImpl.readyOps(libgcj.so.10)
   at
org.apache.zookeeper.server.NIOServerCnxnFactory.run(NIOServerCnxnFactory.java:187)
   at java.lang.Thread.run(libgcj.so.10)

I'm using zookeeper ensemble for Solr. This issue occurs randomly. Zk is
working, but this message causes log file to grow extremely fast. It is
logged almost every 1s. What could be the reason of it ? Is the only
solution for this is changing log threshold ?

Regards.

On 19 December 2012 18:59, Patrick Hunt <[EMAIL PROTECTED]> wrote:

> When this happened originally I looked at the jvm docs for socket()
> and they were ambiguous in this case. (whether it could return null).
>
> If you have a reproducible case it would be a good chance to try and
> fix this. e.g. get the socket, check whether it's null, use it or
> cleanup as appropriate...
>
> Patrick
>
> On Wed, Dec 19, 2012 at 4:38 AM, Brian Tarbox <[EMAIL PROTECTED]>
> wrote:
> > Your guess is correct about failing while accepting.  We seem to
> > periodically find ourselves in a case where we disconnect (perhaps from
> > timing out the connection) and then somehow in the process of
> reconnecting
> > end up with dozens of connections or more and eventually hit
> > max-connections-per-client.  Needless to say it all falls apart at that
> > point.
> >
> > Brian
> >
> >
> > On Wed, Dec 19, 2012 at 3:17 AM, Patrick Hunt <[EMAIL PROTECTED]> wrote:
> >
> >> On Mon, Dec 17, 2012 at 5:44 AM, Brian Tarbox <[EMAIL PROTECTED]>
> >> wrote:
> >> > I'm trying to track down an issue where my zk cluster rolls over and
> I've
> >> > come across the main run loop in NIOServerCnxnFactory.java.
> >> >
> >> > I keep getting NullPointerError at line 190 which is:
> >> >
> >> > InetAddress ia = sc.socket().getInetAddress()
> >> >
> >> > but it is caught by a catch block at 217 that prints the message:
> >> > "Ignoring unexpected runtime exception".
> >> >
> >> > I'm of the school of thought that discourages ingnoring NPE!
> >> >
> >> > Can anyone enlighten me what the reasoning behind this code is?
> >> >
> >>
> >> While the server socket is open we try our best to accept connections
> >> regardless what happens on any one selector operation. Technically
> >> we're not ignoring, we're logging it and continuing/ignoring.
> >>
> >> I've only ever seen that line NPE in one case. It seemed to be related
> >> to the client connecting and failing (closing?) while the acceptor was
> >> in the process of accepting. Do you have any insight into what's
> >> happening in this case?
> >>
> >> Patrick
> >>
> >
> >
> >
> > --
> > http://about.me/BrianTarbox
>