Pergunta

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?

Foi útil?

Solução

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.

Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top