Db.json: Authentication failed

I have tried a lot and read many issues in this forum, but could not find any solution for me.

  1. I am trying to read my vasprun.xml files and analyze them.
    my db.json file looks so:

“host”: “localhost”,
“port”: 27017,
“database”: “vasp”,
“collection”: “tasks”,
“admin_user”: “admin_user”,
“admin_password”: “admin_user”,
“readonly_user”: “readonly_user”,
“readonly_password”: “readonly_user”,
“aliases”: {},

I have tried to remove the parameter “authsource” and other variants, but is still giving me this error back: pymongo.errors.OperationFailure: Authentication failed.

  1. If I am using mongo without authentication(means: remove the last lines) it works and creates the db (visible in mongodb)
  2. If I am using not the atomate , but firework it works also, code listing:
    for path in paths:

launchpad = LaunchPad()
launchpad.reset(’’, require_password=False)

fw = Firework(tasks)
wf = Workflow([fw], name=“test workflow”)

Could you help me? My approaches are unfortunately over.

Thank you in advance.

Best regards,

Should I wait for a reply. Or just leave the idea? Please, write shortly if it is not worth of waiting, I will understand. Or just you could recommend me something in the direction: reading vasprun.xml files for future working with data and maybe creating descriptors for machine learning approaches. Maybe just keywords and search direction.

I‘ll be grateful.

Best regards,

hello yayapa,

you can check the post named

Unable to connect to MongoDB via db.json

here is the link

this is similar to what you asked

Before I wrote an issue here, I checked this entry in the forum. Unfortunately, it has not solved my problem, as you wrote above. Is there any other solutions?

The solution for local server was assigning dbOwner role instead of dbAdmin (https://docs.mongodb.com/v3.6/reference/built-in-roles/index.html#dbOwner).
With the remote server was it not necessary. The strange problem with MongoDB…