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?

有帮助吗?

解决方案

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.

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top