Error setting up XML-RPC Communication

Hello,
I am using UR5e robot. I am following the instructions mentioned here: XML-RPC communication - 16326 (universal-robots.com) to understand XML-RPC communication using python.
However, everytime I run the script from the Teach-Pendant, the following error comes up.
XMLRPC: Failed with Exception: Unable to transport XML to server and get XML response back. libcurl failed to execute the HTTP Post transaction, explaining: Failed to connect to 192.168.5.2 port 50000. Connection timed out.

This error comes up the the line new_pos = target_src.get_next_pose(). I have removed the parameter being passed on both sides.

Am i missing something here?

Regards,
Shrey

I have the same problem when running the script on real robot. I double checked the IP given to the rpcfactory command, i can ping the robot from my pc.
When i run both the client and server on UR sim it works.

Edit - in my case it was surprisingly the solution that is always given as first suggestion but never works :smiley: the firewall