0
votes

I am upgrading DSE cassndra from 4.8.16 to 5.0.15 , but when i execute nodetool upgradesstables I am getting below error:

error: 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.
-- StackTrace --
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:798)
        at org.apache.cassandra.config.DatabaseDescriptor.applyConfig(DatabaseDescriptor.java:535)
        at org.apache.cassandra.config.DatabaseDescriptor.<clinit>(DatabaseDescriptor.java:131)
        at org.apache.cassandra.tools.NodeProbe.checkJobs(NodeProbe.java:274)
        at org.apache.cassandra.tools.NodeProbe.upgradeSSTables(NodeProbe.java:328)
        at org.apache.cassandra.tools.nodetool.UpgradeSSTable.execute(UpgradeSSTable.java:54)
        at org.apache.cassandra.tools.NodeTool$NodeToolCmd.run(NodeTool.java:253)
        at org.apache.cassandra.tools.NodeTool.main(NodeTool.java:167)
2
Your nodetool is unable to act on the /var/lib/cassandra/commitlog directory. What are the permissions of /var/lib/cassandra/commitlog? - Jim Wright
I am using my defined commitlog directory, not /var/lib/cassandra/commitlog. I confirmed the location in cassandra.yaml - Mehul Gupta
nodetool is clearly using /var/lib/cassandra/commitlog. What is the value of commitlog_directory in cassandra.yaml? - Jim Wright
Its /sbclocal/apps/data/commitlog in cassandra.yaml.. Nodes were up and running fine , but only upgrade is failing. - Mehul Gupta
I'm not sure why, but it looks like nodetool isn't using your cassandra.yaml. Perhaps you've updated the wrong file? - Jim Wright

2 Answers

0
votes

I got the problem, My installation directory and package directory are different. I am running the command from package directory which is why its picking the wrong path. To counter this I set the property "CASSANDRA_CONF" to correct path, which resolved the issue.

0
votes

Commit logs from the previous version incompatible with the new version. To flush the commit log of the old installation use

nodetool -h hostname drain

also check commit log directory path in cassandra.yml.