Just for completeness, I rebooted but it did not have any effect. I tried setting the PATH variable in Knime but it failed with Execute failed: Cannot execute command
as well.
I think the only two options left at present are to:
- Create a shell script, which could get done via Knime, and make it executable OR
- Using Java to make bash calls like in Shell Command in knime
While attempting the two options I encountered an issue with approach #1. I can’t make the shell script executable. Setting POSIX permission fails.
With approach #2 I noticed a possible cause of the command not found. Using the Bash Node to get all env variables it gave back a PATH variable. However, using the Java Snipped the PATH variable was not found. Could it be that the PATH variable is not properly setup / defined and Knime respectively Eclipse falls back to a default?
I put all bits and pieces in this workflow together:
NOTE: There is a mistake with the Java Snippet which I noticed only after upload. Will update the workflow once resolved.
There are a few additional interesting findings as well. Using the whereis YOUR-CMD
command to locate the executable the commands which do NOT work still could be found. The where YOUR-CMD
(without “is”) command also works in the terminal but not in Knime.
where and whereis CMD in Terminal
where and whereis CMD in Knime
Since not everyone uses OS X, even though it’s linux, in case anyone wants to debug something, we could arrange a remote debugging session.
Best
Mike