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



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 - 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(
        at org.yaml.snakeyaml.parser.ParserImpl.peekEvent(
        at org.yaml.snakeyaml.parser.ParserImpl.checkEvent(
        at org.yaml.snakeyaml.composer.Composer.composeMappingNode(
        at org.yaml.snakeyaml.composer.Composer.composeNode(
        at org.yaml.snakeyaml.composer.Composer.composeMappingNode(
        at org.yaml.snakeyaml.composer.Composer.composeNode(
        at org.yaml.snakeyaml.composer.Composer.composeDocument(
        at org.yaml.snakeyaml.composer.Composer.getSingleNode(
        at org.yaml.snakeyaml.constructor.BaseConstructor.getSingleData(
        at org.yaml.snakeyaml.Yaml.loadFromReader(
        at org.yaml.snakeyaml.Yaml.loadAs(
        at com.datastax.bdp.config.DseConfigYamlLoader.<clinit>(
        at com.datastax.bdp.config.DseConfigurationLoader.maybeApplyMemoryOnlySettingsFromDseConfig(
        at com.datastax.bdp.config.DseConfigurationLoader.applyDseConfig(
        at com.datastax.bdp.config.DseConfigurationLoader.loadConfig(
        at org.apache.cassandra.config.YamlConfigurationLoader.loadConfig(
        at org.apache.cassandra.config.DatabaseDescriptor.loadConfig(
        at org.apache.cassandra.config.DatabaseDescriptor.daemonInitialization(
        at org.apache.cassandra.config.DatabaseDescriptor.daemonInitialization(
        at com.datastax.bdp.DseCoreModule.<init>(
        at com.datastax.bdp.DseModule.getRequiredModules(
        at com.datastax.bdp.server.AbstractDseModule.configure(
        at com.datastax.bdp.DseModule.configure(
        at com.datastax.bdp.ioc.DseInjector.get(
        at com.datastax.bdp.DseModule.main(
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 - Loading settings from file:/ebsvolume/dse-6.8.0/resources/dse/conf/dse.yaml

ERROR [main] 2020-05-20 21:12:55,947 - 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(

at org.yaml.snakeyaml.introspector.PropertyUtils.getProperty(

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,

#    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,


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

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.