mongooplog failing with unauthorized error

194 views
Skip to first unread message

Brett Cave

unread,
Jul 1, 2014, 6:37:42 AM7/1/14
to mongod...@googlegroups.com
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

Asya Kamsky

unread,
Jul 1, 2014, 10:51:02 PM7/1/14
to mongodb-user
It might be a bug - take a look at https://jira.mongodb.org/browse/SERVER-6153 or rather all the duplicates and dependencies of it, and see if that matches your symptoms.  

Depending on what you are trying to do, you may be able to write a script in your language of choice to do what mongooplog is supposed to do...

Asya



--
You received this message because you are subscribed to the Google Groups "mongodb-user"
group.
 
For other MongoDB technical support options, see: http://www.mongodb.org/about/support/.
---
You received this message because you are subscribed to the Google Groups "mongodb-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mongodb-user...@googlegroups.com.
To post to this group, send email to mongod...@googlegroups.com.
Visit this group at http://groups.google.com/group/mongodb-user.
To view this discussion on the web visit https://groups.google.com/d/msgid/mongodb-user/cfc3e64c-e1cb-4859-b0c3-bbd937908fc6%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages