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

replSetInitiate with no explicit configuration should generate config with localhost by default

    • Fully Compatible
    • Platforms 2017-10-23

      Currently if you run replSetInitiate without providing an initial config, mongod will attempt to deduce its hostname by inspecting the available network interfaces, and then will generate a default configuration with itself as the only member, addressed by the hostname it discovered. Now that mongods bind only to localhost by default (SERVER-28229), this breaks the bootstrapping technique that is common for setting up initial deployments, since running replSetInitiate with no config will default to a hostname based config, but then be unable to find itself in the config since it only accepts connections over localhost. Instead of trying to guess the host machine's hostname we should just generate the default config using localhost.

            sara.golemon@mongodb.com Sara Golemon
            spencer@mongodb.com Spencer Brody (Inactive)
            0 Vote for this issue
            8 Start watching this issue