cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ariel Weisberg (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (CASSANDRA-8677) rpc_interface and listen_interface generate NPE on startup when specified interface doesn't exist
Date Fri, 23 Jan 2015 23:00:35 GMT

     [ https://issues.apache.org/jira/browse/CASSANDRA-8677?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Ariel Weisberg updated CASSANDRA-8677:
--------------------------------------
    Attachment: 8677.patch

ConfigurationException now has a boolean field indicating whether the stack trace should be
displayed and I opted in a few places where suppressing stack traces looks harmless. I am
very conservative about suppressing stack traces because not getting a stack trace when you
need one in the field can be a disaster and ConfigurationException is widely used.

I also fixed an issue where a format error in the YAML would cause the parser to fail, but
the error from the parser is overridden by an NPE in JVMStabilityInspector due to the stability
inspector trying to access config the parser needed to generate.

CassandraDaemon now unwraps the exceptions that propagate out of DatabaseDescriptor's static
initializer. It also avoids printing the stack trace an extra time to both the log and stderr/stdout
although it still prints to stderr and stdout once. 

I took a look at 2.1 and 2.0 and it looks like things are working ok. I tested 2.1 and the
JVMStabilityInspector circular dependency doesn't occur.

> rpc_interface and listen_interface generate NPE on startup when specified interface doesn't
exist
> -------------------------------------------------------------------------------------------------
>
>                 Key: CASSANDRA-8677
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-8677
>             Project: Cassandra
>          Issue Type: Bug
>          Components: Core
>            Reporter: Ariel Weisberg
>            Assignee: Ariel Weisberg
>         Attachments: 8677.patch
>
>
> This is just a buggy UI bit.
> Initially the error I got was this which is redundant and not well formatted.
> {noformat}
> ERROR 20:12:55 Exception encountered during startup
> java.lang.ExceptionInInitializerError: null
> Fatal configuration error; unable to start. See log for stacktrace.
> 	at org.apache.cassandra.config.DatabaseDescriptor.<clinit>(DatabaseDescriptor.java:108)
~[main/:na]
> 	at org.apache.cassandra.service.CassandraDaemon.setup(CassandraDaemon.java:122) [main/:na]
> 	at org.apache.cassandra.service.CassandraDaemon.activate(CassandraDaemon.java:479) [main/:na]
> 	at org.apache.cassandra.service.CassandraDaemon.main(CassandraDaemon.java:571) [main/:na]
> java.lang.ExceptionInInitializerError: null
> Fatal configuration error; unable to start. See log for stacktrace.
> 	at org.apache.cassandra.config.DatabaseDescriptor.<clinit>(DatabaseDescriptor.java:108)
> 	at org.apache.cassandra.service.CassandraDaemon.setup(CassandraDaemon.java:122)
> 	at org.apache.cassandra.service.CassandraDaemon.activate(CassandraDaemon.java:479)
> 	at org.apache.cassandra.service.CassandraDaemon.main(CassandraDaemon.java:571)
> Exception encountered during startup: null
> Fatal configuration error; unable to start. See log for stacktrace.
> ERROR 20:12:55 Exception encountered during startup
> java.lang.ExceptionInInitializerError: null
> Fatal configuration error; unable to start. See log for stacktrace.
> 	at org.apache.cassandra.config.DatabaseDescriptor.<clinit>(DatabaseDescriptor.java:108)
~[main/:na]
> 	at org.apache.cassandra.service.CassandraDaemon.setup(CassandraDaemon.java:122) [main/:na]
> 	at org.apache.cassandra.service.CassandraDaemon.activate(CassandraDaemon.java:479) [main/:na]
> 	at org.apache.cassandra.service.CassandraDaemon.main(CassandraDaemon.java:571) [main/:na]
> {noformat}
> This has no description of the error that occurred. After logging the exception.
> {noformat}
> java.lang.NullPointerException: null
> 	at org.apache.cassandra.config.DatabaseDescriptor.applyConfig(DatabaseDescriptor.java:347)
~[main/:na]
> 	at org.apache.cassandra.config.DatabaseDescriptor.<clinit>(DatabaseDescriptor.java:102)
~[main/:na]
> 	at org.apache.cassandra.service.CassandraDaemon.setup(CassandraDaemon.java:122) [main/:na]
> 	at org.apache.cassandra.service.CassandraDaemon.activate(CassandraDaemon.java:479) [main/:na]
> 	at org.apache.cassandra.service.CassandraDaemon.main(CassandraDaemon.java:571) [main/:na]
> {noformat}
> Exceptions thrown in the DatabaseDescriptor should log in a useful way.
> This particular error should generate a message without a stack trace since it is easily
recognized.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message