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

MSI installer produces incorrect config file

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Minor - P4 Minor - P4
    • 4.4.1, 4.7.0, 4.2.10, 4.0.21
    • Affects Version/s: 4.2.3
    • Component/s: Packaging
    • None
    • Fully Compatible
    • ALL
    • v4.4, v4.2, v4.0, v3.6
    • Hide
      1. Run the MSI installer.
      2. On the configuration screen, enter some short paths for the database and logs (e.g. c:\data and c:\logs).
      3. The mongod.cfg file will be produced incorrectly, and the MongoDB service will be unable to start.

       

      Actual output (the remaining bytes of the file are not truncated):

      # mongod.conf
      # for documentation of all options, see:
      # http://docs.mongodb.org/manual/reference/configuration-options/
      # Where and how to store data.
      storage:
      {{ dbPath: C:\data\db}}
      {{ journal:}}
      {{ enabled: true}}
      # engine:
      # mmapv1:
      # wiredTiger:
      # where to write logging data.
      systemLog:
      {{ destination: file}}
      {{ logAppend: true}}
      {{ path: C:\ProgramData\MongoDB\log\mongod.log}}# network interfaces
      net:
      {{ port: 27017}}
      {{ bindIp: 127.0.0.1}}
      #processManagement:
      #security:
      #operationProfiling:
      #replication:
      #sharding:
      ## Enterprise-Only Options:
      #auditLog:
      #snmp:
      ditLog:
      #snmp:{{}}

      Show
      Run the MSI installer. On the configuration screen, enter some short paths for the database and logs (e.g. c:\data and c:\logs). The mongod.cfg file will be produced incorrectly, and the MongoDB service will be unable to start.   Actual output (the remaining bytes of the file are not truncated): # mongod.conf # for documentation of all options, see: # http://docs.mongodb.org/manual/reference/configuration-options/ # Where and how to store data. storage: {{ dbPath: C:\data\db}} {{ journal:}} {{ enabled: true}} # engine: # mmapv1: # wiredTiger: # where to write logging data. systemLog: {{ destination: file}} {{ logAppend: true}} {{ path: C:\ProgramData\MongoDB\log\mongod.log}} # network interfaces net: {{ port: 27017}} {{ bindIp: 127.0.0.1}} #processManagement: #security: #operationProfiling: #replication: #sharding: ## Enterprise-Only Options: #auditLog: #snmp: ditLog: #snmp: {{}}
    • Dev Platform 2020-06-15, Dev Platform 2020-06-29

      The MSI installer has a custom screen on which the user can enter the path to data files and logs. The mongod.cfg file is produced based on the settings on this screen.

      If the user selects a shorter path of the log file or data directory than defaults, an incorrect config file is produced.

       

      I have provided a [PR #1355 on GitHub|https://github.com/mongodb/mongo/pull/1355] that should fix the issue (I wasn't able to build and test the installer, but I hope I fixed it correctly).

            Assignee:
            andrew.morrow@mongodb.com Andrew Morrow (Inactive)
            Reporter:
            herceg.tomas@gmail.com Tomáš Herceg
            Votes:
            1 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated:
              Resolved: