Backend – SASL Error with MongoDB & Docker – Windows 10

  config, database, docker, go, mongodb

I’m working on a mobile app project with 2 parts for :

  • the front-end (8080 as a local port)
  • the back-end, written in Go

Every part is divided into contained on Docker.

I’m also working on a Windows 10 environment.

I gathered the both parts in a same folder for an easier management.

The back end part has an issue and is divided into 5 parts :

  • mongo
  • redis
  • redis_commander (8082)
  • mongo_express (8081)
  • backend (5000)

This last one causes the following SASL error :

/app/db/db.go:53 +0xbf

2021/07/22 10:15:15 Database:mongo:27017

panic: server returned error on SASL authentication step: BSON field 'saslContinue.mechanism' is an unknown field.

Meanwhile, I also :

  • deleted the containers, the volumes and the images
  • builded every part again several times
  • reviews my config files, also with my colleagues who founded the system

Now, I wonder if is there a link with the record admin.root in the collection system.users.

{
    _id: 'admin.root',
    userId: UUID("3218835e3b2c476596d5fc7b8d802dfe"),
    user: 'root',
    db: 'admin',
    credentials: {
        'SCRAM-SHA-1': {
            iterationCount: 10000,
            salt: 'N/ZqViIDXVlh1yL9oJXH0Q==',
            storedKey: 'zpaM2HTjADDDlGNfJLThT11weBc=',
            serverKey: 'WM8729pdlHzrAYh4ekfzLUviOSc='
        },
        'SCRAM-SHA-256': {
            iterationCount: 15000,
            salt: 'HRmulteEyNm7PR4NzGkmZAYXmIougR5TJWPl3Q==',
            storedKey: 'by47JM4K4TiSAhNZFKF8mYGCUE1qXwDCN+19Znd+V6Q=',
            serverKey: 'xDbDOxUXdS62iAzJIoVB6+v0UF4J87Cvf2QHJK2SnQc='
        }
    },
    roles: [
        {
            role: 'root',
            db: 'admin'
        }
    ]
}

Thank you a lot in advance.

Source: Docker Questions

LEAVE A COMMENT