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...
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
> 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]>
>> > 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?