Connection refused (websocket, http)

Hi,
I'm having a problem establishing a websocket or even an http connection between ignition and my raspberry pi.
I keep getting this msg: Caused by: org.python.core.PyException: IOError: [Errno socket error] [Errno 10061] Connection refused
It worked like 2 days ago but for some reason it stopped after changing a few unrelated things in the project, now all I get is connection refused.
my http comm code:

my websocket code:

please let me know if you need more info

That is purely a network error. Something isn't listening on the expected port, or expected address, or is blocked by a firewall along the way.

Thanks for the reply Phil, I have the firewall disabled, and I also tested the code on my raspi with an esp8622.. they both communicate well, so my port/ address are both good I think.
The ignition was communicating but it stopped after some changes in the project as I mentioned.
Is there any other tips to troubleshoot this ?

Much appreciated.

Consider reverting those changes. Or share them with us.

Hello,
I am also getting error as "com.inductiveautomation.ignition.common.script.JythonExecException: Traceback (most recent call last): File "", line 19, in handleMessage File "C:\Program Files\Inductive Automation\Ignition\user-lib\pylib_socket.py", line 1443, in meth return getattr(self._sock,name)(*args) File "C:\Program Files\Inductive Automation\Ignition\user-lib\pylib_socket.py", line 936, in connect self._connect(addr) File "C:\Program Files\Inductive Automation\Ignition\user-lib\pylib_socket.py", line 912, in _connect self._handle_channel_future(self.connect_future, "connect") File "C:\Program Files\Inductive Automation\Ignition\user-lib\pylib_socket.py", line 385, in handle_exception raise _map_exception(jlx) _socket.error: [Errno 10061] Connection refused" Could you help me on this?

The target actively reject your attempt to connect. It isn't a problem on the Ignition side. (Though, you should not be using jython libraries for networking. Use java libraries, or system.net.httpClient(). Much more reliable and performant.)