[jira] [Updated] (CASSANDRA-8839) DatabaseDescriptor throws NPE when rpc_interface is used
[ https://issues.apache.org/jira/browse/CASSANDRA-8839?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Sylvain Lebresne updated CASSANDRA-8839: Fix Version/s: 2.1.4 > DatabaseDescriptor throws NPE when rpc_interface is used > > > Key: CASSANDRA-8839 > URL: https://issues.apache.org/jira/browse/CASSANDRA-8839 > Project: Cassandra > Issue Type: Bug > Components: Config > Environment: 2.1.3 >Reporter: Jan Kesten > Fix For: 2.1.4 > > > Copy from mail to dev mailinglist. > When using > - listen_interface instead of listen_address > - rpc_interface instead of rpc_address > starting 2.1.3 throws an NPE: > {code} > ERROR [main] 2015-02-20 07:50:09,661 DatabaseDescriptor.java:144 - Fatal > error during configuration loading > java.lang.NullPointerException: null > at > org.apache.cassandra.config.DatabaseDescriptor.applyConfig(DatabaseDescriptor.java:411) > ~[apache-cassandra-2.1.3.jar:2.1.3] > at > org.apache.cassandra.config.DatabaseDescriptor.(DatabaseDescriptor.java:133) > ~[apache-cassandra-2.1.3.jar:2.1.3] > at > org.apache.cassandra.service.CassandraDaemon.setup(CassandraDaemon.java:110) > [apache-cassandra-2.1.3.jar:2.1.3] > at > org.apache.cassandra.service.CassandraDaemon.activate(CassandraDaemon.java:465) > [apache-cassandra-2.1.3.jar:2.1.3] > at > org.apache.cassandra.service.CassandraDaemon.main(CassandraDaemon.java:554) > [apache-cassandra-2.1.3.jar:2.1.3] > {code} > Occurs on debian package as well as in tar.gz distribution. > {code} > /* Local IP, hostname or interface to bind RPC server to */ > if(conf.rpc_address !=null&& conf.rpc_interface !=null) > { > throw newConfigurationException("Set rpc_address OR rpc_interface, not > both"); > } > else if(conf.rpc_address !=null) > { > try > { > rpcAddress = InetAddress.getByName(conf.rpc_address); > } > catch(UnknownHostException e) > { > throw newConfigurationException("Unknown host in rpc_address "+ > conf.rpc_address); > } > } > else if(conf.rpc_interface !=null) > { > listenAddress = > getNetworkInterfaceAddress(conf.rpc_interface,"rpc_interface"); > } > else > { > rpcAddress = FBUtilities.getLocalAddress(); > } > {code} > I think that listenAddress in the second else block is an error. In my case > rpc_interface is eth0, so listenAddress gets set, and rpcAddress remains > unset. The result is NPE in line 411: > {code} > if(rpcAddress.isAnyLocalAddress()) > {code} > After changing rpc_interface to rpc_address everything works as expected. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Updated] (CASSANDRA-8839) DatabaseDescriptor throws NPE when rpc_interface is used
[ https://issues.apache.org/jira/browse/CASSANDRA-8839?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Sylvain Lebresne updated CASSANDRA-8839: Assignee: Ariel Weisberg > DatabaseDescriptor throws NPE when rpc_interface is used > > > Key: CASSANDRA-8839 > URL: https://issues.apache.org/jira/browse/CASSANDRA-8839 > Project: Cassandra > Issue Type: Bug > Components: Config > Environment: 2.1.3 >Reporter: Jan Kesten >Assignee: Ariel Weisberg > Fix For: 2.1.4 > > > Copy from mail to dev mailinglist. > When using > - listen_interface instead of listen_address > - rpc_interface instead of rpc_address > starting 2.1.3 throws an NPE: > {code} > ERROR [main] 2015-02-20 07:50:09,661 DatabaseDescriptor.java:144 - Fatal > error during configuration loading > java.lang.NullPointerException: null > at > org.apache.cassandra.config.DatabaseDescriptor.applyConfig(DatabaseDescriptor.java:411) > ~[apache-cassandra-2.1.3.jar:2.1.3] > at > org.apache.cassandra.config.DatabaseDescriptor.(DatabaseDescriptor.java:133) > ~[apache-cassandra-2.1.3.jar:2.1.3] > at > org.apache.cassandra.service.CassandraDaemon.setup(CassandraDaemon.java:110) > [apache-cassandra-2.1.3.jar:2.1.3] > at > org.apache.cassandra.service.CassandraDaemon.activate(CassandraDaemon.java:465) > [apache-cassandra-2.1.3.jar:2.1.3] > at > org.apache.cassandra.service.CassandraDaemon.main(CassandraDaemon.java:554) > [apache-cassandra-2.1.3.jar:2.1.3] > {code} > Occurs on debian package as well as in tar.gz distribution. > {code} > /* Local IP, hostname or interface to bind RPC server to */ > if(conf.rpc_address !=null&& conf.rpc_interface !=null) > { > throw newConfigurationException("Set rpc_address OR rpc_interface, not > both"); > } > else if(conf.rpc_address !=null) > { > try > { > rpcAddress = InetAddress.getByName(conf.rpc_address); > } > catch(UnknownHostException e) > { > throw newConfigurationException("Unknown host in rpc_address "+ > conf.rpc_address); > } > } > else if(conf.rpc_interface !=null) > { > listenAddress = > getNetworkInterfaceAddress(conf.rpc_interface,"rpc_interface"); > } > else > { > rpcAddress = FBUtilities.getLocalAddress(); > } > {code} > I think that listenAddress in the second else block is an error. In my case > rpc_interface is eth0, so listenAddress gets set, and rpcAddress remains > unset. The result is NPE in line 411: > {code} > if(rpcAddress.isAnyLocalAddress()) > {code} > After changing rpc_interface to rpc_address everything works as expected. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Updated] (CASSANDRA-8839) DatabaseDescriptor throws NPE when rpc_interface is used
[ https://issues.apache.org/jira/browse/CASSANDRA-8839?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Robert Stupp updated CASSANDRA-8839: Attachment: 8893-2.1.txt 8839.txt Committed (attached rebased patches) > DatabaseDescriptor throws NPE when rpc_interface is used > > > Key: CASSANDRA-8839 > URL: https://issues.apache.org/jira/browse/CASSANDRA-8839 > Project: Cassandra > Issue Type: Bug > Components: Config > Environment: 2.1.3 >Reporter: Jan Kesten >Assignee: Ariel Weisberg > Fix For: 2.1.4 > > Attachments: 8839.txt, 8893-2.1.txt > > > Copy from mail to dev mailinglist. > When using > - listen_interface instead of listen_address > - rpc_interface instead of rpc_address > starting 2.1.3 throws an NPE: > {code} > ERROR [main] 2015-02-20 07:50:09,661 DatabaseDescriptor.java:144 - Fatal > error during configuration loading > java.lang.NullPointerException: null > at > org.apache.cassandra.config.DatabaseDescriptor.applyConfig(DatabaseDescriptor.java:411) > ~[apache-cassandra-2.1.3.jar:2.1.3] > at > org.apache.cassandra.config.DatabaseDescriptor.(DatabaseDescriptor.java:133) > ~[apache-cassandra-2.1.3.jar:2.1.3] > at > org.apache.cassandra.service.CassandraDaemon.setup(CassandraDaemon.java:110) > [apache-cassandra-2.1.3.jar:2.1.3] > at > org.apache.cassandra.service.CassandraDaemon.activate(CassandraDaemon.java:465) > [apache-cassandra-2.1.3.jar:2.1.3] > at > org.apache.cassandra.service.CassandraDaemon.main(CassandraDaemon.java:554) > [apache-cassandra-2.1.3.jar:2.1.3] > {code} > Occurs on debian package as well as in tar.gz distribution. > {code} > /* Local IP, hostname or interface to bind RPC server to */ > if(conf.rpc_address !=null&& conf.rpc_interface !=null) > { > throw newConfigurationException("Set rpc_address OR rpc_interface, not > both"); > } > else if(conf.rpc_address !=null) > { > try > { > rpcAddress = InetAddress.getByName(conf.rpc_address); > } > catch(UnknownHostException e) > { > throw newConfigurationException("Unknown host in rpc_address "+ > conf.rpc_address); > } > } > else if(conf.rpc_interface !=null) > { > listenAddress = > getNetworkInterfaceAddress(conf.rpc_interface,"rpc_interface"); > } > else > { > rpcAddress = FBUtilities.getLocalAddress(); > } > {code} > I think that listenAddress in the second else block is an error. In my case > rpc_interface is eth0, so listenAddress gets set, and rpcAddress remains > unset. The result is NPE in line 411: > {code} > if(rpcAddress.isAnyLocalAddress()) > {code} > After changing rpc_interface to rpc_address everything works as expected. -- This message was sent by Atlassian JIRA (v6.3.4#6332)