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

Windows Service never finishes shutting down

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Fix Version/s: 2.1.2
    • Component/s: Lifecycle
    • Labels:

      Description

      When using procrun and the -install combination on Windows and starting cassandra via services.msc, stopping the service never completes and gets stuck in "stopping" status forever. Probably related to:

          public void stop()
          {
              // this doesn't entirely shut down Cassandra, just the RPC server.
              // jsvc takes care of taking the rest down
              logger.info("Cassandra shutting down...");
              thriftServer.stop();
              nativeServer.stop();
          }
      

      procrun calls the StopMethod as CassandraDaemon.stop so we may need to either a) augment what procrun's doing or b) add a more comprehensive stop to be called on Windows shutdown.

      1. 8136_v1.txt
        1 kB
        Joshua McKenzie

        Issue Links

          Activity

          Hide
          JoshuaMcKenzie Joshua McKenzie added a comment -

          Added hard System.exit call to CassandraDaemon.stop() if on Windows, relying on shutdown hook to drain the node. Procrun needs the jvm to exit out to shut down correctly.

          Applies on top of 8115 (so install/uninstall actually work).

          Show
          JoshuaMcKenzie Joshua McKenzie added a comment - Added hard System.exit call to CassandraDaemon.stop() if on Windows, relying on shutdown hook to drain the node. Procrun needs the jvm to exit out to shut down correctly. Applies on top of 8115 (so install/uninstall actually work).
          Hide
          jbellis Jonathan Ellis added a comment -
          Show
          jbellis Jonathan Ellis added a comment - /cc Philip Thompson
          Hide
          philipthompson Philip Thompson added a comment -

          +1. Starting and stopping via services.msc works great, doesn't affect normal start/stop.

          Show
          philipthompson Philip Thompson added a comment - +1. Starting and stopping via services.msc works great, doesn't affect normal start/stop.
          Hide
          JoshuaMcKenzie Joshua McKenzie added a comment -

          committed.

          Show
          JoshuaMcKenzie Joshua McKenzie added a comment - committed.

            People

            • Assignee:
              JoshuaMcKenzie Joshua McKenzie
              Reporter:
              JoshuaMcKenzie Joshua McKenzie
              Reviewer:
              Philip Thompson
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development