It was an network setup issue related to docker so we could not solve it. You need to make sure nodes/threads can communicate through network.
Paperspace solved this problem in their latest version by changing their networking setup.