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

Possible NPE on upgrade to 3.0/3.X in case of IO errors

    XMLWordPrintableJSON

Details

    • Normal

    Description

      There is a NPE on upgrade to 3.0/3.X if a data directory contains directories that generate IO errors, for example if the cassandra process does not have permission to read them.

      Here is the exception:

      ERROR [main] 2017-03-06 16:41:30,678  CassandraDaemon.java:710 - Exception encountered during startup
      java.lang.NullPointerException: null
      	at org.apache.cassandra.io.util.FileUtils.delete(FileUtils.java:372) ~[cassandra-all-3.0.11.1564.jar:3.0.11.1564]
      	at org.apache.cassandra.db.SystemKeyspace.migrateDataDirs(SystemKeyspace.java:1359) ~[cassandra-all-3.0.11.1564.jar:3.0.11.1564]
      	at org.apache.cassandra.service.CassandraDaemon.setup(CassandraDaemon.java:190) ~[cassandra-all-3.0.11.1564.jar:3.0.11.1564]
      

      This is caused by File.listFiles(), which returns null in case of an IO error.

      Attachments

        Activity

          People

            stefania Stefania Alborghetti
            stefania Stefania Alborghetti
            Stefania Alborghetti
            Alex Petrov
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: