I tried to upgrade from Community Edition 4.2.8 to Enterprise Edition 4.4 by replacing the existing binaries as described here.
MongoDB shell version was updated to v4.4.0, but MongoDB server version is still 4.2.8. How can I solve this?
I tried to upgrade from Community Edition 4.2.8 to Enterprise Edition 4.4 by replacing the existing binaries as described here.
MongoDB shell version was updated to v4.4.0, but MongoDB server version is still 4.2.8. How can I solve this?
mongod --version to check.db.adminCommand( { setFeatureCompatibilityVersion: "4.4" } )
Thank you, Maxime !
Yes
It works and I get this response.
db version v4.4.0
Build Info: {
āversionā: ā4.4.0ā,
āgitVersionā: ā563487e100c4215e2dce98d0af2a6a5a2d67c5cfā,
āmodulesā: [
āenterpriseā
],
āallocatorā: āsystemā,
āenvironmentā: {
ādistarchā: āx86_64ā,
ātarget_archā: āx86_64ā
}
}
{
āokā : 0,
āerrmsgā : "Invalid command argument. Expected ā4.2ā or ā4.0ā, found 4.4 in: { setFeatureCompatibilityVersion: ā4.4ā, lsid: { id: UUID(ā39820014-601d-4a26-a816-51adac01dc04ā) }, $db: āadminā }. See https://docs.mongodb.com/manual/release-notes/4.2-compatibility/#feature-compatibility.",
ācodeā : 2,
ācodeNameā : āBadValueā
}
Well if you are still running the server in 4.2.8 itās because the 4.2.8 binary is still installed somewhere in your computer and when you are starting the mongod process, you are not using the binary 4.4.0 binary you just installed.
I would suggest the following to find the hidden binary:
$ ps aux | grep mongod
999 56703 1.3 0.7 1903520 123556 ? Ssl 02:12 0:02 mongod --replSet=test --bind_ip_all
polux 57291 0.0 0.0 6244 660 pts/1 S+ 02:15 0:00 grep --color=auto mongod
In my exemple, itās 56703 here.
$ sudo ls -l /proc/56703/exe
[sudo] password for polux:
lrwxrwxrwx 1 999 docker 0 Sep 9 02:12 /proc/56703/exe -> /usr/bin/mongod
Then I bet if you take this path and check the version, you will probably get 4.2.8.
/usr/bin/mongod --version
I did this little test with a mongod running in Docker but Iām guessing you installed MongoDB using the package manager of your system and I guess you are not running the binary you think you are running.
Please make sure to make a backup of your database before you upgrade - just in case
!
I can identify PID, but the second step does not find anything. After entering my password, it says ls: ./proc/<PID>/exe: No such file or directory
Which OS are you using? Maybe itās slightly different from my Debian. What do you have in the /proc/<PID>/ folder?
Also I see you have an extra ādotā in your error, are in sure you are pointing to the right file?
Itās $ sudo ls -l /proc/<PID>/exe.
Not $ sudo ls -l ./proc/<PID>/exe.
macOS Catalina. I canāt find /proc. I tried both /proc and ./proc after your previous message, and happened to copy the error message with a dot.
Ohh thatās not Linux my friend! I never touched a Mac in my life so I wonāt do any better than Google on this one I guess.
If you see that your mongod is still running in 4.2.8, thatās because 4.2.8 is installed somewhere in your computer and itās the one that you are starting.
Maybe you can find this binary with find?
$ find / -name "mongod" 2> /dev/null
/home/polux/Softwares/mongodb-linux-x86_64-enterprise-debian10-4.2.8/bin/mongod
/home/polux/Softwares/mongodb-linux-x86_64-enterprise-debian10-4.4.0/bin/mongod
Thatās where I install MongoDB in my PC but maybe you have 4.2.8 that was installed with MacOS package manager and 4.4.0 installed manually?
How do you start the āmongodā process?
I only find 4.4.0 with this command. Both were installed with package manager. I simply type mongod to start.
I donāt know why, but community server 4.4.0 does not get the same problem as the enterprise server. Iāll stay with community for now.
2 posts were split to a new topic: Server and shell versions do not match