How to upgrade to MongoDB 4.2

The latest delivered MongoDB version is 4.2. It can be used by the latest U9, V11 and V12 Syracuse releases.

Important: You must be running MongoDB 4.0 to upgrade to MongoDB 4.2.

Sage delivers a MongoDB setup to upgrade your MongoDB instance.

Prerequisites

For each release, the minimum Syracuse upgrades compatible with MongoDB 4.2 are the following:

Product version Minimum Sage X3 Syracuse Server version
V11 11.24.0
V12 12.9.0

Upgrade your MongoDB instance

You can upgrade your MongoDB instance to version 4.2 from MongoDB 4.0. Consult this documentation if you need to upgrade to MongoDB 4.0 first.

Upgrade from MongoDB 4.0

  1. Stop the Syracuse Agent. This is mandatory in order not to have any MongoDB client. Check that you don’t have any node.js nanny, Nx, Wx or B0 running.

  2. Starting in version 4.2, MongoDB removes the deprecated MMAPv1 storage engine. If upgrading to MongoDB 4.2 from a MongoDB 4.0 deployment that uses MMAPv1, you must upgrade to WiredTiger.
    To check if your mongo deployement uses MMAPv1 please run this command in your mongo client db.serverStatus().storageEngine
    If you are in MMAPv1 you must to do the following steps before upgrading
    • export your data using mongodump command
    • stop the mongodb server
    • remove all files from mongodb data directory
    For more informations about WiredTiger migration please follow this link

  3. Launch the MongoDB 4.2 setup. Use the reinstallation procedure
    If you previously mongodb instance was in MMAPv1 (see step 2) you must restore the saved data using mongorestore command

  4. If you are using a Java Oracle platform and if the MongoDB server will use an SSL connection, you need to :
    1. Be at at least on Java 8 update 151.
    2. Add Java Bouncy Castle to the security providers’ list on your platform:
      1. Unzip the content of the bcprovider.zip file to the $JAVA_HOME/jre/lib/ext/ directory.
      2. Register the Bouncy Castle provider by adding the security.provider.=org.bouncycastle.jce.provider.BouncyCastleProvider line in the $JAVA_HOME/jre/lib/security/java.security file.
      You can find out more about JCE provider here.
    3. Check in $JAVA_HOME/jre/lib/security/java.security that your crypto policy is set to unlimited: crypto.policy=unlimited.
  5. If the original installation was set only to accept secure connection, pay attention to The server uses and accepts only SSL encrypted connections option.
  6. Restart your Sage X3 Syracuse Server.