How to check mongo version from volumes that I've set in the docker-compose.yml file?

Hi, I have some problem with my Mongo volumes that I’ve set for my docker-compose.yml file about this project I’ve worked on about half a year ago but I didn’t set the version and today I’ve clean all my docker images in my machine and re-running docker-compose file but It’s thrown me the error message below
“Failed to start up WiredTiger under any compatibility version. This may be due to an unsupported upgrade or downgrade.”

So there is a way that I can check the version of mongo from my volume files?

Hello @tanapone_kanongsri

Yes it is, sort of. Note that this will only show what version last successfully started the database not what FCV it is at.

On startup mongod will write out the results of some commands to the diagnostic.data folder, this can be parsed to see what version it was running at that time.

This is an example of a data directory that does not start with mongod 4.4

I’m not sure if there are any other tricks to find the info. When I tried a 3.6 database with mongod 4.2 it did say what version the database was at in the error.

bsondump --version
bsondump version: 100.2.0

bsondump --quiet /data/db/diagnostic.data/metrics.2020-10-21T12-27-20Z-00000 | jq -s '.[] | select(.type == {"$numberInt": "0"})| .doc.buildInfo.version'
"3.2.21"

Good write up I found which helped with this:
https://www.alexbevi.com/blog/2020/01/26/what-is-mongodb-ftdc-aka-diagnostic-dot-data/

2 Likes

You saved my life thank you so much :smiley:

1 Like

This topic was automatically closed 5 days after the last reply. New replies are no longer allowed.