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

NullPointerException when using sstableloader with PropertyFileSnitch configured

Agile BoardAttach filesAttach ScreenshotBulk Copy AttachmentsBulk Move AttachmentsVotersWatch issueWatchersCreate sub-taskConvert to sub-taskMoveLinkCloneLabelsUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Low

    Description

      I got a NullPointerException when using sstableloader on 1.0.6. The cluster is using PropertyFileSnitch. The same configuration file is used for sstableloader.

      The problem is if StorageService is initialized before DatabaseDescriptor, PropertyFileSnitch will try to access StorageService.instance before it finishes initialization.

       ERROR 01:14:05,601 Fatal configuration error
      org.apache.cassandra.config.ConfigurationException: Error instantiating snitch class 'org.apache.cassandra.locator.PropertyFileSnitch'.
              at org.apache.cassandra.utils.FBUtilities.construct(FBUtilities.java:607)
              at org.apache.cassandra.config.DatabaseDescriptor.createEndpointSnitch(DatabaseDescriptor.java:454)
              at org.apache.cassandra.config.DatabaseDescriptor.<clinit>(DatabaseDescriptor.java:306)
              at org.apache.cassandra.service.StorageService.<init>(StorageService.java:187)
              at org.apache.cassandra.service.StorageService.<clinit>(StorageService.java:190)
              at org.apache.cassandra.tools.BulkLoader$ExternalClient.init(BulkLoader.java:183)
              at org.apache.cassandra.io.sstable.SSTableLoader.stream(SSTableLoader.java:106)
              at org.apache.cassandra.tools.BulkLoader.main(BulkLoader.java:62)
      Caused by: java.lang.reflect.InvocationTargetException
              at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
              at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
              at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
              at java.lang.reflect.Constructor.newInstance(Unknown Source)
              at org.apache.cassandra.utils.FBUtilities.construct(FBUtilities.java:589)
              ... 7 more
      Caused by: java.lang.NullPointerException
              at org.apache.cassandra.locator.PropertyFileSnitch.reloadConfiguration(PropertyFileSnitch.java:170)
              at org.apache.cassandra.locator.PropertyFileSnitch.<init>(PropertyFileSnitch.java:60)
              ... 12 more
      Error instantiating snitch class 'org.apache.cassandra.locator.PropertyFileSnitch'.
      Fatal configuration error; unable to start server.  See log for stacktrace.
      

      Attachments

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            jicheng Ji Cheng Assign to me
            jicheng Ji Cheng
            Ji Cheng
            Jonathan Ellis
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment