Bringing together the Apache Cassandra experts from the community and DataStax.

Want to learn? Have a question? Want to share your expertise? You are in the right place!

Not sure where to begin? Getting Started

 

question

hellodk avatar image
hellodk asked ·

Attempts to restart DSE fails with error "MismatchedInputException: No content to map due to end-of-input"

Hello Team,

Here goes my use case.
I'm evaluating dse_full on my laptop(Ubuntu 18.04) by running 4 vagrant servers(ubuntu 18.04 server)

The cluster worked great until I reboot my laptop. Cassandra refuses to start with the below error.

DEBUG [main] 2020-05-25 15:12:16,737 Nodes.java:188 - Reading /var/lib/cassandra/metadata/nodes/local
ERROR [main] 2020-05-25 15:12:16,754 DseModule.java:126 - Unable to start server. Exiting...
org.apache.cassandra.io.FSReadError: com.fasterxml.jackson.databind.exc.MismatchedInputException: No content to map due to end-of-input
        at [Source: (BufferedInputStream); line: -1, column: 0]
        at com.datastax.bdp.db.nodes.Nodes.transactionalRead(Nodes.java:195)
        at com.datastax.bdp.db.nodes.Nodes.access$100(Nodes.java:76)
        at com.datastax.bdp.db.nodes.Nodes$Local.<init>(Nodes.java:477)
        at com.datastax.bdp.db.nodes.Nodes.<init>(Nodes.java:97)
        at com.datastax.bdp.db.nodes.Nodes$Instance.setup(Nodes.java:911)
        at org.apache.cassandra.config.DatabaseDescriptor.applyMetadata(DatabaseDescriptor.java:545)
        at org.apache.cassandra.config.DatabaseDescriptor.daemonInitialization(DatabaseDescriptor.java:226)
        at org.apache.cassandra.config.DatabaseDescriptor.daemonInitialization(DatabaseDescriptor.java:241)
        at com.datastax.bdp.DseCoreModule.<init>(DseCoreModule.java:84)
        at com.datastax.bdp.DseModule.getRequiredModules(DseModule.java:163)
        at com.datastax.bdp.server.AbstractDseModule.configure(AbstractDseModule.java:27)
        at com.datastax.bdp.DseModule.configure(DseModule.java:89)
        at com.google.inject.AbstractModule.configure(AbstractModule.java:62)
        at com.google.inject.spi.Elements$RecordingBinder.install(Elements.java:340)
        at com.google.inject.spi.Elements.getElements(Elements.java:110)
        at com.google.inject.internal.InjectorShell$Builder.build(InjectorShell.java:138)
        at com.google.inject.internal.InternalInjectorCreator.build(InternalInjectorCreator.java:104)
        at com.google.inject.Guice.createInjector(Guice.java:96)
        at com.google.inject.Guice.createInjector(Guice.java:73)
        at com.google.inject.Guice.createInjector(Guice.java:62)
        at com.datastax.bdp.ioc.DseInjector.get(DseInjector.java:36)
        at com.datastax.bdp.DseModule.main(DseModule.java:103)
Caused by: com.fasterxml.jackson.databind.exc.MismatchedInputException: No content to map due to end-of-input
        at [Source: (BufferedInputStream); line: -1, column: 0]
        at com.fasterxml.jackson.databind.exc.MismatchedInputException.from(MismatchedInputException.java:59)
        at com.fasterxml.jackson.databind.DeserializationContext.reportInputMismatch(DeserializationContext.java:1356)
        at com.fasterxml.jackson.databind.ObjectReader._initForReading(ObjectReader.java:358)
        at com.fasterxml.jackson.databind.ObjectReader._bindAndClose(ObjectReader.java:1596)
        at com.fasterxml.jackson.databind.ObjectReader.readValue(ObjectReader.java:1188)
        at com.datastax.bdp.db.nodes.Nodes.transactionalRead(Nodes.java:191)
        ... 21 common frames omitted

If you can help throw some light as to why Datastax Cassandra is behaving like this.
PS. I have tried with Apache Cassandra, and it works just fine.

Cheers,

Deepak

dse
10 |1000 characters needed characters left characters exceeded

Up to 8 attachments (including images) can be used with a maximum of 1.0 MiB each and 10.0 MiB total.

1 Answer

Erick Ramirez avatar image
Erick Ramirez answered ·

@hellodk The log messages you posted indicates that DSE cannot start because it couldn't read some files from the filesystem (FSReadError):

ERROR [main] 2020-05-25 15:12:16,754 DseModule.java:126 - Unable to start server. Exiting...
org.apache.cassandra.io.FSReadError: com.fasterxml.jackson.databind.exc.MismatchedInputException: No content to map due to end-of-input

DSE was trying to read this file and parse it but it was empty:

DEBUG [main] 2020-05-25 15:12:16,737 Nodes.java:188 - Reading /var/lib/cassandra/metadata/nodes/local

This can happen for various reasons but the most likely are:

  • DSE was not shutdown cleanly before the laptop was rebooted
  • the filesystem got corrupted (for whatever reason)

You can workaround the issue by deleting the file /var/lib/cassandra/metadata/nodes/local. After you have deleted it, you should be able to start DSE (unless there are other issues with the filesystem) and DSE will recreate the file. Cheers!

2 comments Share
10 |1000 characters needed characters left characters exceeded

Up to 8 attachments (including images) can be used with a maximum of 1.0 MiB each and 10.0 MiB total.

Thanks for a clear explanation. I guess that should be correct for now. I have reinstalled de-full and everything seems ok again.
Will try your workaround if the issue persists.

0 Likes 0 · ·

Not a problem. Cheers!

0 Likes 0 · ·