MongoDB Java Driver v2.9.0
MongoDB v2.2.0 (running as a Replica Set)
We were trying to upgrade MongoDB to v2.2.0 from v2.0.3, after upgraded the
java driver to v2.9.0 . We found that our MapReduce task (which takes input
from a collection in someAppName-TESTING DB, and outputs to a temp
collection in someAppName_temp DB) started to fail due to
unauthorization issue:
Mon Sep 10 07:30:08 [conn391] authenticate db: someAppName-TESTING {
authenticate: 1, user: "someUsername", nonce: "a26a0d7e6b8089b3", key:
"someKey" }
Mon Sep 10 07:30:09 [conn391] mr failed, removing collection :: caused by
:: 10057 unauthorized db:someAppName_temp ns:
someAppName _temp.tmp.mr.resultsCollection_63_inc lock type:1 client:
someIPAddress
I found that there is a checkAuth(DB db) method on the DBPort class, and I
realized that the MongoDB driver might has a bug that it won't check for
authentication of the Output db for MapReduce. Is there anything I can do
to ensure that the output db is authenticated before performing a
MapReduce? Thank you.