Skip to content
logo Knowledgebase

Additional notes when upgrading to MongoDB 4.x

Created on  | Last modified on 

Description

Recent versions of X3 Version 11 and Version 12 require more recent versions of MongoDB to be installed. You can confirm the minimum versions of MongoDB for each product/patch level using the "Prerequisites Overview" page in the Online Help ( http://online-help.sageerpx3.com/erp/12/public/prerequisites_overview.html )  

This document provides additional clarifications to the Online help  "How to upgrade to MongoDB 4." documentation (  MongoDB 4.0 ,  MongoDB 4.2  or MongoDB 4.4)  

IMPORTANT NOTE : The upgrade process requires you to upgrade through each major release of MongoDB. For example, if you are using MongoDB 3.4 you will need to upgrade to 3.6, then 4.0 before then upgrading to MongoDB 4.2 and then to MongoDB 4.4 if relevant for your X3 version  

NOTE 2 : If upgrading or installing MongoDB 4.4, refer to KB article 114445 "MongoDB database tools need to be separately installed from MongoDB 4.4 onwards"

Resolution

CAUTION: Use caution when working with the below product functionality. Always create a backup of your data before proceeding with advanced solutions. If necessary, seek the assistance of a qualified Sage business partner, network administrator, or Sage customer support analyst.


Read these notes first
1. When the new mongodb version is installed, the "mongodb.conf" file is replaced with a new default version of this file. You should therefore make sure you have a copy of this file before you attempt the upgrade. After the upgrade you should re-edit the new version of the mongodb.conf to incorporate any previously modified parameters
2. Before upgrading, it is recomended to use the "MongoDump" command to extract all the "Syracuse" database data, which will allow you to quickly recreated this data if needed
3. Follow the Sage provided patch instructions but also bear in mind the additional notes in this document
4. Don't forget to shutdown any Syracuse servers which are using this MongoDB instance before taking your backups or doing the upgrade procedure itself
5. You should also not forget to check/change the "featureCompatibilityVersion" parameter before you start, as discussed in https://docs.mongodb.com/v4.2/release-notes/4.2-upgrade-standalone/ For example, when upgrading from 4.0 to 4.2, the 4.0 instance must have "featureCompatibilityVersion" set to 4.0.

For a single node MongoDB installation
a. Run the MongoDB installer provided by Sage, selecting the "Modify installation" option when prompted
b. You should be able to select the same options as the original version for Port and whether to use SSL encrypted connections, etc.
c. If using SSL encryption, it is important to enter the correct passphrase when prompted. This passphrase is NOT validated by the installer so would accept an invalid passphrase (it will error later in the process) If you are unsure of this passphrase, for MongoDB 3.x versions you can review the existing mongodb.conf file and look for the parameter "PEMKeyPassword" for this value
NOTE1: you will need the original server certificate .key and .crt files. The installer will then generate a .pem file from these provided certificates
NOTE2: ensure you are using the correct JDK version, as decribed in DocLink: Knowledgebase Article ID 106113: "MongoDB 4.x installer hangs after validating certificates"
d. Once the installation has successfully completed, the MongoDB Windows service name will be something like "Safe X3 MongoDB MONGO01"
e. Review the new mongodb.conf file and add or change any parameters if needed

For a Replica Set MongoDB installation
The basic steps for upgrading a Replica Set are described in the MongoDB online help at https://docs.mongodb.com/v4.2/release-notes/4.2-upgrade-replica-set/ although you will be using the Sage supplied installation media to complete the process
Follow this process for each of the Secondary nodes, before then upgrading the primary node
a. Run the MongoDB installer provided by Sage, selecting the "Modify installation" option when prompted
b. You should be able to select the same options as the original version for Port and whether to use SSL encrypted connections, etc.
c. If using SSL encryption, it is important to enter the correct passphrase when prompted. This passphrase is NOT validated by the installer so would accept an invalid passphrase (it will error later in the process) If you are unsure of this passphrase, for MongoDB 3.x versions you can review the existing mongodb.conf file and look for the parameter "PEMKeyPassword" for this value
NOTE1: you will need the original server certificate .key and .crt files. The installer will then generate a .pem file from these provided certificates
NOTE2: ensure you are using the correct JDK version, as decribed in Knowledgebase Article ID 106113: "MongoDB 4.x installer hangs after validating certificates"
d. Once the installation has successfully completed, the MongoDB Windows service name will be something like "Safe X3 MongoDB MONGO01"
e. Review the new mongodb.conf file and add or change any parameters if needed IMPORTANT: you will at least need to re-add the replica set configuration and re-start the MongoDB service for the MongoDB you just updated

DocLink: Additional notes when upgrading to MongoDB 3.6