Recovery from Replica Set 'version' value must be < 2147483648

Though some testing with the replSetReconfig with force=true command, I’ve hit the maximum value of the Replica Set version field.

rs0 [direct: primary] test> rs.reconfig(cfg, {force: true})
MongoServerError: BSON field ‘version’ value must be < 2147483648, actual value ‘2147543330’

rs0 [direct: primary] test> cfg = rs.config().version
2147482000

Is there a way to recover from this without losing the database? If so, what is the procedure?

Note similar issues are reference by the following, but no recovery procedure was provided.

Reset replica set version number using rs.reconfig()

replSetReconfig force generates too high version number

Best Regards,
Matt

Are you also using the K8S operator like the other topics ?

Like the others, what are the:

  • OS
  • MongoDB Version

No, I’m not using K8S. I’m testing various scenarios with a PSA architecture. I’ve created the situation through test scripts looping over reconfig(force=true) and also manually adjusting the version, so I know how I got into the situation.

I’m trying to figure out a recovery procedure if this should happen in production after some period of time. Is there a way to recover from this scenario?

$ /usr/bin/mongod --version
db version v6.0.10
Build Info: {
    "version": "6.0.10",
    "gitVersion": "8e4b5670df9b9fe814e57cb5f3f8ee9407237b5a",
    "openSSLVersion": "OpenSSL 1.1.1f  31 Mar 2020",
    "modules": [],
    "allocator": "tcmalloc",
    "environment": {
        "distmod": "ubuntu2004",
        "distarch": "x86_64",
        "target_arch": "x86_64"
    }
}
$ lsb_release -a
No LSB modules are available.
Distributor ID:	Ubuntu
Description:	Ubuntu 20.04.6 LTS
Release:	20.04
Codename:	focal

Yes.

  1. Start each member without --replSet
  2. Drop the local database on each member
  3. Start with --replSet
  4. Initialise a new replicaset
  5. Add members

Stop using arbiters, they’re more trouble than they’re worth.

1 Like

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