Details
-
Bug
-
Status: Resolved
-
Normal
-
Resolution: Fixed
-
None
-
None
-
Normal
Description
The init script has a classpath() function that collects all the jars and even includes this piece of code to work with the standard Debian/Ubuntu libjna-jar:
# use JNA if installed in standard location [ -r /usr/share/java/jna.jar ] && cp="$cp:/usr/share/java/jna.jar"
This seems very nice and correct, however the classpath() function is never called and is entirely unused Instead, /usr/bin/cassandra is called, which in turn includes /usr/share/cassandra/cassandra.in.sh, which has basically similar code to collect the jars for CLASSPATH but a) without the JNA standard path trick b) without using EXTRA_CLASSPATH (from /etc/default/cassandra) at all, so Cassandra boots without either JNA nor EXTRA_CLASSPATH, contrary to expectations.
There are various suggestions on the web to do "ln -s /usr/share/java/jna.jar /usr/share/cassandra/lib/"; I suspect this bug to be the reason for that.
/usr/share/cassandra/cassandra.in.sh seems smart enough to append but not overwrite CLASSPATH, so fixing the init script's classpath() to only include JNA + EXTRA_CLASSPATH (and making sure it's actually getting called ) should be enough for a fix.
Attachments
Issue Links
- is duplicated by
-
CASSANDRA-6101 Debian init script broken
- Resolved