elassandra: Unable to run cassandra in elastic search mode due to missing path.home
Elassandra version: 6.2.3.13 and 6.2.3.12
JVM version (java -version): 1.8.0_191
OS version (uname -a if on a Unix-like system): Linux 4.4.0-142-generic #168-Ubuntu SMP Wed Jan 16 21:00:45 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux
Description of the problem including expected versus actual behavior:
Steps to reproduce: Unable to run the node in elastic search mode. If we try to run the node in sudo mode, it says elastic search node cannot run as root. If we try to run in non sudo mode, we get the following error.
2019-04-08 14:28:38,514 INFO [main] org.apache.cassandra.locator.GossipingPropertyFileSnitch.<init>(GossipingPropertyFileSnitch.java:64) Loaded cassandra-topology.properties for compatibility 2019-04-08 14:28:38,842 INFO [main] org.apache.cassandra.utils.NativeLibrary.tryMlockall(NativeLibrary.java:174) JNA mlockall successful {6.2.3}: Initialization Failed …
- IllegalStateException[path.home is not configured] 2019-04-08 14:28:38,945 ERROR [main] org.apache.cassandra.service.ElassandraDaemon.main(ElassandraDaemon.java:585) Exception java.lang.IllegalStateException: path.home is not configured at org.elasticsearch.env.Environment.<init>(Environment.java:97) at org.elasticsearch.node.InternalSettingsPreparer.prepareEnvironment(InternalSettingsPreparer.java:85) at org.elasticsearch.node.InternalSettingsPreparer.prepareEnvironment(InternalSettingsPreparer.java:66) at org.elasticsearch.node.Node.<init>(Node.java:246) at org.apache.cassandra.service.ElassandraDaemon.activate(ElassandraDaemon.java:181) at org.apache.cassandra.service.ElassandraDaemon.main(ElassandraDaemon.java:548)
We tried this in multiple systems hoping any system problem, but still unable to run the node in -e mode. Even tried adding -Des.path.home as suggested in online forums.
About this issue
- Original URL
- State: closed
- Created 5 years ago
- Comments: 29
Hi,
Elassandra cannot run as root because Elasticsearch forbids it ! Moreover, this is not a good security practice to run cassandra as root, so run it with user cassandra.
Thanks, Vincent.