Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-17295

On Windows, service recovery actions don't work is mongoS fails to initialize

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major - P3
    • Resolution: Duplicate
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: Admin
    • Labels:
      None
    • Operating System:
      Windows
    • Sprint:
      Platform 4 06/05/15, Platform 5 06/26/16
    • Case:

      Description

      Environment:

      • Cluster with 1 or more replicasets and 3 config servers, all running on Windows.
      • All MongoDB processes (mongoD, mongoS, config servers) are configured as Windows services. In addition, the services are setup with recovery actions that cause Windows to restart them on failure.
      • mongoS and config servers run on different hosts.

      Scenario:

      • Hosts are restarted.
      • mongoS Windows service starts before the config servers Windows services start.
      • mongoS service stops because it can't connect to any config servers.
      • However, Windows does NOT restart it - i.e., the recovery actions don't work.

      I believe that the issue is caused by method initService() in ntservice.cpp unconditionally calling reportStatus(SERVICE_STOPPED) when the service callback method returns.

      Here's a tentative fix:
      https://github.com/mongodb/mongo/pull/925

        Attachments

          Issue Links

            Activity

              People

              • Votes:
                0 Vote for this issue
                Watchers:
                5 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: