Running Rocketsled in Compute Node | HPC

I am planning on running Rocketsled by submitting a SLURM job in HPC. When I run it in login node in HPC, everything works fine.

However, when the job is submitted to the queue, I get MongoDB error. My speculation is that this could be the fact that login node can access the external MongoDB server, while compute nodes are more restricted.

I get the following error:

pymongo.errors.ServerSelectionTImeoutError: localhost: 27017: [Errno 111] Connection refused.

I found the following tutorial, to run Fireworks offline, and let compute node do the communication, however, doing it that way would require me to change lots of code.

Is there already an implementation pertaining to running Rocketsled that way which I can adapt?