mongodb - mongooplog is failing with unauthorized error -


i trying replay oplog 1 replica set in mongo. getting error, idea why?

mongooplog --from "10.0.0.180:27017"  -h "my_rs/10.0.0.88:27017,10.0.0.88:27018,10.0.0.88:27019" -d my_db -u dbuser -p db_pass fri jun 27 14:24:21 starting new replica set monitor replica set my_rs seed of 10.0.0.88:27017,10.0.0.88:27018,10.0.0.88:27019                     fri jun 27 14:24:21 connected seed 10.0.0.88:27017 replica set my_rs fri jun 27 14:24:21 changing hosts { 0: "10.0.0.88:27017", 1: "10.0.0.88:27018" } my_rs/                                                            fri jun 27 14:24:21 trying add new host 10.0.0.88:27017 replica set my_rs fri jun 27 14:24:21 connected new host 10.0.0.88:27017 in replica set my_rs fri jun 27 14:24:21 trying add new host 10.0.0.88:27018 replica set my_rs fri jun 27 14:24:21 connected new host 10.0.0.88:27018 in replica set my_rs fri jun 27 14:24:21 connected seed 10.0.0.88:27019 replica set my_rs fri jun 27 14:24:21 primary replica set my_rs changed 10.0.0.88:27017                                                                                fri jun 27 14:24:21 replica set monitor replica set my_rs started, address my_rs/10.0.0.88:27017,10.0.0.88:27018                                   connected to: my_rs/10.0.0.88:27017,10.0.0.88:27018,10.0.0.88:27019                                                                                         fri jun 27 14:24:21 [replicasetmonitorwatcher] starting                                                                                                       fri jun 27 14:24:21 [oplogreplay] going connect                                                                                                            fri jun 27 14:24:21 [oplogreplay] connected                                                                                                                   fri jun 27 14:24:21 [oplogreplay] starting jun 26 14:24:21:0                                                                                             fri jun 27 14:24:21 [oplogreplay] { assertion: "unauthorized db:admin ns:admin lock type:1 client:10.0.0.88", assertioncode: 10057, errmsg: "db assertion failure", ok: 0.0 }                                                                                                                                              fri jun 27 14:24:21 [oplogreplay] { assertion: "unauthorized db:admin ns:admin lock type:1 client:10.0.0.88", assertioncode: 10057, errmsg: "db assertion failure", ok: 0.0 }                                                                                                                                              fri jun 27 14:24:21 [omongooplog --from "10.0.0.180:27017"  -h "my_rs/10.0.0.88:27017,10.0.0.88:27018,10.0.0.88:27019" -d my_db -u dbuser -p db_pass fri jun 27 14:24:21 starting new replica set monitor replica set my_rs seed of 10.0.0.88:27017,10.0.0.88:27018,10.0.0.88:27019                     fri jun 27 14:24:21 connected seed 10.0.0.88:27017 replica set my_rs fri jun 27 14:24:21 changing hosts { 0: "10.0.0.88:27017", 1: "10.0.0.88:27018" } my_rs/                                                            fri jun 27 14:24:21 trying add new host 10.0.0.88:27017 replica set my_rs fri jun 27 14:24:21 connected new host 10.0.0.88:27017 in replica set my_rs fri jun 27 14:24:21 trying add new host 10.0.0.88:27018 replica set my_rs fri jun 27 14:24:21 connected new host 10.0.0.88:27018 in replica set my_rs fri jun 27 14:24:21 connected seed 10.0.0.88:27019 replica set my_rs fri jun 27 14:24:21 primary replica set my_rs changed 10.0.0.88:27017                                                                                fri jun 27 14:24:21 replica set monitor replica set my_rs started, address my_rs/10.0.0.88:27017,10.0.0.88:27018                                   connected to: my_rs/10.0.0.88:27017,10.0.0.88:27018,10.0.0.88:27019                                                                                         fri jun 27 14:24:21 [replicasetmonitorwatcher] starting                                                                                                       fri jun 27 14:24:21 [oplogreplay] going connect                                                                                                            fri jun 27 14:24:21 [oplogreplay] connected                                                                                                                   fri jun 27 14:24:21 [oplogreplay] starting jun 26 14:24:21:0                                                                                             fri jun 27 14:24:21 [oplogreplay] { assertion: "unauthorized db:admin ns:admin lock type:1 client:10.0.0.88", assertioncode: 10057, errmsg: "db assertion failure", ok: 0.0 }                                                                                                                                              fri jun 27 14:24:21 [oplogreplay] { assertion: "unauthorized db:admin ns:admin lock type:1 client:10.0.0.88", assertioncode: 10057, errmsg: "db assertion failure", ok: 0.0 }                                                                                                                                              fri jun 27 14:24:21 [oplogreplay] { assertion: "unauthorized db:admin ns:admin lock type:1 client:10.0.0.88", assertioncode: 10057, errmsg: "db assertion failure", ok: 0.0 }                                                                                                                                              fri jun 27 14:24:21 [oplogreplay] { assertion: "unauthorized db:admin ns:admin lock type:1 client:10.0.0.88", assertioncode: 10057, errmsg: "db assertion failure", ok: 0.0 }                                                                                                                                              fri jun 27 14:24:21 [oplogreplay] { assertion: "unauthorized db:admin ns:admin lock type:1 client:10.0.0.88", assertioncode: 10057, errmsg: "db assertion failure", ok: 0.0 }                                                                                                                                              fri jun 27 14:24:21 [oplogreplay] { assertion: "unauthorized db:admin ns:admin lock type:1 client:10.0.0.88", assertioncode: 10057, errmsg: "db assertion failure", ok: 0.0 }                                                                                                                                              fri jun 27 14:24:21 [oplogreplay] { assertion: "unauthorized db:admin ns:admin lock type:1 client:10.0.0.88", assertioncode: 10057, errmsg: "db assertion failure", ok: 0.0 }                                                                                                                                              fri jun 27 14:24:21 [oplogreplay] { assertion: "unauthorized db:admin ns:admin lock type:1 client:10.0.0.88", assertioncode: 10057, errmsg: "db assertion failure", ok: 0.0 } plogreplay] { assertion: "unauthorized db:admin ns:admin lock type:1 client:10.0.0.88", assertioncode: 10057, errmsg: "db assertion failure", ok: 0.0 }                                                                                                                                              fri jun 27 14:24:21 [oplogreplay] { assertion: "unauthorized db:admin ns:admin lock type:1 client:10.0.0.88", assertioncode: 10057, errmsg: "db assertion failure", ok: 0.0 }                                                                                                                                              fri jun 27 14:24:21 [oplogreplay] { assertion: "unauthorized db:admin ns:admin lock type:1 client:10.0.0.88", assertioncode: 10057, errmsg: "db assertion failure", ok: 0.0 }                                                                                                                                              fri jun 27 14:24:21 [oplogreplay] { assertion: "unauthorized db:admin ns:admin lock type:1 client:10.0.0.88", assertioncode: 10057, errmsg: "db assertion failure", ok: 0.0 }                                                                                                                                              fri jun 27 14:24:21 [oplogreplay] { assertion: "unauthorized db:admin ns:admin lock type:1 client:10.0.0.88", assertioncode: 10057, errmsg: "db assertion failure", ok: 0.0 }                                                                                                                                              fri jun 27 14:24:21 [oplogreplay] { assertion: "unauthorized db:admin ns:admin lock type:1 client:10.0.0.88", assertioncode: 10057, errmsg: "db assertion failure", ok: 0.0 }  

the from parameter rs (with noauth=true set), if try use "my_rs/10.0.0.180:27017" fails, doesn't from parameter can use rs address.

the username , password used replay on 88 in admin db my_db.

update

i have upgraded 2.4.10. upgrade seems give more meaningful logging. on 180, can connect local db (without auth) , db.oplog.rs.count() , results (both on local , remote connections). however, when run mongooplog 180 from, still error (this 88):

tue jul  1 10:16:29.034 [oplogreplay] error getting oplog tue jul  1 10:16:29.034 [oplogreplay] { $err: "not authorized query on local.oplog.rs", code: 16550 } 

and see similar error in 180's error logs.

you need add authentication database command line, default mongooplog going assume username , password credentials apply database applying oplog to.

--authenticationdatabase dbname

new in version 2.4.

specifies database holds user’s credentials. if not specify authentication database, mongooplog assumes that

the database specified argument --db option holds user’s credentials.

so in case add --authenticationdatabase admin command line.


Comments

Popular posts from this blog

javascript - RequestAnimationFrame not working when exiting fullscreen switching space on Safari -

Python ctypes access violation with const pointer arguments -