Home | About | Sematext search-lucene.com search-hadoop.com
NEW: Monitor These Apps!
elasticsearch, apache solr, apache hbase, hadoop, redis, casssandra, amazon cloudwatch, mysql, memcached, apache kafka, apache zookeeper, apache storm, ubuntu, centOS, red hat, debian, puppet labs, java, senseiDB
 Search Hadoop and all its subprojects:

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


+
Brian Tarbox 2012-12-17, 13:44
+
Patrick Hunt 2012-12-19, 08:17
+
Brian Tarbox 2012-12-19, 12:38
Copy link to this message
-
Re: why does ZK ignore null pointer errors?
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
+
Marcin Rzewucki 2013-02-07, 21:16
NEW: Monitor These Apps!
elasticsearch, apache solr, apache hbase, hadoop, redis, casssandra, amazon cloudwatch, mysql, memcached, apache kafka, apache zookeeper, apache storm, ubuntu, centOS, red hat, debian, puppet labs, java, senseiDB