Error 13141 in mongos shell while trying to write to a result of the mapReduce invocation to a sharded collection
As at MongoDB 3.2, the only supported key for a sharded output collection for Map/Reduce is the _id field (non-hashed).

There are known issues with Map/Reduce output to a sharded collection using a hashed shard index; the two features don't play well together yet and this isn't a supported combination. The documentation currently only suggests that _id can be used, however there could be an explicit note that hashed indexes are not supported yet.

There's a relevant Jira which you can watch/upvote: SERVER-16605: Mapreduce into sharded collection with hashed index fails.


  What can be the cause of this error?


I believe your specific chunk map error is likely due to the hashed index and sharded Map/Reduce both assuming they should create the initial chunks for an empty collection.

When you create a Shard a Collection Using a Hashed Shard Key:


  If you shard an empty collection using a hashed shard key, MongoDB automatically creates and migrates empty chunks so that each shard has two chunks. To control how many chunks MongoDB creates when sharding the collection, use shardCollection with the numInitialChunks parameter.


With a Sharded Collection as Output, Map/Reduce also tries to create the initial chunks:


  For a new or an empty sharded collection, MongoDB uses the results of the first stage of the map-reduce operation to create the initial chunks distributed among the shards.