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

mantha.srikant_190702 avatar image
mantha.srikant_190702 asked ·

Why is dse-6.0.0-bin.tar.gz missing and why can't I start DSE in the DS220 VM?

Hi,

I was unable to find the dse-6.0.0-bin.tar.gz under /home/ubuntu unlike ds201 VM.
Hence, I copied the installation manually from ds201 VM to ds202 VM and followed the installation steps.

Now, when I try to start cassandra using ./dse cassandra, I face the below error

20:28:37,055 |-ERROR in ch.qos.logback.core.rolling.RollingFileAppender[GremlinServerFileAppender] - openFile(/var/log/cassandra/gremlin.log,true) call failed. java.io.FileNotFoundException: /var/log/cassandra/gremlin.log (Permission denied)
    at java.io.FileNotFoundException: /var/log/cassandra/gremlin.log (Permission denied)
    at     at java.io.FileOutputStream.open0(Native Method)
    at     at java.io.FileOutputStream.open(FileOutputStream.java:270)
    at     at java.io.FileOutputStream.<init>(FileOutputStream.java:213)
    at     at ch.qos.logback.core.recovery.ResilientFileOutputStream.<init>(ResilientFileOutputStream.java:26)
    at     at ch.qos.logback.core.FileAppender.openFile(FileAppender.java:204)
    at     at ch.qos.logback.core.FileAppender.start(FileAppender.java:127)
    at     at ch.qos.logback.core.rolling.RollingFileAppender.start(RollingFileAppender.java:100)
    at     at ch.qos.logback.core.joran.action.AppenderAction.end(AppenderAction.java:90)
    at     at ch.qos.logback.core.joran.spi.Interpreter.callEndAction(Interpreter.java:309)
    at     at ch.qos.logback.core.joran.spi.Interpreter.endElement(Interpreter.java:193)
    at     at ch.qos.logback.core.joran.spi.Interpreter.endElement(Interpreter.java:179)
    at     at ch.qos.logback.core.joran.spi.EventPlayer.play(EventPlayer.java:62)
    at     at ch.qos.logback.core.joran.GenericConfigurator.doConfigure(GenericConfigurator.java:165)
    at     at ch.qos.logback.core.joran.GenericConfigurator.doConfigure(GenericConfigurator.java:152)
    at     at ch.qos.logback.core.joran.GenericConfigurator.doConfigure(GenericConfigurator.java:110)
    at     at ch.qos.logback.core.joran.GenericConfigurator.doConfigure(GenericConfigurator.java:53)
    at     at ch.qos.logback.classic.util.ContextInitializer.configureByResource(ContextInitializer.java:75)
    at     at ch.qos.logback.classic.util.ContextInitializer.autoConfig(ContextInitializer.java:150)
    at     at org.slf4j.impl.StaticLoggerBinder.init(StaticLoggerBinder.java:84)
    at     at org.slf4j.impl.StaticLoggerBinder.<clinit>(StaticLoggerBinder.java:55)
    at     at org.slf4j.LoggerFactory.bind(LoggerFactory.java:150)
    at     at org.slf4j.LoggerFactory.performInitialization(LoggerFactory.java:124)
    at     at org.slf4j.LoggerFactory.getILoggerFactory(LoggerFactory.java:412)
    at     at org.slf4j.LoggerFactory.getLogger(LoggerFactory.java:357)
    at     at org.slf4j.LoggerFactory.getLogger(LoggerFactory.java:383)
    at     at com.datastax.bdp.server.AbstractDseModule.<clinit>(AbstractDseModule.java:19)

Same for audit.log

20:28:37,071 |-ERROR in ch.qos.logback.core.rolling.RollingFileAppender[SLF4JAuditWriterAppender] - openFile(/var/log/cassandra/audit/audit.log,true) call failed. java.io.FileNotFoundException: /var/log/cassandra/audit/audit.log (Permission denied)
    at java.io.FileNotFoundException: /var/log/cassandra/audit/audit.log (Permission denied)
    at     at java.io.FileOutputStream.open0(Native Method)
    at     at java.io.FileOutputStream.open(FileOutputStream.java:270)
20:28:37,079 |-ERROR in ch.qos.logback.core.rolling.RollingFileAppender[DroppedAuditEventAppender] - openFile(/var/log/cassandra/audit/dropped-events.log,true) call failed. java.io.FileNotFoundException: /var/log/cassandra/audit/dropped-events.log (Permission denied)
    at java.io.FileNotFoundException: /var/log/cassandra/audit/dropped-events.log (Permission denied)
    at     at java.io.FileOutputStream.open0(Native Method)
    at     at java.io.FileOutputStream.open(FileOutputStream.java:270)
    at     at java.io.FileOutputStream.<init>(FileOutputStream.java:213)
INFO: An exception was caught and reported. Message: org.apache.cassandra.exceptions.ConfigurationException: commitlog directory '/var/lib/cassandra/commitlog' or, if it does not already exist, an existing parent directory of it, is not readable and writable for the DSE. Check file system and configuration.
org.apache.cassandra.exceptions.ConfigurationException: commitlog directory '/var/lib/cassandra/commitlog' or, if it does not already exist, an existing parent directory of it, is not readable and writable for the DSE. Check file system and configuration.
    at org.apache.cassandra.config.DatabaseDescriptor.resolveAndCheckDirectory(DatabaseDescriptor.java:815)
    at org.apache.cassandra.config.DatabaseDescriptor.applySimpleConfig(DatabaseDescriptor.java:494)
    at org.apache.cassandra.config.DatabaseDescriptor.applyAll(DatabaseDescriptor.java:336)
    at org.apache.cassandra.config.DatabaseDescriptor.daemonInitialization(DatabaseDescriptor.java:145)
    at org.apache.cassandra.config.DatabaseDescriptor.daemonInitialization(DatabaseDescriptor.java:157)
    at com.datastax.bdp.DseCoreModule.<init>(DseCoreModule.java:81)
    at com.datastax.bdp.DseModule.getRequiredModules(DseModule.java:142)
    at com.datastax.bdp.server.AbstractDseModule.configure(AbstractDseModule.java:27)
    at com.datastax.bdp.DseModule.configure(DseModule.java:76)
    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:89)

ERROR [main] 2020-07-20 20:28:39,529  DseModule.java:95 - {}. Exiting...
com.google.inject.CreationException: Unable to create injector, see the following errors:

I verified the permission for /var/log/cassandra folder same as in ds201, but unable to start the service. What am I missing here ?

-Regards

Srikant Mantha

academyds220
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 ·

You've missed a lot of things. Let me go through them in detail here.

DSE installation

I was unable to find the dse-6.0.0-bin.tar.gz under /home/ubuntu unlike ds201 VM.

The reason you can't find the tarball in the DS220 VM is because it is configured differently than the DS201 VM. The DS220 VM does not use the binary tarball installation method. Instead, DSE is setup in the VM as an APT packaged installation.

If you checked, you would have been able to see it yourself. For example:

$ dpkg -l | grep dse
ii  dse                                        6.0.2-1                                    all          The DataStax Enterprise package includes a production-certified
ii  dse-full                                   6.0.2-1                                    all          The DataStax Enterprise package includes a production-certified
ii  dse-libcassandra                           6.0.2-1                                    all          The DataStax Enterprise package includes a production-certified
ii  dse-libgraph                               6.0.2-1                                    all          The DataStax Enterprise package includes a production-certified
ii  dse-libhadoop2-client                      6.0.2-1                                    all          The DataStax Enterprise package includes a production-certified
ii  dse-libhadoop2-client-native               6.0.2-1                                    amd64        The DataStax Enterprise package includes a production-certified
ii  dse-liblog4j                               6.0.2-1                                    all          The DataStax Enterprise package includes a production-certified
ii  dse-libsolr                                6.0.2-1                                    all          The DataStax Enterprise package includes a production-certified
ii  dse-libspark                               6.0.2-1                                    all          The DataStax Enterprise package includes a production-certified
ii  dse-libtomcat                              6.0.2-1                                    all          The DataStax Enterprise package includes a production-certified

DSE startup

The errors you posted clearly state that DSE does not have permissions on the directories. Note the Permission denied message in the log entries:

20:28:37,055 |-ERROR in ch.qos.logback.core.rolling.RollingFileAppender[GremlinServerFileAppender] - openFile(/var/log/cassandra/gremlin.log,true) call failed. java.io.FileNotFoundException: /var/log/cassandra/gremlin.log (Permission denied)
20:28:37,071 |-ERROR in ch.qos.logback.core.rolling.RollingFileAppender[SLF4JAuditWriterAppender] - openFile(/var/log/cassandra/audit/audit.log,true) call failed. java.io.FileNotFoundException: /var/log/cassandra/audit/audit.log (Permission denied)
    at java.io.FileNotFoundException: /var/log/cassandra/audit/audit.log (Permission denied)
20:28:37,079 |-ERROR in ch.qos.logback.core.rolling.RollingFileAppender[DroppedAuditEventAppender] - openFile(/var/log/cassandra/audit/dropped-events.log,true) call failed. java.io.FileNotFoundException: /var/log/cassandra/audit/dropped-events.log (Permission denied)
    at java.io.FileNotFoundException: /var/log/cassandra/audit/dropped-events.log (Permission denied)

It even says so here that you don't have read or write permissions:

INFO: An exception was caught and reported. Message: org.apache.cassandra.exceptions.ConfigurationException: commitlog directory '/var/lib/cassandra/commitlog' or, if it does not already exist, an existing parent directory of it, is not readable and writable for the DSE. Check file system and configuration.
org.apache.cassandra.exceptions.ConfigurationException: commitlog directory '/var/lib/cassandra/commitlog' or, if it does not already exist, an existing parent directory of it, is not readable and writable for the DSE. Check file system and configuration.

I'm not sure what you verified when you stated this:

I verified the permission for /var/log/cassandra folder same as in ds201, but unable to start the service.

When you have a look at the directories, they are owned by the cassandra user:

$ ls -lhd /var/lib/cassandra /var/log/cassandra
drwxr-xr-x 6 cassandra cassandra 4.0K Apr  6  2019 /var/lib/cassandra
drwxr-xr-x 3 cassandra cassandra 4.0K Apr  7  2019 /var/log/cassandra

When you try to start DSE using this tarball command:

$ dse cassandra

DSE can't start because you are running the command as the ubuntu user which doesn't have permissions on the directories.

Solution

You need to start DSE as a service since it's installed as an APT package. But there is a known issue with the configuration of the VM which I've explained in detail in question #4166. DSE is incorrectly configured with an IP 10.0.2.15 which is not accessible to the VM so you'll need to edit /etc/dse/cassandra/cassandra.yaml on your VM as follows:

Step 1 - Set the seeds list to use loopback IP:

          - seeds: "127.0.0.1"

Step 2 - Set the listen_address to localhost:

listen_address: localhost

Step 3 - Save the changes to cassandra.yaml.

Step 4 - Start DSE on the VM:

$ sudo service dse start

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 @Erick Ramirez,

I was trying to map the same permissions as is from ds201. After following the instructions provided by you I was able to start the dse service.

However, Its good to mention the type of configuration in the ds220 VM setup.


-Thanks

Srikant Mantha

0 Likes 0 · ·
Erick Ramirez avatar image Erick Ramirez ♦♦ mantha.srikant_190702 ·

Good to hear you got it working. Cheers!

P.S. I've converted your post to a comment since it's not an "answer".

0 Likes 0 · ·