DataStax Academy FAQ

DataStax Academy migrated to a new learning management system (LMS) in July 2020. We are also moving to a new Cassandra Certification process so there are changes to exam bookings, voucher system and issuing of certificates.

Check out the Academy FAQ pages for answers to your questions:


question

sushanta.saha_41353 avatar image
sushanta.saha_41353 asked ·

Unable to start DSE, getting "org.yaml.snakeyaml.parser.ParserException: while parsing a block mapping"

New DSE cluster not coming up

tarball installation - startup command:

/ebsvolume/dse-6.8.0/bin/dse cassandra -k -g -s &> /ebsvolume/logs/output.log


ERROR [main] 2020-05-20 16:51:47,155 DseModule.java:121 - Unable to start server. Exiting...
org.yaml.snakeyaml.parser.ParserException: while parsing a block mapping
in 'reader', line 594, column 5:
runner_type: default
^
expected <block end>, but found BlockMappingStart
in 'reader', line 671, column 7:
work_dir: /ebsvolume/dsefs
^

        at org.yaml.snakeyaml.parser.ParserImpl$ParseBlockMappingKey.produce(ParserImpl.java:570)
        at org.yaml.snakeyaml.parser.ParserImpl.peekEvent(ParserImpl.java:158)
        at org.yaml.snakeyaml.parser.ParserImpl.checkEvent(ParserImpl.java:143)
        at org.yaml.snakeyaml.composer.Composer.composeMappingNode(Composer.java:224)
        at org.yaml.snakeyaml.composer.Composer.composeNode(Composer.java:155)
        at org.yaml.snakeyaml.composer.Composer.composeMappingNode(Composer.java:229)
        at org.yaml.snakeyaml.composer.Composer.composeNode(Composer.java:155)
        at org.yaml.snakeyaml.composer.Composer.composeDocument(Composer.java:122)
        at org.yaml.snakeyaml.composer.Composer.getSingleNode(Composer.java:105)
        at org.yaml.snakeyaml.constructor.BaseConstructor.getSingleData(BaseConstructor.java:120)
        at org.yaml.snakeyaml.Yaml.loadFromReader(Yaml.java:450)
        at org.yaml.snakeyaml.Yaml.loadAs(Yaml.java:444)
        at com.datastax.bdp.config.DseConfigYamlLoader.<clinit>(DseConfigYamlLoader.java:62)
        at com.datastax.bdp.config.DseConfigurationLoader.maybeApplyMemoryOnlySettingsFromDseConfig(DseConfigurationLoader.java:215)
        at com.datastax.bdp.config.DseConfigurationLoader.applyDseConfig(DseConfigurationLoader.java:192)
        at com.datastax.bdp.config.DseConfigurationLoader.loadConfig(DseConfigurationLoader.java:94)
        at org.apache.cassandra.config.YamlConfigurationLoader.loadConfig(YamlConfigurationLoader.java:91)
        at org.apache.cassandra.config.DatabaseDescriptor.loadConfig(DatabaseDescriptor.java:418)
        at org.apache.cassandra.config.DatabaseDescriptor.daemonInitialization(DatabaseDescriptor.java:221)
        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)
dseinstallation
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.

Erick Ramirez avatar image
Erick Ramirez answered ·

@sushanta.saha_41353 DSE can't start because the YAML parser detected errors with the dse.yaml. This is usually because it isn't formatted correctly.

With YAML files, indentation is very important because it defines the structure of the document. You'll need to fix the file. For example, this line should be indented by 4 spaces but you possibly have 6 spaces in there:

    work_dir: /ebsvolume/dsefs

You'll need to make sure that all entries are indented correctly. If you're not sure, I recommend getting a fresh copy from a new tarball and compare the version you've edited. Cheers!

3 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.

I had 6 spaces in front instead of needed 4 spaces as you guessed correctly. But, it ran into another error with 'work_dir'. Any clue? Please let me know if I need to start a new post with this. Thanks.


INFO [main] 2020-05-20 21:12:55,854 DseConfigYamlLoader.java:41 - Loading settings from file:/ebsvolume/dse-6.8.0/resources/dse/conf/dse.yaml

ERROR [main] 2020-05-20 21:12:55,947 DseModule.java:121 - Unable to start server. Exiting...

org.yaml.snakeyaml.error.YAMLException: Unable to find property 'work_dir' on class: com.datastax.bdp.config.SparkProcessRunnerOptions

at com.datastax.bdp.config.DseYamlPropertyUtils.getProperty(DseYamlPropertyUtils.java:70)

at org.yaml.snakeyaml.introspector.PropertyUtils.getProperty(PropertyUtils.java:121)


0 Likes 0 · ·

@sushanta.saha_41353 Is this your first time to configure a DSE node? If so, I recommend that you get a fresh copy of dse.yaml and start over.

Only modify/enable/change 1 property at a time and start DSE. By only making 1 change, you know immediately what caused DSE to fail. When you have made multiple changes, it makes it difficult for you to troubleshoot the problem particularly if you don't have experience. Cheers!

1 Like 1 · ·
smadhavan avatar image smadhavan sushanta.saha_41353 ·

@sushanta.saha_41353, only uncomment the groups/properties that you need to make the change. For example, consider the below group of properties,

#group_level_1:
#    sub_property_1
#    sub_property_2


and if you want to leverage this, only remove the # characters and ensure all the sub-properties are indented with 4 spaces like as below,


group_level_1:
    sub_property_1
    sub_property_2


Another example: If there is a property which appears like below (notice the # character plus an additional space before the property name),

# max_memory_to_lock_mb: 10240

In order to properly uncomment and set a value to it, one will have to remove both the # character and the preceding space character before the property itself as below. Notice there is no indentation required as this is not a group of properties housed under a parent,

max_memory_to_lock_mb: 256


0 Likes 0 · ·
@brasco --Donnie Roberson-- avatar image
@brasco --Donnie Roberson-- answered ·

Hi @sushanta.saha_41353

This is a yaml parsing error in the dse.yaml. Make sure you indentation is correct in or around

work_dir: /ebsvolume/dsefs

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.