While developing Docker images for C* 3.11.6 I noticed bin/cassandra failed to start when executed with nohup in a container based Red Hat Universal Base Image on Kubernetes. Curiously this issue could not be reproduced when simply running the container on Docker. Instead it had to be scheduled within a k8s pod.
Running an strace indicates the following:
The issue occurs before the system.log file is created. After further digging in to the command being run it was determined the bin/cassandra file was not redirecting all output pipes. In this particular environment this leads to the process going defunct and no Cassandra running.
The 4 lines starting with
are not handling one of the outputs (stderr or stdout). As a workaround suffixing each line with
resolves the issue and Cassandra starts without any issues.
Rather than bake this into our containers the fix should make its way upstream.