MongoDB Multiple Instances

Learn about MongoDB, which can run multiple instances on a single endpoint. To support accurate detection and smooth patching of all MongoDB installations that use tarball or ZIP packages, BigFix uses the Middleware Scanner. This scanner discovers all installed MongoDB versions and installation paths, while the patching process updates outdated versions in a single execution.

Note: This workflow applies only to MongoDB installations that use tarball or ZIP packages. Upgrades for deb based, rpm based, and msi based package installations continue to use their respective native BigFix Fixlets and do not require the Middleware Scanner.

Scanner Process

For running the scans on every software version, refer to BigFix Scanner for Middleware Application. These results are then used by the MongoDB patching tasks to determine which instances require updates.

Note: Before you start patching, it is recommended that you back up all custom configurations, instance files, and environment-specific settings. This helps you restore custom settings if needed after patching.

Patching Process

The MongoDB patching task uses the scanner results to identify lower versions and update them to the patch version specified in the task.

  1. Select the applicable computer in the BigFix Console to review the installed versions.
  2. When you take action on the endpoint, the patching task reads the results.xml and identifies all MongoDB instances.
  3. All outdated or lower MongoDB versions are updated in a single execution, including:
    Recommended:

    If only one instance is found, that specific instance is patched.

    If multiple instances are found, for example, five, the task goes through all five instances and tries to patch them all in a single run.

  4. If the installed version is the same or higher, then patching is skipped.
    Note:
    • Take a database backup manually.
    • Services must be stopped before patching starts and restarted after patching is complete.
    • Registry keys are not updated during patching. Only the necessary folders are copied during patching.

Exit codes and their meanings

When you perform tasks such as patching or extracting files in MongoDB, certain exit codes may be returned to show the result of the operation. These codes help identify problems during the installation or update process. The following list shows common exit codes, their meanings, and suggested actions to fix the issues.
Note: MongoDB checks its version using mongod.exe --version or ./mongod --version. Make sure that all required prerequisites are met before you continue.
Table 1. Exit codes and their meanings
Exit code Action
Exit Code 12: results and/or JSON file not present
  • Check if the results and/or JSON file are present in the specified folder.
  • Run the scanner task again to generate the above files with the latest versions of the installed MongoDB instances.
Exit Code 13: Archive file not found
  • Verify that the download link is correct and the file is accessible.
  • Ensure the file exists at the specified location.
Exit Code 14: Patching of one or more instances failed
  • Run the discovery task again to retrieve the latest versions of the installed MongoDB instances.
  • Ensure that all instances are properly configured and accessible.