-
Type: Bug
-
Resolution: Done
-
Priority: Major - P3
-
None
-
Affects Version/s: None
-
Component/s: MongoDB 3.2
-
Environment:macOS and ubuntu
-
Empty show more show less
I want to preface that I have been trying this not only with Mongoose, but with the direct driver. In both cases I seem to be getting the issue:
In my testing on this issue I've wiped out and reinstalled mongoose and any mongo folder as well. So I am currently using
mongodb@2.2.11
│ └── mongodb-core@2.0.13
└── mongoose@4.6.8
I am authorizing with an account which has dbOwner permissions.
I am doing a bulk insert of around 600 records by using
ModelName.insertMany( documentArray, function (err, results)
{...}I get the following error:
{
"name": "MongoError",
"message": "not authorized on appdb to execute command { insert: \"devices\", documents: 609, ordered: true, writeConcern:
}",
"ok": 0,
"errmsg": "not authorized on appdb to execute command { insert: \"devices\", documents: 609, ordered: true, writeConcern:
}",
"code": 13
}
However I have logged in both from my client and locally on the server and can perform db.devices.insertMany operations just fine, so it doesn't seem to be a permissions issue.
I've been looking for a solution for hours and can find none.