Quantcast
Channel: StackExchange Replication Questions
Viewing all articles
Browse latest Browse all 17268

user not replicated to secondary nodes - Authentication failed

$
0
0

I created on primary node a user for mongodump

{
        "_id" : "admin.backup",
        "user" : "backup",
        "db" : "admin",
        "roles" : [
                {
                        "role" : "userAdminAnyDatabase",
                        "db" : "admin"
                },
                {
                        "role" : "clusterAdmin",
                        "db" : "admin"
                },
                {
                        "role" : "readAnyDatabase",
                        "db" : "admin"
                },
                {
                        "role" : "readWrite",
                        "db" : "local"
                },
                {
                        "role" : "readWrite",
                        "db" : "admin"
                }
        ]
}

On primary node I can successful login with this user.

On secondary node I can't login.

# mongo -u backup -psefwfwfe2seww4gklded3dddg-tt --port 27017 admin --host localhost
MongoDB shell version: 3.0.6
connecting to: localhost:27017/admin
2016-01-20T12:13:34.198+0100 E QUERY    Error: 18 Authentication failed.
    at DB._authOrThrow (src/mongo/shell/db.js:1271:32)
    at (auth):6:8
    at (auth):7:2 at src/mongo/shell/db.js:1271
exception: login failed

rs.status() shows a healthy replica set. It's the backend database for Ops Manager.


Viewing all articles
Browse latest Browse all 17268

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>