Skip to content

Failed to connect to MongoDB with username and password #480

Open
@gengqin

Description

@gengqin

It does not work when using authenticated MongoDB to store API definition

Reproduction Steps:
Configuration toml:
[database]
dsn = "mongodb://USERNAME:PASSWORD@janus-database:27017/janus"

Expected behavior:

It is expected to work as non-authenticated mongodb

Observed behavior:
Run: janus start
Error Message:

{"error":"could not build a repository for the database: could not connect to mongodb: server returned error on SASL authentication step: BSON field 'saslContinue.mechanism' is an unknown field.","level":"error","msg":"could not build a repository for the database: could not connect to mongodb: server returned error on SASL authentication step: BSON field 'saslContinue.mechanism' is an unknown field.","time":"2021-11-02T16:40:07+08:00"}

Janus version: [janus version 4.0.0]
OS and version: [Ubuntu]

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions