If mongodb is set up to use authorization, I cannot initialize the superdesk server data.
Steps to replicate:
1. Setup mongodb to use auth. Restart mongodb.
2. Connect to mongo, use admin database, create user with root permissions (obviously lower is preferred, but for this test "root" still causes the error, and when testing it's easiest to use the highest level of auth to ensure it's not mongo roles that's causing the problem)
use admin
db.createUser(
{
user: "superdeskadmin",
pwd: "MyPass12345",
roles:
[
"root"
]
}
)
3. cd $path/server
4. vi settings.py, then add the following lines to the end of the file:
pymongo.errors.OperationFailure: not authorized on contentapi to execute command { createIndexes: "api_audit", indexes: [ { key: { subscriber: 1 }, name: "subscriber", background: true } ] }
6. On the exact same server, turn off auth for mongodb, restart mongo. Everything works fine.
Is this just me and something tweaky in my setup (currently Amazon Lightsail's pre-installed Bitnami Mean)? Has anyone else gotten mongodb and superdesk server initialization working with auth turned on in mongo?
*edit - missing parenthesis added
Post edited by James Brabson at 2017-08-21 19:32:07