Hi all,
Hoping someone could help me with a mongooplog issue I have, I can't seem to find what I am doing wrong (have posted it on stackoverflow too -
http://stackoverflow.com/questions/24454372/mongooplog-is-failing-with-unauthorized-error)
I have 2 RS's configured on 2 hosts - each host has a primary, a secondary and an arbiter.
10.0.0.180 has noauth=true set, with :27017 primary, 27018 secondary and 27019 the arbiter.
10.0.0.88 has noauth=false, with same port / roles.
I can connect to the primary on 180 without authentication and query databases (including db.oplog.rs.find() in local) from both local and remote. However, when I run mongooplog, it fails with authorization errors. I have tried running oplog on 180 (the "from" host) as well as 88 (destination), but always fail. Here's what I've tried:
$ 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 username -p password --authenticationDatabase my_db
Tue Jul 1 10:16:29.032 [ReplicaSetMonitorWatcher] starting
Tue Jul 1 10:16:29.033 [oplogreplay] going to connect
Tue Jul 1 10:16:29.033 [oplogreplay] connected
Tue Jul 1 10:16:29.033 [oplogreplay] starting from Jun 30 10:16:29:0
Tue Jul 1 10:16:29.034 [oplogreplay] error getting oplog
Tue Jul 1 10:16:29.034 [oplogreplay] { $err: "not authorized for query on
local.oplog.rs", code: 16550 }
And the corresponding logs show up in 180's primary logs:
Tue Jul 1 10:34:48.779 [initandlisten] connection accepted from
10.0.0.88:36485 #5273 (5 connections now open)
Tue Jul 1 10:34:48.779 [conn5273] assertion 16550 not authorized for query on
local.oplog.rs ns:
local.oplog.rs query:{ ts: { $gte: Timestamp 1404124485000|0 } }
Tue Jul 1 10:34:48.780 [conn5273] end connection
10.0.0.88:36485 (4 connections now open)
The same error occurs, regardless of whether I leave authenticationDatabase out, use local or use admin instead of my_db.
I have also tried using "my_rs/
10.0.0.180:27017,
10.0.0.180:27018" as a from parameter, thinking I might need to provide an rs-format from. This fails with:
mongooplog: src/third_party/boost/boost/smart_ptr/shared_ptr.hpp:424: T* boost::shared_ptr<T>::operator->() const [with T = mongo::DBClientConnection]: Assertion `px != 0' failed.
Aborted (core dumped)
Any ideas as to what I am doing wrong, or could this be a bug with mongooplog?
Thanks,
Brett