question

Ryan Quey avatar image
Ryan Quey asked Erick Ramirez edited

Why does DSE startup report the exception "alwayson_sql_options.enabled in dse.yaml is set to true in a non-analytics node"?

I have gotten cassandra up and running on my local machine, but now trying to use Spark with it as well.

I am following these instructions here. I changed both `/etc/init.d/dse` and `/etc/default/dse` so that `SPARK_ENABLED=1` for good measure (I'm not sure which one needs to be changed when using the debian service, but I'm assuming it is safe to do both). I also changed `/etc/dse/dse.yaml` to enable AlwaysOn.

I then restarted DSE.

However, when I run `dse cassandra`, I get the following error message:

Exception (java.lang.ExceptionInInitializerError) encountered during startup: null
java.lang.ExceptionInInitializerError
        at com.datastax.bdp.server.DseDaemon.preSetup(DseDaemon.java:664)
        at com.datastax.bdp.server.DseDaemon.setup(DseDaemon.java:538)
        at org.apache.cassandra.service.CassandraDaemon.activate0(CassandraDaemon.java:733)
        at org.apache.cassandra.service.CassandraDaemon.access$100(CassandraDaemon.java:85)
        at org.apache.cassandra.service.CassandraDaemon$3.run(CassandraDaemon.java:694)
Caused by: java.lang.RuntimeException: alwayson_sql_options.enabled in dse.yaml is set to true in a non-analytics node

I get the same message when trying to run from the tarball instead. On the other hand, I got it up and running using docker.

What am I doing wrong in order to get analytics up and running?

dsealwayson-sql
10 |1000

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 Erick Ramirez edited

It looks like you're mixing package installations with tarball installations.

DSE package

If you've installed DSE as a package on Debian systems with:

 $ sudo apt-get install dse-full

then DSE will be run as a Linux service. If so, you need to configure the DSE service to run in Analytics mode by modifying /etc/default/dse and set:

 SPARK_ENABLED=1

To start DSE, run:

 $ sudo service dse start

DSE tarball

If you've installed DSE using the binary tarball, you start DSE in Analytics mode with the `-k` flag. For example, if you've unpacked the tarball to /home/ryan/dse-6.8.0:

 $ cd /home/ryan/dse-6.8.0
 $ bin/dse cassandra -k

You can't mix the commands between package vs tarball installations. Cheers!

4 comments Share
10 |1000

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

Ryan Quey avatar image Ryan Quey commented ·

Thank you this is clarifying. I am mostly trying to figure out the Debian service, but might need to fall back on using the tarball if I can't.

I did follow those instructions for the service, but still having difficulty. What's the difference between `/etc/init.d/dse` and `/etc/default/dse`? How are the two related? This link mentions both, but I'm having a hard understanding how they relate. It seems strange that both are configuration files for the Debian service, and have overlapping settings (for example the SPARK_ENABLED=1 variable), unless I'm misunderstanding.

Thanks!



0 Likes 0 ·
Erick Ramirez avatar image Erick Ramirez ♦♦ Ryan Quey commented ·

DSE isn't open-source so I can't share the source code with you.

As long as you only modify /etc/default/dse and start DSE as a service, you'll be able to start it properly. If you're still having issues, feel free to upload the system.log to Gist then post the link here and I'd be happy to have a look. Cheers!

0 Likes 0 ·
Ryan Quey avatar image Ryan Quey commented ·

Just to clarify:

Does this mean that I shouldn't use `dse cassandra` when using the Debian service, I should only use `sudo service dse start`?

0 Likes 0 ·
Erick Ramirez avatar image Erick Ramirez ♦♦ Ryan Quey commented ·

That's correct, yes. The instructions for configuring/starting DSE as a service vs tarball installations are 2 different procedures. You can't mix them. Cheers!

0 Likes 0 ·