Unable to connect to Python Server using Scripting

Hi.

I wish to run some Python code remotely from my local KNIME. I have set up my Python Server using the instruction.

After configuring host and port in File-> Preferences -> KNIME -> Python Scripting and unchecking Run python scripts on local system (ignores host/port setting) I get the following error when trying to run Python Snippet:

ERROR Python Snippet 0:28 Execute failed: java.lang.IllegalArgumentException: Connection refused to host: 127.0.1.1; nested exception is:
java.net.ConnectException: Connection refused: connect

The strange thing is the local IP in the error.
However, when I try to connect to a wrong port or port unavailable because of firewall I get different Error:

ERROR Python Snippet 0:28 Execute failed: java.rmi.ConnectException: Connection refused to host: zzz.zzz.179.183; nested exception is:
java.net.ConnectException: Connection timed out: connect

That’s why I believe that KNIME manages to connect to remote server but not fully. Do you have any idea what may be blocking me?

Hey @maciasza,

Are you able to execute Python scripts on that server at all?
Did you already googled the different error messages?
Is there a log at the Python server and if so what does it say?

My suggestion is that you test above mentioned aspects so you know,
if the server is executing Python scripts at all;
what the error messages are pointing to;
what the python server did when accessing.

These answers would get as a better insight and enables us to help you much better.

Kind regards,

Patrick

Hi,

thank you for you help!

Are you able to execute Python scripts on that server at all?
Is there a log at the Python server and if so what does it say?

I don’t know how to execute Python scripts on that server. Also, I don’t know how to access log files.
This site is all I know about that Python server. I haven’t seen any documentation. Are you aware of any documentation?

Did you already googled the different error messages?

Yes, I have found this, but unfortunately it was note very helpful.

Best regards,
Adam

Hey @maciasza,

that makes it very difficult to analyse your situation. Unless you manage to run Python scripts on the server not using KNIME it’s unclear if there is an error server side or KNIME side.

To honor truth, I never used Python nor set up a Python server; however, a systematical approach on IT problem always served me well. So I repeat my advise to you to make sure the server is set up properly and Python scripts do run on it in general.

Kind regards,

Patrick