Devstack: MongoDB exits with error


I’m having an issue with the mongodb container. While running make dev.provision, the script is stuck while waiting for mongofb:

+ echo -e '\033[0;32mWaiting for MongoDB...\033[0m'
Waiting for MongoDB...
+ docker-compose exec -T mongo bash -c 'mongo --eval "printjson(db.serverStatus())"'
+ printf .
.+ sleep 1
+ docker-compose exec -T mongo bash -c 'mongo --eval "printjson(db.serverStatus())"'
+ printf .
.+ sleep 1

I tried docker-compose up mongo and I see the follow error in the output:

edx.devstack.mongo        | 2020-08-05T14:33:13.046+0000 F CONTROL  [initandlisten] ** IMPORTANT: UPGRADE PROBLEM: The data files need to be fully upgraded to version 3.4 before attempting an upgrade to 3.6; see for more details.
edx.devstack.mongo        | 2020-08-05T14:33:13.048+0000 I NETWORK  [initandlisten] shutdown: going to close listening sockets...

I tried deleting the image and and running the docker-compose command again but same thing happens.

I’m running on Windows 10 using Docker toolbox and devstack used to run fine. I tried a devstack install on an Ubuntu VM and it works fine.

Any ideas on how I could solve this?

Were you trying to update from 3.2 to 3.6?

If you first upgraded from 3.2 to 3.4, there is a step between 3.4 to 3.6 where you need to run the following in MongoDB:
db.adminCommand( { setFeatureCompatibilityVersion: “3.4” } )

I got stuck when using the native installation when I tried updating from 3.4 to 3.6 without running that command.


I’m trying to run devstack (forgot to mention) so it’s pulling the mongo 3.6 image. Which makes this error message even more confusing…

I can see a script ( that has the step you mentioned so I will try that.

I just quickly reverted back my devstack to ironwood.master and I don’t get that issue.

That’s because Ironwood runs 3.2. When you move your data to Juniper, you may need to upgrade to 3.4 and then to 3.6. Or go from 3.2 to 3.4 and then 3.6 on Ironwood before moving to Juniper.

1 Like

Ah yes, I think moving my data was the “key”.

I thought I was making a fresh install so there was no data to be migrated. But I think because my volumes were the same I needed to do the migration (not 100% sure about this I tried a bunch of stuff on 2 different computers! :sweat_smile:).

PC 1: I deleted the docker-machine VM entirely and reinstalled it and it worked.
PC 2: I run the and it worked.

The provision seems to be working so far (fingers crossed).

Thanks Pierre!


Hi Pierre!
Is it possible to have both versions of Mongo in the same computer? Maybe with two venvs? I would like to run both ironwood and juniper and be able to switch between them

I have never tried that. I am not running on Devstack either. I would probably not recommend it. But since I haven’t tried it I cannot answer you. Sorry.