DataStax Help Center

DSE Analytics node fails to startup with error "org.xml.sax.SAXParseException; Premature end of file."

Summary

A DataStax Enterprise Cassandra node fails to startup in Analytics mode with plugin activation and SAX parser exceptions.

Symptoms

When attempting to start a previously running Cassandra node in Analytics mode, it fails with multiple exceptions. A sample stack trace from the DSE 4.6.3 system.log is shown below:

ERROR [main] 2015-05-18 15:14:20,410 DseDaemon.java (line 489) Unable to start DSE server.
java.lang.RuntimeException: com.datastax.bdp.plugin.PluginManager$PluginActivationException: Plugin activation failed
at com.datastax.bdp.plugin.PluginManager.activate(PluginManager.java:135)
at com.datastax.bdp.server.DseDaemon.start(DseDaemon.java:477)
at org.apache.cassandra.service.CassandraDaemon.activate(CassandraDaemon.java:580)
at com.datastax.bdp.server.DseDaemon.main(DseDaemon.java:641)
Caused by: com.datastax.bdp.plugin.PluginManager$PluginActivationException: Plugin activation failed
at com.datastax.bdp.plugin.PluginManager.activate(PluginManager.java:284)
at com.datastax.bdp.plugin.PluginManager.activate(PluginManager.java:125)
... 3 more
Caused by: java.lang.RuntimeException: org.xml.sax.SAXParseException; Premature end of file.
at org.apache.hadoop.conf.Configuration.loadResource(Configuration.java:1285)
at org.apache.hadoop.conf.Configuration.loadResources(Configuration.java:1141)
at org.apache.hadoop.conf.Configuration.getProps(Configuration.java:1076)
at org.apache.hadoop.conf.Configuration.get(Configuration.java:483)
at com.datastax.bdp.hadoop.mapred.CassandraJobConf.tuneMemoryAndChildSlots(CassandraJobConf.java:276)
at com.datastax.bdp.hadoop.mapred.CassandraJobConf.writeDseHadoopConfig(CassandraJobConf.java:231)
at com.datastax.bdp.ConfigurationWriterPlugin.onActivate(ConfigurationWriterPlugin.java:17)
at com.datastax.bdp.plugin.PluginManager.initialize(PluginManager.java:334)
at com.datastax.bdp.plugin.PluginManager.activate(PluginManager.java:263)
... 4 more
Caused by: org.xml.sax.SAXParseException; Premature end of file.
at org.apache.xerces.parsers.DOMParser.parse(Unknown Source)
at org.apache.xerces.jaxp.DocumentBuilderImpl.parse(Unknown Source)
at javax.xml.parsers.DocumentBuilder.parse(DocumentBuilder.java:177)
at org.apache.hadoop.conf.Configuration.loadResource(Configuration.java:1190)
... 12 more

Cause

The exceptions are due to some Analytics XML configuration files getting corrupted as a result of an unclean shutdown of DSE in situations such as a hardware failure or a power outage.

When DSE is not shutdown properly, the following XML files get corrupted:

  • dse-core-default.xml
  • dse-mapred-default.xml

These files end up having a zero (0) byte size and cannot get parsed.

Solution

Follow these steps to resolve this issue:

Step 1 - Locate the 2 configuration files and delete them. These configuration files are auto-generated at startup so they will just be recreated if they do not exist.

For packaged installations of DSE:

$ cd /etc/dse/hadoop
$ rm dse-core-default.xml dse-mapred-default.xml

For tarball installations of DSE:

$ cd <install_location>/resources/hadoop/conf/
$ rm dse-core-default.xml dse-mapred-default.xml

Step 2 - Start DSE on this node.

Additional information

Do not attempt to replace these files with copies from other nodes in the cluster. These files are auto-generated with configuration properties specific to the node.

An enhancement to DSE (ID DSP-5645) has been requested such that if the files have a zero byte size or cannot be parsed, they should be recreated as if they do not exist in the first place.

Was this article helpful?
0 out of 0 found this helpful
Have more questions? Submit a request

Comments

Powered by Zendesk