KNIME runs OK in windows desktop and fails when called from command line

I have a KNIME workflow that runs fine at the desktop. It calls a local workflow, which produces a report -it uses Call Local Workflow and Binary Object to File nodes.

When ran from Windows command line it fails and produces this output…


Knime

Java was started but returned exit code=4
-server
-Dsun.java2d.d3d=false
-Dosgi.classloader.lock=classname
-XX:+UnlockDiagnosticVMOptions
-XX:+UnsyncloadClass
-Dsun.net.client.defaultReadTimeout=0
-XX:CompileCommand=exclude,javax/swing/text/GlyphView,getBreakSpot
-Xmx4052m
-Dorg.eclipse.swt.browser.IEVersion=10001
-Dsun.awt.noerasebackground=true
-Dequinox.statechange.timeout=30000
-Djava.class.path=C:\Program Files\KNIME\plugins/org.eclipse.equinox.launcher_1.3.200.v20160318-1642.jar
-os win32
-ws win32
-arch x86_64
-launcher C:\Program Files\KNIME\knime.exe
-name Knime
–launcher.library C:\Program Files\KNIME\plugins/org.eclipse.equinox.launcher.win32.win32.x86_64_1.1.400.v20160518-1444\eclipse_1617.dll
-startup C:\Program Files\KNIME\plugins/org.eclipse.equinox.launcher_1.3.200.v20160318-1642.jar
–launcher.overrideVmargs
-consoleLog
-noexit
-application org.knime.product.KNIME_BATCH_APPLICATION
-workflowDir=d:/Users/b911712/knime-workspace/prueba_reporte1
-vm C:\Program Files\KNIME\plugins/org.knime.binary.jre.win32.x86_64_1.8.0.152-01/jre/bin\server\jvm.dll
-vmargs
-server
-Dsun.java2d.d3d=false
-Dosgi.classloader.lock=classname
-XX:+UnlockDiagnosticVMOptions
-XX:+UnsyncloadClass
-Dsun.net.client.defaultReadTimeout=0
-XX:CompileCommand=exclude,javax/swing/text/GlyphView,getBreakSpot
-Xmx4052m
-Dorg.eclipse.swt.browser.IEVersion=10001
-Dsun.awt.noerasebackground=true
-Dequinox.statechange.timeout=30000
-Djava.class.path=C:\Program Files\KNIME\plugins/org.eclipse.equinox.launcher_1.3.200.v20160318-1642.jar

Thanks in advance.

1 Like

What helped me for debugging was adding this as argument:

-data some/folder/here

This will produce a knime.log in the specified folder along with some other stuff. It should give you a better idea what went wrong.

kudos to this post

Sometimes opening the workflow in the desktop client, saving it, and closing it again also works (I think this sometimes clears saved warnings etc).

Also, if you want to see what the return codes (e.g. 4 in this case) mean, then try knime -consoleLog -noexit as a command without any workflow etc arguments. That lists all the KNIME arguments (-data is not there, as that is a standard Eclipse argument) and the return codes.

Also, sometimes adding the argument -launcher.suppressErrors helps - have a look at this StackOverflow post for some example commands

Steve

Thanks, but I’ve just obtained a zero length log.txt file.

Yes, my call is like this:

C:\Program Files\KNIME>"C:\Program Files\KNIME\knime.exe" -consoleLog -nosplash -noexit -application org.knime.product.KNIME_BATCH_APPLICATION -workflowDir=d:/Users/myuser/knime-workspace/report_caller

This produced the output from my original post. I think there is something related to outputting report results to file.

Regards

It may be something to do with how the Call Local Workflow node works (particularly how it finds and runs the second workflow) when you run it from the command line? Maybe one for someone from KNIME to pick up on

Steve

Definitely, I will create a more specific issue. Thanks.

1 Like

Hi @peleitor , have you found the solution for this ?