Cannot upgrade mender server from v2.4.0 to v2.6.1 - mongo container is “restarting”

After the upgrade from mender server open source 2.4.0 to 2.6.1, the mongo container is restarting:

Obviously, also other containers restart because they are not able to connect with mongo.

can anyone assist me to resolve the above issue?

Did you upgrade 2.4 to 2.5 first?

From 2.4 to 2.5 there are some migrating steps to perform, mongo being one.

https://docs.mender.io/2.5/server-installation/upgrading

No. our devices are running with mender server v2.4. and i want to upgrade them into mender server v2.6 with same dns & server certification.

Ah I see, you need to upgrade to 2.5 first and follow the migration steps in the link above.

Mender doesn’t support jumping over a version when upgrading. I believe you can jump over bug release version numbers, but to be honest I upgrade and test in a VM each bug release version before repeating with the production server.

@dellgreen
I have upgraded v2.4 to v2.6 with the same DNS & server certification file (e.g. server.crt) successfully by modifying a docker-compose.yml file mender-mongo version from 4.4. to 4.0 and then execute the getParameter command for checkings as below

~/mender-server/production$ sudo docker exec -it menderproduction_mender-mongo_1 mongo --eval "db.adminCommand( { getParameter: 1, featureCompatibilityVersion: 1 } )"
MongoDB shell version v4.0.24
connecting to: mongodb://127.0.0.1:27017/?gssapiServiceName=mongodb
Implicit session: session { "id" : UUID("99b12cbd-6ac4-442d-ad30-7f4538c1d341") }
MongoDB server version: 4.0.24
{ "featureCompatibilityVersion" : { "version" : "3.6" }, "ok" : 1 }

image

Then execute the below commands

sudo ./run pull
sudo ./run stop
sudo ./run rm
sudo ./run up -d
sudo ./run ps

~/mender-server/production$ sudo ./run up -d
Creating menderproduction_mender-mongo_1 ... done
Creating menderproduction_mender-nats_1  ... done
Creating menderproduction_mender-gui_1                    ... done
Creating menderproduction_minio_1                         ... done
Creating menderproduction_mender-workflows-worker_1       ... done
Creating menderproduction_mender-create-artifact-worker_1 ... done
Creating menderproduction_mender-workflows-server_1       ... done
Creating menderproduction_mender-useradm_1                ... done
Creating menderproduction_mender-deviceconnect_1          ... done
Creating menderproduction_mender-inventory_1              ... done
Creating menderproduction_mender-device-auth_1            ... done
Creating menderproduction_storage-proxy_1                 ... done
Creating menderproduction_mender-deployments_1            ... done
Creating menderproduction_mender-api-gateway_1            ... done

Hi @Rohita83 we only test single version upgrades so recommend that you first update to 2.5 and then to 2.6. It’s possible skipping versions will work but we cannot confirm.
Drew