Uploaded image for project: 'Apache Cassandra'
  1. Apache Cassandra
  2. CASSANDRA-8925

broadcast_rpc_address NPEs while using rpc_interface

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Normal
    • Resolution: Duplicate
    • 2.1.5
    • Local/Config
    • None
    • Normal

    Description

      Somewhat amusingly, it looks like my NPE on startup is the result of a copy-paste error in:

      [clockfort@clockfort cassandra]$ git log --stat 3e5edb82
      commit 3e5edb82c73b7b7c6e1d1e970fb764c3e3158da6
      Author: Ariel Weisberg <ariel.weisberg@datastax.com>
      Date:   Tue Jan 27 13:30:47 2015 +0100
      
          rpc_interface and listen_interface generate NPE on startup when specified interface doesn't exist
          
          Patch by Ariel Weisberg; reviewed by Robert Stupp for CASSANDRA-8677
      
       src/java/org/apache/cassandra/config/DatabaseDescriptor.java | 46 +++++++++++++++++++++++-----------------------
       1 file changed, 23 insertions(+), 23 deletions(-)
      

      The log looks like:

      INFO  18:51:13 DiskAccessMode 'auto' determined to be mmap, indexAccessMode is mmap
      INFO  18:51:13 Global memtable on-heap threshold is enabled at 2008MB
      INFO  18:51:13 Global memtable off-heap threshold is enabled at 2008MB
      ERROR 18:51:13 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.<clinit>(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]
      null
      Fatal error during configuration loading; unable to start. See log for stacktrace.
      

      This is with a cassandra.yaml config snippet of:

      start_rpc: true
      # rpc_address: localhost
      rpc_interface: eth0
      # RPC address to broadcast to drivers and other Cassandra nodes. This cannot
      # be set to 0.0.0.0. If left blank, this will be set to the value of
      # rpc_address. If rpc_address is set to 0.0.0.0, broadcast_rpc_address must
      # be set.
      # broadcast_rpc_address: 1.2.3.4
      

      Attachments

        1. cassandra-2.1.3-8925.patch
          1.0 kB
          Chris Lockfort

        Issue Links

          Activity

            People

              clockfort Chris Lockfort
              clockfort Chris Lockfort
              Chris Lockfort
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: