Tag Archives: mongodump Error

[Solved] mongodump Error: assertion: 2 { ok: 0.0, errmsg: “Auth mechanism not specified”, code: 2, codeName: “BadValue”…

Mongodump error

assertion: 2 { ok: 0.0, errmsg: “Auth mechanism not specified”, code: 2, codeName: “BadValue”, operationTime: Timestamp 1573815888000|1, $clusterTime: { clusterTime: Timestamp 1573815888000|1,

reason

It is caused by the lower version of mongodump. You need to uninstall the default Yum source installation version and reinstall the new version.

System default installation version: 2. X
requirement Version (support cluster version): 4. X

terms of settlement:

create a file

/etc/yum.repos.d/mongodb-org-4.0.repo

[mongodb-org-4.0]
name=MongoDB Repository
baseurl=https://repo.mongodb.org/yum/redhat/$releasever/mongodb-org/4.0/x86_64/
gpgcheck=1
enabled=1
gpgkey=https://www.mongodb.org/static/pgp/server-4.0.asc

Installation configuration

yum install -y mongodb-org