Hello Anubhav,
I am trying to connect to MongoDB atlas through fireworks. The error is below.
My Fireworks is version 1.8.7.
Please let me know if there is any other information that I can provide that would help.
C:\Users\athre\Miniconda3\Lib\site-packages\fw_tutorials\introduction>lpad reset
Traceback (most recent call last):
File “c:\users\athre\miniconda3\lib\runpy.py”, line 193, in _run_module_as_main
“main”, mod_spec)
File “c:\users\athre\miniconda3\lib\runpy.py”, line 85, in _run_code
exec(code, run_globals)
File “C:\Users\athre\Miniconda3\Scripts\lpad.exe_main_.py”, line 9, in
File “c:\users\athre\miniconda3\lib\site-packages\fireworks\scripts\lpad_run.py”, line 1146, in lpad
args.func(args)
File “c:\users\athre\miniconda3\lib\site-packages\fireworks\scripts\lpad_run.py”, line 148, in reset
lp.workflows.count()))[0].upper() == ‘Y’:
File “c:\users\athre\miniconda3\lib\site-packages\pymongo\collection.py”, line 1766, in count
return self._count(cmd, collation, session)
File “c:\users\athre\miniconda3\lib\site-packages\pymongo\collection.py”, line 1563, in _count
with self._socket_for_reads(session) as (sock_info, slave_ok):
File “c:\users\athre\miniconda3\lib\contextlib.py”, line 112, in enter
return next(self.gen)
File “c:\users\athre\miniconda3\lib\site-packages\pymongo\mongo_client.py”, line 1099, in _socket_for_reads
server = topology.select_server(read_preference)
File “c:\users\athre\miniconda3\lib\site-packages\pymongo\topology.py”, line 224, in select_server
address))
File “c:\users\athre\miniconda3\lib\site-packages\pymongo\topology.py”, line 183, in select_servers
selector, server_timeout, address)
File “c:\users\athre\miniconda3\lib\site-packages\pymongo\topology.py”, line 199, in _select_servers_loop
self._error_message(selector))
pymongo.errors.ServerSelectionTimeoutError: connection closed,connection closed,connection closed
Thanks,
Athreya Ramesh
···
On Tuesday, February 12, 2019 at 3:38:15 PM UTC-5, Zoe Zhu wrote:
Hi,
I have been trying to set up the MongoDB atlas database for fireworks.
My launchpad looks like the following:
host: mongodb+srv://cluster0-b05rv.mongodb.net/test
port: 27017
name: test
username: admin
password: <>
logdir: null
ssl: false
strm_lvl: INFO
user_indices: []
wf_user_indices: []
However, I have been getting the following error when I run lpad reset:
ValueError: FireWorks was not able to connect to MongoDB. Is the server running? The database file specified was /n/home02/zzhu/atomate/config/my_launchpad.yaml.
It only connects if I change the fire /fireworks/core/.launchpad.py around line 149 to the following:
get connection
#self.connection = MongoClient(host, port, ssl=self.ssl,
# username=username,password=password,
# ssl_ca_certs=self.ssl_ca_certs, ssl_certfile=self.ssl_certfile,
# ssl_keyfile=self.ssl_keyfile, ssl_pem_passphrase=self.ssl_pem_passphrase,
# socketTimeoutMS=MONGO_SOCKET_TIMEOUT_MS, connect=False)
#self.db = self.connection[name]
#if username:
# self.db.authenticate(username, password, source=self.authsource)
self.connection = MongoClient(host, port, username=username, password=password)
self.db = self.connection[name]
The db.authenticate function always gives me trouble.
I wonder if this is a known issue and if there’s any solution to this?
Thanks,
Zoe Zhu