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

    • Type: Icon: Bug Bug
    • Resolution: Duplicate
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: Admin
    • Labels:
      None
    • Windows
    • Platform 4 06/05/15, Platform 5 06/26/16

      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

            Assignee:
            mark.benvenuto@mongodb.com Mark Benvenuto
            Reporter:
            alessandro.gherardi@schneider-electric.com Alessandro Gherardi
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: