cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Robert Stupp (JIRA)" <j...@apache.org>
Subject [jira] [Comment Edited] (CASSANDRA-8677) rpc_interface and listen_interface generate NPE on startup when specified interface doesn't exist
Date Mon, 26 Jan 2015 14:07:34 GMT

    [ https://issues.apache.org/jira/browse/CASSANDRA-8677?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14291843#comment-14291843
] 

Robert Stupp edited comment on CASSANDRA-8677 at 1/26/15 2:06 PM:
------------------------------------------------------------------

Mostly LGTM - some minors I'd like to have included in the patch(es):
* would love to see a {{hasMoreElements()}} check before {{*Address = addrs.nextElement()}}
and throw an appropriate exception
* maybe merge the code {{listen_address}} and {{rpc_address}} into a single method - it looks
very similar. E.g. {{private static InetAddress networkInterfaceFromConfiguration(String confValue,
String confField) ... }}



was (Author: snazy):
Mostly LGTM - some minors I'd like to have included in the patch(es):
* would love to see a {{hasMoreElements()}} check before {{*Address = addrs.nextElement()}}
and throw an appropriate exception
* maybe merge the code {{listen_address}} and {{rpc_address}} into a single method - it looks
very similar. E.g. {{private static InetAddress networkInterfaceFromConfiguration(String confValue,
String confField) {\\} }}


> 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-2.1.patch, 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