-
Type: Bug
-
Resolution: Duplicate
-
Priority: Major - P3
-
None
-
Affects Version/s: 2.0.2, 2.0.4
-
Component/s: Internal Client, Replication, Security
-
Environment:Ubuntu, C++ driver
-
ALL
I don't have a reproducible test case, but this issue was seen in production with two different user/database combination two distinct times. We can not run with slave_ok in production because of it. Each time the issue persisted until slave_ok was removed as an option to query.
We are using the luamongo (https://github.com/moai/luamongo) driver which is a thin wrapper around the c++ driver. We never saw the issue when on mongodb 1.8, we first ran into the issue after updating to 2.0.2. Originally we thought it was because we were still using a lua driver compiled against the 1.8.X C++ driver but the issue continued after upgrading to the 2.0.2 version of the driver.
When a query is sent to a secondary this is the return:
[
{"code":10057,"$err":"unauthorized db:<db name> lock type:-1 client:50.18.245.77"}]
Any lua query, even basic one's like the following will generate the error:
local cursor = mongodb:query('mydb.datastore', '
{key:"value"}', nil, nil, nil, 4)
- is related to
-
SERVER-5405 mongos does not send reads to secondaries after replica restart when using keyFiles
- Closed