Hello all,
i am new to atomate and i am trying to setup atomate on my cluster
im using atomate 0.9.4 and python 3.7
i have signed up for MongoDB atlas
and i have entered everything correct into db.json according to what mentioned on the atomate website
{
“host”: “mongodb+srv://cluster0-ipsds.mongodb.net/test?retryWrites=true&w=majority”,
“port”: 27017,
“database”: “mongotest”,
“collection”: “tasks”,
“admin_user”: “myadmin_name”,
“admin_password”: “xxxxxxxx”,
“readonly_user”: “myread_username”,
“readonly_password”: “xxxxxx”,
“authsource”: “mongotest”,
“aliases”: {}
}
and ran the following python script
from atomate.vasp.database import VaspCalcDb
x = VaspCalcDb.from_db_file(“db.json”)
x.reset()
print(“SUCCESS”)
and got following error
Traceback (most recent call last):
File “test.py”, line 3, in
x = VaspCalcDb.from_db_file(“db.json”)
File “/scratch/hpc-prf-wcat/kuchana/atomate_dev/codes/atomate/atomate/utils/database.py”, line 135, in from_db_file
user, password, **kwargs)
File “/scratch/hpc-prf-wcat/kuchana/atomate_dev/codes/atomate/atomate/vasp/database.py”, line 37, in init
password, **kwargs)
File “/scratch/hpc-prf-wcat/kuchana/atomate_dev/codes/atomate/atomate/utils/database.py”, line 51, in init
if self.db.counter.find({"_id": “taskid”}).count() == 0:
File “/scratch/hpc-prf-wcat/kuchana/atomate_dev/atomate_env_dev/lib/python3.7/site-packages/pymongo/cursor.py”, line 787, in count
cmd, self.__collation, session=self.__session)
File “/scratch/hpc-prf-wcat/kuchana/atomate_dev/atomate_env_dev/lib/python3.7/site-packages/pymongo/collection.py”, line 1600, in _count
_cmd, self._read_preference_for(session), session)
File “/scratch/hpc-prf-wcat/kuchana/atomate_dev/atomate_env_dev/lib/python3.7/site-packages/pymongo/mongo_client.py”, line 1458, in _retryable_read
exhaust=exhaust) as (sock_info,
File “/cm/shared/apps/pc2/EB-SW/software/lang/Python/3.7.0-foss-2018b/lib/python3.7/contextlib.py”, line 112, in enter
return next(self.gen)
File “/scratch/hpc-prf-wcat/kuchana/atomate_dev/atomate_env_dev/lib/python3.7/site-packages/pymongo/mongo_client.py”, line 1282, in _slaveok_for_server
with self._get_socket(server, session, exhaust=exhaust) as sock_info:
File “/cm/shared/apps/pc2/EB-SW/software/lang/Python/3.7.0-foss-2018b/lib/python3.7/contextlib.py”, line 112, in enter
return next(self.gen)
File “/scratch/hpc-prf-wcat/kuchana/atomate_dev/atomate_env_dev/lib/python3.7/site-packages/pymongo/mongo_client.py”, line 1222, in _get_socket
self.__all_credentials, checkout=exhaust) as sock_info:
File “/cm/shared/apps/pc2/EB-SW/software/lang/Python/3.7.0-foss-2018b/lib/python3.7/contextlib.py”, line 112, in enter
return next(self.gen)
File “/scratch/hpc-prf-wcat/kuchana/atomate_dev/atomate_env_dev/lib/python3.7/site-packages/pymongo/pool.py”, line 1138, in get_socket
sock_info.check_auth(all_credentials)
File “/scratch/hpc-prf-wcat/kuchana/atomate_dev/atomate_env_dev/lib/python3.7/site-packages/pymongo/pool.py”, line 712, in check_auth
auth.authenticate(credentials, self)
File “/scratch/hpc-prf-wcat/kuchana/atomate_dev/atomate_env_dev/lib/python3.7/site-packages/pymongo/auth.py”, line 564, in authenticate
auth_func(credentials, sock_info)
File “/scratch/hpc-prf-wcat/kuchana/atomate_dev/atomate_env_dev/lib/python3.7/site-packages/pymongo/auth.py”, line 539, in _authenticate_default
return _authenticate_scram(credentials, sock_info, ‘SCRAM-SHA-1’)
File “/scratch/hpc-prf-wcat/kuchana/atomate_dev/atomate_env_dev/lib/python3.7/site-packages/pymongo/auth.py”, line 263, in _authenticate_scram
res = sock_info.command(source, cmd)
File “/scratch/hpc-prf-wcat/kuchana/atomate_dev/atomate_env_dev/lib/python3.7/site-packages/pymongo/pool.py”, line 613, in command
user_fields=user_fields)
File “/scratch/hpc-prf-wcat/kuchana/atomate_dev/atomate_env_dev/lib/python3.7/site-packages/pymongo/network.py”, line 167, in command
parse_write_concern_error=parse_write_concern_error)
File “/scratch/hpc-prf-wcat/kuchana/atomate_dev/atomate_env_dev/lib/python3.7/site-packages/pymongo/helpers.py”, line 159, in _check_command_response
raise OperationFailure(msg % errmsg, code, response)
pymongo.errors.OperationFailure: Authentication failed.
i have also tried with and without authsource
and also tried with editing host uris
for example
“host”: “mongodb+srv://admin:@cluster0-ipsds.mongodb.net/test?retryWrites=true&w=majority”,
“host”: “mongodb+srv://cluster0-ipsds.mongodb.net/test?retryWrites=true&w=majority”,
“host”: “mongodb+srv://@cluster0-ipsds.mongodb.net/”,
but still ,i am getting the same error
NOTE: i could successfully connect to my database and insert data …i have used following script
import pymongo
import dns
client = pymongo.MongoClient(“mongodb+srv://myadmin_name:[email protected]/test?retryWrites=true&w=majority”)
db = client.mongo
db.inventory.insert_one(
{“item”: “canvas”,
“qty”: 100,
“tags”: [“cotton”],
“size”: {“h”: 28, “w”: 35.5, “uom”: “cm”}})