Question

When I run Cassandra using sudo ./cassandra -f -p pid.txt, Cassandra runs correctly, outputting Listening for thrift clients..., but the file pid.txt is not created.

Without the -f option, the pid file is created as expected. Is this normal behavior?

Was it helpful?

Solution

Yes. This is normal behavior as expected:

https://github.com/apache/cassandra/blob/trunk/bin/cassandra#L142

The pid file is typically used by monitoring processes and init scripts. When you start in foreground, it does not make sense for the process to have pid file as you can just terminate it by using Ctrl-C.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top