Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 163EE200BA7 for ; Fri, 21 Oct 2016 17:34:01 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 14E54160ADE; Fri, 21 Oct 2016 15:34:01 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 35634160AE9 for ; Fri, 21 Oct 2016 17:34:00 +0200 (CEST) Received: (qmail 41505 invoked by uid 500); 21 Oct 2016 15:33:59 -0000 Mailing-List: contact commits-help@cassandra.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@cassandra.apache.org Delivered-To: mailing list commits@cassandra.apache.org Received: (qmail 41461 invoked by uid 99); 21 Oct 2016 15:33:58 -0000 Received: from arcas.apache.org (HELO arcas) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 21 Oct 2016 15:33:58 +0000 Received: from arcas.apache.org (localhost [127.0.0.1]) by arcas (Postfix) with ESMTP id C14802C2A6B for ; Fri, 21 Oct 2016 15:33:58 +0000 (UTC) Date: Fri, 21 Oct 2016 15:33:58 +0000 (UTC) From: "Alex Petrov (JIRA)" To: commits@cassandra.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Comment Edited] (CASSANDRA-12813) NPE in auth for bootstrapping node MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Fri, 21 Oct 2016 15:34:01 -0000 [ https://issues.apache.org/jira/browse/CASSANDRA-12813?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15595241#comment-15595241 ] Alex Petrov edited comment on CASSANDRA-12813 at 10/21/16 3:33 PM: ------------------------------------------------------------------- It was quite simple to reproduce the issue: start fresh node first, then start the node upgraded from 2.1 (with legacy credentials table), wait for tables to settle and try to authenticate. Since we can not know when exactly the credentials table can be initialised, we can simply add a check for if the select statement is still null and initialise it then. |[2.2 |https://github.com/ifesdjeen/cassandra/tree/12813-2.2] |[utest|https://cassci.datastax.com/view/Dev/view/ifesdjeen/job/ifesdjeen-12813-2.2-testall/] |[dtest|https://cassci.datastax.com/view/Dev/view/ifesdjeen/job/ifesdjeen-12813-2.2-dtest/] | |[3.0 |https://github.com/ifesdjeen/cassandra/tree/12813-3.0] |[utest|https://cassci.datastax.com/view/Dev/view/ifesdjeen/job/ifesdjeen-12813-3.0-testall/] |[dtest|https://cassci.datastax.com/view/Dev/view/ifesdjeen/job/ifesdjeen-12813-3.0-dtest/] | |[3.X |https://github.com/ifesdjeen/cassandra/tree/12813-3.X] |[utest|https://cassci.datastax.com/view/Dev/view/ifesdjeen/job/ifesdjeen-12813-3.X-testall/] |[dtest|https://cassci.datastax.com/view/Dev/view/ifesdjeen/job/ifesdjeen-12813-3.X-dtest/] | |[trunk|https://github.com/ifesdjeen/cassandra/tree/12813-trunk] |[utest|https://cassci.datastax.com/view/Dev/view/ifesdjeen/job/ifesdjeen-12813-trunk-testall/] |[dtest|https://cassci.datastax.com/view/Dev/view/ifesdjeen/job/ifesdjeen-12813-trunk-dtest/] | Please note that 3.x/trunk patch is a slightly different (had to merge names and method positions). was (Author: ifesdjeen): It was quite simple to reproduce the issue: start fresh node first, then start the node upgraded from 2.1 (with legacy credentials table), wait for tables to settle and try to authenticate. Since we can not know when exactly the credentials table can be initialised, we can simply add a check for if the select statement is still null and initialise it then. |[3.0 |https://github.com/ifesdjeen/cassandra/tree/12813-3.0] |[utest|https://cassci.datastax.com/view/Dev/view/ifesdjeen/job/ifesdjeen-12813-3.0-testall/] |[dtest|https://cassci.datastax.com/view/Dev/view/ifesdjeen/job/ifesdjeen-12813-3.0-dtest/] | |[3.X |https://github.com/ifesdjeen/cassandra/tree/12813-3.X] |[utest|https://cassci.datastax.com/view/Dev/view/ifesdjeen/job/ifesdjeen-12813-3.X-testall/] |[dtest|https://cassci.datastax.com/view/Dev/view/ifesdjeen/job/ifesdjeen-12813-3.X-dtest/] | |[trunk|https://github.com/ifesdjeen/cassandra/tree/12813-trunk] |[utest|https://cassci.datastax.com/view/Dev/view/ifesdjeen/job/ifesdjeen-12813-trunk-testall/] |[dtest|https://cassci.datastax.com/view/Dev/view/ifesdjeen/job/ifesdjeen-12813-trunk-dtest/] | Please note that 3.x/trunk patch is a slightly different (had to merge names and method positions). > NPE in auth for bootstrapping node > ---------------------------------- > > Key: CASSANDRA-12813 > URL: https://issues.apache.org/jira/browse/CASSANDRA-12813 > Project: Cassandra > Issue Type: Bug > Reporter: Charles Mims > Assignee: Alex Petrov > Fix For: 4.0, 3.0.x, 3.x > > > {code} > ERROR [SharedPool-Worker-1] 2016-10-19 21:40:25,991 Message.java:617 - Unexpected exception during request; channel = [id: 0x15eb017f, /:40869 => /10.0.0.254:9042] > java.lang.NullPointerException: null > at org.apache.cassandra.auth.PasswordAuthenticator.doAuthenticate(PasswordAuthenticator.java:144) ~[apache-cassandra-3.0.9.jar:3.0.9] > at org.apache.cassandra.auth.PasswordAuthenticator.authenticate(PasswordAuthenticator.java:86) ~[apache-cassandra-3.0.9.jar:3.0.9] > at org.apache.cassandra.auth.PasswordAuthenticator.access$100(PasswordAuthenticator.java:54) ~[apache-cassandra-3.0.9.jar:3.0.9] > at org.apache.cassandra.auth.PasswordAuthenticator$PlainTextSaslAuthenticator.getAuthenticatedUser(PasswordAuthenticator.java:182) ~[apache-cassandra-3.0.9.jar:3.0.9] > at org.apache.cassandra.transport.messages.AuthResponse.execute(AuthResponse.java:78) ~[apache-cassandra-3.0.9.jar:3.0.9] > at org.apache.cassandra.transport.Message$Dispatcher.channelRead0(Message.java:513) [apache-cassandra-3.0.9.jar:3.0.9] > at org.apache.cassandra.transport.Message$Dispatcher.channelRead0(Message.java:407) [apache-cassandra-3.0.9.jar:3.0.9] > at io.netty.channel.SimpleChannelInboundHandler.channelRead(SimpleChannelInboundHandler.java:105) [netty-all-4.0.23.Final.jar:4.0.23.Final] > at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:333) [netty-all-4.0.23.Final.jar:4.0.23.Final] > at io.netty.channel.AbstractChannelHandlerContext.access$700(AbstractChannelHandlerContext.java:32) [netty-all-4.0.23.Final.jar:4.0.23.Final] > at io.netty.channel.AbstractChannelHandlerContext$8.run(AbstractChannelHandlerContext.java:324) [netty-all-4.0.23.Final.jar:4.0.23.Final] > at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) [na:1.8.0_101] > at org.apache.cassandra.concurrent.AbstractLocalAwareExecutorService$FutureTask.run(AbstractLocalAwareExecutorService.java:164) [apache-cassandra-3.0.9.jar:3.0.9] > at org.apache.cassandra.concurrent.SEPWorker.run(SEPWorker.java:105) [apache-cassandra-3.0.9.jar:3.0.9] > at java.lang.Thread.run(Thread.java:745) [na:1.8.0_101] > {code} > I have a node that has been joining for around 24 hours. My application is configured with the IP address of the joining node in the list of nodes to connect to (ruby driver), and I have been getting around 200 events of this NPE per hour. I removed the IP of the joining node from the list of nodes for my app to connect to and the errors stopped. -- This message was sent by Atlassian JIRA (v6.3.4#6332)