1

I am hitting the same error in trying to backup a mongo stand-alone database:

Failed: error connecting to db server: server returned error on SASL authentication step: BSON field 'saslContinue.mechanism' is an unknown field.

Most of the other answers, point to adding --authenticationDatabase=admin, but this did not solve it for me.

I have tried basically the same thing in a few different ways, they all give the same error:

# mongodump --host 192.168.43.67:27017 -u "<USERNAME>" -p '<PASSWORD>'  --authenticationDatabase "admin"
# mongodump --host 192.168.43.67 -u "<USERNAME>" -p '<PASSWORD>' --out /var/backups/mongobackups/$(date +'\%y-\%m-\%d') 
# mongodump --host 192.168.43.67:27017 --username <USERNAME> --password '<PASSWORD>' --authenticationDatabase admin --db <DBNAME> --out /var/backups/mongobackups/$(date +'\%y-\%m-\%d') 
# mongodump mongodb://<USERNAME>:<PASSWORD>@192.168.43.67:27017
# mongodump --host=192.168.43.67 --port=27017 --username=<USERNAME> --authenticationDatabase=admin --out=/var/backups/mongobackups/$(date +'\%y-\%m-\%d') 

My password does include a special character, an @ sign.

The config is pretty vanilla:

#mongodb.conf - generated from Puppet
#System Log
systemLog.path: /var/log/mongodb/mongodb.log
systemLog.destination: file
systemLog.logAppend: true
systemLog.quiet: false
systemLog.verbosity: 2

#Process Management
processManagement:
pidFilePath: /var/run/mongod.pid

#Storage
storage.dbPath: /var/lib/mongodb

#Security
security.authorization: enabled

#Net
net.bindIp:  0.0.0.0

I can succesfully enter the shell by running:

mongo -u <USERNAME> -p <PASSWORD> 192.168.43.67/<DBNAME> --authenticationDatabase "admin"

Version info:

# apt list --installed | grep mongo
mongo-tools/focal,now 3.6.3-0ubuntu1 amd64 [installed]
mongodb-org-server/focal,now 5.0.6 amd64 [installed,upgradable to: 5.0.10]
mongodb-org-shell/focal,now 5.0.6 amd64 [installed,upgradable to: 5.0.10]

# mongodump --version
mongodump version: built-without-version-string
3
  • What are the versions of MongoDB and mongodump? Commented Aug 14, 2022 at 10:59
  • Updated to add version info
    – Werner
    Commented Aug 15, 2022 at 6:24
  • I recommend downloading the version from MongoDB's site and not from apt. Commented Aug 15, 2022 at 6:27

1 Answer 1

1
get the "mongodb-database-tools"  after update to this version error was gone

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .