Shell and server versions do not match

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:

  1. Identify the PID of the mongod that is currently running in your PC.
$ 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.

  1. Find the binary running this PID:
$ 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 :slight_smile: !