Uploaded image for project: 'Cassandra'
  1. Cassandra
  2. CASSANDRA-16027

bin/cassandra may fail to execute in certain environments due to unhandled output pipe

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Open
    • Priority: Normal
    • Resolution: Unresolved
    • Fix Version/s: None
    • Component/s: Packaging
    • Labels:
    • Bug Category:
      Packaging - All
    • Severity:
      Low
    • Complexity:
      Low Hanging Fruit
    • Discovered By:
      User Report
    • Platform:
      All
    • Impacts:
      None

      Description

      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:

      [pid 3666026] write(2, "OpenJDK 64-Bit Server VM warning: ", 34) = -1 EPIPE (Broken pipe) 

       

      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

      exec $NUMACTL 

      are not handling one of the outputs (stderr or stdout). As a workaround suffixing each line with

      > /var/log/cassandra/stdout.log 2> /var/log/cassandra/stderr.log
      

      resolves the issue and Cassandra starts without any issues.

       

      Rather than bake this into our containers the fix should make its way upstream.

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              bradfordcp Christopher Bradford
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated: