I’ve got myself into a sticky situation. I’ve foolishly upgraded all nodes in a 3 node cluster to version 8.0, but the primary node (both secondary nodes are shutdown) fails to start giving ‘mongod.service: Main process exited, code=exited, status=2/INVALIDARGUMENT’
I suspect this maybe because the featureCompatibilityVersion is set to 4.2, which I suspect is not valid in version 8.0.
TIA,
Tony
But I can’t change this as the mongod service fails to start so I can’t connect to the db to change this.
So, 2 questions. How can I confirm that it is the featureCompatibilityVersion setting that is invalid? An if this is the problem, is there anyway to fix this without the mongod service started?
I have over 4 years of data that I really don’t want to lose if possible.
For info, I’m running on Ubuntu 24.04. The primary node is a 686 architecture and the secondary node are Pi 5 devices. And no, I don’t have any backups of my database!
I finally got this fixed. After looking at the logs, I found that the INVALIDARGUMENT error was due to entries in the mongod.conf file. One was a journal entry and the other was enableMajorityReadConcern, both of which are no longer valid in 8.0.
So, I removed the 2 Pi 5 devices from the replication set and then proceeded to update the PC from 4.4 though to 8.0 via 5.0, 6.0 and 7.0 updating the compatibility version as I went along.
I then deleted the database files on the Pi 5 devices, added them back into the replication set and started up mongod expecting them to synchronise. However, I have a corrupt document somewhere, so the replication failed. I overcame this by copying the database files from the PC to the Pi 5 devices. Started up mongod on the Pi 5 devices and all worked.
I still have a corrupt document. I don’t know how to fix that, but I can live with it for now.