Upgrading MongoDB ReplicaSet to 3.0 – BSONElement Bad Type 108 Error

mongodbreplication

I followed the official guide to upgrade a MongoDB ReplicaSet from 2.6 to 3.0 on the secondary member.

  1. Shutdown mongod (systemctl stop mongodb.service) on secondary
  2. Installed binaries (via apt-get)
  3. Update mongod.conf
  4. Restart mongod: failed!

[NetworkInterfaceASIO-Replication-0] Uncaught exception in NetworkInterfaceASIO IO worker thread of type: Location10320: BSONElement: bad type 108

[NetworkInterfaceASIO-Replication-0] Fatal Assertion 28820

Looks like my databases are corrupt but mongod w/out replSet works fine with the same dbs.

Did I miss something?

Best Answer

Found the answer:

In 3.2 WiredTiger is the default storage engine. So I had to remove existing databases (/var/lib/mongod). After starting mongod it will replicate from the primary member.

I accidently updeted directly to 3.2.9 and it worked. That was the reason that WiredTiger was default engine.