Permissions Bug: External Tool (Labs) in Batch Mode

I have a folder full of shell scripts within my workflow directory that I run with the External Tool (Labs) node. When I attempt to run this workflow in batch mode, the workflow is copied to a temp directory, and [my suspision is] the scripts lose their executable permissions along the way. The result is:

ERROR     KNIME-Worker-24 External Tool (Labs)     Execute failed: Failed with exit code 126



Hi Coleman,

can you send us your knime log file? It's located in the workspace under ".metadata/knime/knime.log". It should print the full command line in there.



The file seems to be corrupt. I can download it and when I view it (using /usr/bin/less) I get:

^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@2016-02-16 14:04:29,040 : DEBUG : main : WorkflowRootEditPart :  :  : WorkflowRootEditPart deactivated
2016-02-16 14:04:29,041 : DEBUG : main : WorkflowEditor :  :  : Disposing editor...
2016-02-16 14:04:29,041 : DEBUG : main : ProjectWorkflowMap :  :  : unregistering org.knime.workbench.editor2.WorkflowEditor@61ad9bfb from file:/Users/colemanbroaddus/Desktop/Projects/PhD/workspace/MS-ECS-2D_2.1_build3_headless/. 0 left.

Actually, I don't think this log file will help much as it's from your standard KNIME session (with the UI), where this is known to work.

What happens when you run your batch job with the additional argument:

-data /Users/colemanbroaddus/Desktop/Projects/PhD/workspace/

Can you then reproduce the problem? If so, can you clear the log file and then reproduce and send that file?

- Bernd

OK, I've cleared the log file, and reproduced the problem.

Are you pointing the batch executor to an exported zip file or to workflow directory itself? If it's the former ... how did you create the zip file? Assuming this was using the "Export" function in KNIME my next question would be whether you have set the checkbox to include the data?

- Bernd

Here's the error: Cannot run program "/private/var/folders/pq/0mxx39j5749bk43qxbd0d_g00000gn/T/BatchExecutorInput80663/MS-ECS-2D_2.1_build3_headless/Prediction (#43)/Java Edit Variable _simple_ (#3)/drop/../../../ExternalToolRoot/" (in directory "/var/folders/pq/0mxx39j5749bk43qxbd0d_g00000gn/T/bash_RF_Cascade_PREDICT_20160217_84892/input"): error=2, No such file or directory


I've tried all of the above :) I seem to get the furthest when I export from KNIME and set the checkbox to include data. Without including the data the ExternalToolRoot dir is not even included. With the checkbox set the dir is included, but I don't have the permissions to execute the scripts after the workflow has been copied to tmp dir. If I simply unzip the exported workflow (without trying to run it in batch mode) and look at the permissions they are still fine.


It's possible that the java unzip routines don't retain file permissions. Bundling an executable as part of the workflow is also not quite the standard case. Maybe you can just keep the workflow as a folder and use that instead of a zip export?

OK, let's try that. How do i select the workflow? Just giving the folder name to the batch run command results in an error.

here is a full list of available parameters:


Launcher argument '--launcher.library' ignored

Usage: The following options are available:

 -nosave           => do not save the workflow after execution has finished

 -reset            => reset workflow prior to execution

 -failonloaderror  => don't execute if there are errors during workflow loading

 -updateLinks      => update meta node links to latest version

 -credential=name[;login[;password]] => for each credential enter credential

                      name and optional login/password, otherwise its prompted for

 -masterkey[=...]  => prompt for master password (used in e.g. database nodes),

                      if provided with argument, use argument instead of prompting

 -preferences=...  => path to the file containing eclipse/knime preferences,

 -workflowFile=... => ZIP file with a ready-to-execute workflow in the root 

                      of the ZIP

 -workflowDir=...  => directory with a ready-to-execute workflow

 -destFile=...     => ZIP file where the executed workflow should be written to

                      if omitted the workflow is only saved in place

 -destDir=...      => directory where the executed workflow is saved to

                      if omitted the workflow is only saved in place

 -workflow.variable=name,value,type => define or overwrite workflow variable

                      'name' with value 'value' (possibly enclosed by quotes). The

                      'type' must be one of "String", "int" or "double".

OK, wonderful. The workflow ran successfully when referenced with -workflowDir.

Thanks a lot!