Error while trying to execute python in knime 3.5 version with keras extension

Hi I'm trying to execute on mac machine this example workflow with path: 04_Analytics/14_Deep_Learning/02_Keras/04_Cats_and_Dogs/02_Train_simple_CNN

So, basically I have installed python 3.5 with all Keras requirements with:

conda create -y -n py35_knime python=3.5 pandas jedi keras

I have also activated that environment. After that I have put the exec path for python 3.5 environment in preferences > KNIME > python, and set as "default".

So, after successfully execute the previous workflow "preprocessing images" I encounter several errors in this one when I execute the first node DL Python Network Creator:

ERROR PythonKernel                    socket.gaierror: [Errno 8] nodename nor servname provided, or not known

ERROR DL Python Network Creator 0:222      Execute failed: Could not start python kernel. Cause: The connection attempt timed out. Please consider increasing the socket timeout using the VM option '-Dknime.python.connecttimeout=<value-in-ms>'.

Any suggestions?.. I'm just trying to execute the workflow in the current state.

I have attached the error_log file.

Thanks in advance.

Hi Gujo,

there seems to be a communication problem between KNIME and the Python process where Keras is run.

Could you have a look at the host file of your computer - you can find it under /etc/hosts - and check if there's an entry "127.0.0.1    localhost" or the like?

You can navigate to the file using Finder (or by looking for "/etc" in Spotlight Search) and then open it using Text Edit.

If you're comfortable with the terminal, you can also simply open up a terminal window and type in 

cat /etc/hosts

which will list the contents of the host file.

Marcel

Hi Marcel,

this is what the hosts file contains:

##
# Host Database
#
# localhost is used to configure the loopback interface
# when the system is booting.  Do not change this entry.
##
127.0.0.1    localhost
255.255.255.255    broadcasthost
::1             localhost

 

Can anyone give me any other suggestions?

Thanks.

Hi Gujo,

I think the localhost related entries of your hosts file look alright.

What version of macOS are you running?

I'm running macOS Sierra 10.12.4

Finally I solved the problem!

I have changed the /etc/hosts file like that:

127.0.0.1    localhost 255.255.255.255    broadcasthost

::1 localhost

fe80::1%lo0    localhost

And for some reasons everything went fine, I don't know exactly why.

-Giulio

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.