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

pidfile is never written, "/etc/init.d/cassandra stop" fails

Agile BoardAttach filesAttach ScreenshotBulk Copy AttachmentsBulk Move AttachmentsVotersWatch issueWatchersCreate sub-taskConvert to sub-taskMoveLinkCloneLabelsUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Normal
    • Resolution: Duplicate
    • None
    • Packaging
    • None
    • Normal

    Description

      The init script tries, via start-stop-daemon, to write a pidfile to /var/run/cassandra/cassandra.pid. /var/run/cassandra doesn't exist (righftully so, /var/run can be a tmpfs), so the init script has this stanza above the start-stop-daemon invocation:

          [ -e `dirname "PIDFILE"` ] || \
              install -d -ocassandra -gcassandra -m750 `dirname $PIDFILE`
      

      The first line is missing the dollar sign before the PIDFILE variable (i.e. it should be 'dirname "$PIDFILE"'). This has the effect that "dirname PIDFILE" is called, with the PIDFILE as a literal, which always returns "." as the output, which always exists, so the "install" call never gets executed, the directory never gets created and start-stop-daemon is unable to write the pidfile.

      The pidfile is never written and "/etc/init.d/cassandra stop" never works.

      Adding a $ before PIDFILE fixes the issue. This has been tested.

      Attachments

        Issue Links

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            Unassigned Unassigned Assign to me
            paravoid Faidon Liambotis
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment