Failed to execute the example run

Dear community!
I’ve sucessfully configured and installed Atomate. However, when I try to run a test calculation described here Installing atomate — atomate 1.0.3 documentation, in particular, when I run qlaunch rapidfire -m 1, an error occurs printed to FW.job-.error file:

Traceback (most recent call last):
  File "/home1/theory/fil/atomate/atomate_env/bin/rlaunch", line 8, in <module>
  File "/home1/theory/fil/atomate/atomate_env/lib/python3.9/site-packages/fireworks/scripts/", line 160, in rlaunch
  File "/home1/theory/fil/atomate/atomate_env/lib/python3.9/site-packages/fireworks/core/", line 106, in rapidfire
    while (skip_check or launchpad.run_exists(fworker)) and time_ok():
  File "/home1/theory/fil/atomate/atomate_env/lib/python3.9/site-packages/fireworks/core/", line 900, in run_exists
    return bool(self._get_a_fw_to_run(query=q, checkout=False))
  File "/home1/theory/fil/atomate/atomate_env/lib/python3.9/site-packages/fireworks/core/", line 1173, in _get_a_fw_to_run
    m_fw = self.fireworks.find_one(m_query, {"fw_id": 1, "spec": 1}, sort=sortby)
  File "/home1/theory/fil/atomate/atomate_env/lib/python3.9/site-packages/pymongo/", line 1459, in find_one
    for result in cursor.limit(-1):
  File "/home1/theory/fil/atomate/atomate_env/lib/python3.9/site-packages/pymongo/", line 1248, in next
    if len(self.__data) or self._refresh():
  File "/home1/theory/fil/atomate/atomate_env/lib/python3.9/site-packages/pymongo/", line 1139, in _refresh
    self.__session = self.__collection.database.client._ensure_session()
  File "/home1/theory/fil/atomate/atomate_env/lib/python3.9/site-packages/pymongo/", line 1740, in _ensure_session
    return self.__start_session(True, causal_consistency=False)
  File "/home1/theory/fil/atomate/atomate_env/lib/python3.9/site-packages/pymongo/", line 1685, in __start_session
  File "/home1/theory/fil/atomate/atomate_env/lib/python3.9/site-packages/pymongo/", line 538, in _check_implicit_session_support
  File "/home1/theory/fil/atomate/atomate_env/lib/python3.9/site-packages/pymongo/", line 554, in _check_session_support
  File "/home1/theory/fil/atomate/atomate_env/lib/python3.9/site-packages/pymongo/", line 238, in _select_servers_loop
    raise ServerSelectionTimeoutError(
pymongo.errors.ServerSelectionTimeoutError: localhost:27017: [Errno 111] Connection refused, Timeout: 30s, Topology Description: <TopologyDescription id: 63be813ab4bac8a04a1736e2, topology_type: Unknown, servers: [<ServerDescription ('localhost', 27017) server_type: Unknown, rtt: None, error=AutoReconnect('localhost:27017: [Errno 111] Connection refused')>]>

The status of the flow remains “ready”.
As I understand, there is a problem with connection to the Mongo database. However, I have configured everything regarding Mongo and the server indeed runs locally on the default 27017 port. Moreover, the test described on the above mentioned webpage (via x = VaspCalcDb.from_db_file(“db.json”) x.reset() ) also finishes successfully. Please advice me, what else can I check to understand the reason of the problem?

Hi Anton,

could you post your launchpad.yaml ?

Hi, Francesco,

port: 27017
name: atomate
username: admin
password: pass
ssl_ca_file: null
logdir: null
strm_lvl: INFO
user_indices: []
wf_user_indices: []

I also tried to change to localhost but it doesn’t change the things.

Hi Anton,
Usually, we put MongoDB in a supercomputer server, which you can easily check from a MongoDB GUI, such as Robo3T. Here are things you might want to try to solve your problem:

  1. Check your localhost connection status: whether the db (“atomate”) is running.
  2. Do export FW_CONFIG_FILE='/path_to_config/FW_config.yaml' before qlaunch
  3. If you installed atomate in a conda env, conda activate <your atomate env> first.
1 Like

Hi, Zhuoying,
Thank you for the tips. I’ve double checked, all the settings look OK, but the error remains. Now I’ve even checked that I can authorize the database from pymongo. The only doubt I have - is the code from …/atomate_env/lib/python3.9/site-packages/pymongo/, which causes the error, is run from the headnode of the cluster (where MongoDB is launched) or it can be called by the code from a node? In the latter case, could be the reason of the error that the database hosted on the headnode is not accesible from another node?