[SERVER-7641] Error running MapReduce, which writes result to another db with authorization. Created: 13/Nov/12 Updated: 11/Jul/16 Resolved: 19/Jan/13 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | MapReduce |
| Affects Version/s: | 2.2.1 |
| Fix Version/s: | 2.4.0-rc0 |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Pavel Chertorogov | Assignee: | Daniel Pasette (Inactive) |
| Resolution: | Done | Votes: | 0 |
| Labels: | Authenticate, MapReduce | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Attachments: |
|
| Backwards Compatibility: | Fully Compatible |
| Participants: |
| Description |
|
Have problem when try run MapReduce, which writes result to another db. Both db have authorization. MR out section:
Fails with error: MR parallel processing failed: ", code: 15921, ok: 0.0 } How I must login with MapReduce task? ? |
| Comments |
| Comment by auto [ 19/Jan/13 ] | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Author: {u'date': u'2013-01-13T10:52:44Z', u'email': u'dan@10gen.com', u'name': u'Dan Pasette'}Message: | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Daniel Pasette (Inactive) [ 14/Jan/13 ] | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
This is fixed in 2.3.2. Attaching a single jstest which doesn't require outside setup. I took the test a bit further and tested some expected failure cases as well. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by sam.helman@10gen.com [ 15/Nov/12 ] | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Attached files to reproduce. Started setup without auth, ran repro_setup_auth.js to create the appropriate users, then restarted cluster with auth and ran repro_mapreduce.js to reproduce issue. The mapreduce call is a simplified version of the ticket reporter's, but does the same important thing (uses different dbs for input and output). The same error is produced. By experimentation, the "sharded:true" field in the "out" object seems to be the cause of the error. Setup: mongos running locally on 27107, 3 config servers and 2 standalone mongods as shards all running on another machine. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Pavel Chertorogov [ 14/Nov/12 ] | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
In shell same problem. MongoDB shell version: 2.2.1
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Pavel Chertorogov [ 13/Nov/12 ] | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Hello. In one Mongo Cluster (2-shards in replica-sets all v2.2.1). Source collection data evenly distributed via this two shards. MapReduce writes results with merge option to another sharded database to existed collection. This DBs have same username and password, but it is different users (as mongo designed). I use PHP 5.3.6 with MongoDriver v1.2.1 to run this MR tasks. I tried many variations to log in two this databases via $MongoDB->authenticate() and $MongoDB->command(). Tomorrow I run this MR in shell with logging in to both databases via db.auth() and write additional comment. Thanks. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by sam.helman@10gen.com [ 13/Nov/12 ] | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Hello, Have you tried logging in to both databases via db.auth() before you run the MapReduce command? Additionally, which driver are you using? Are you running these commands from the shell? |