Run workflow from command line on CENTOS issue with SWT

I’ve developed a KNIME workflow that I want to run via the command line on a CentOS server. I downloaded the Linux version of KNIME 3.6.1 and extracted it. I then try to run the workflow with a command like:

/pathTo/knime -batch -reset -workflowFile=/path/workflowFile.knwf

And I’m getting an error like this:

!SESSION 2018-09-05 09:08:49.174 -----------------------------------------------
eclipse.buildId=unknown
java.version=1.8.0_152
java.vendor=Oracle Corporation
BootLoader constants: OS=linux, ARCH=x86_64, WS=gtk, NL=en_US
Framework arguments:  -batch -reset -workflowFile=/path/WorkflowFile.knwf -
Command-line arguments:  -os linux -ws gtk -arch x86_64 -batch -reset -workflowFile=/path/WorkflowFile.knwf 

!ENTRY org.eclipse.osgi 4 0 2018-09-05 09:09:00.499
!MESSAGE Application error
!STACK 1
java.lang.UnsatisfiedLinkError: Could not load SWT library. Reasons: 
	/pathToKnime/configuration/org.eclipse.osgi/315/0/.cp/libswt-pi3-gtk-4763.so: libgtk-3.so.0: cannot open shared object file: No such file or directory
	no swt-pi3-gtk in java.library.path
	Can't load library: /root/.swt/lib/linux/x86_64/libswt-pi3-gtk-4763.so
	Can't load library: /root/.swt/lib/linux/x86_64/libswt-pi3-gtk.so
	/root/.swt/lib/linux/x86_64/libswt-pi3-gtk-4763.so: libgtk-3.so.0: cannot open shared object file: No such file or directory

	at org.eclipse.swt.internal.Library.loadLibrary(Library.java:327)
	at org.eclipse.swt.internal.Library.loadLibrary(Library.java:236)
	at org.eclipse.swt.internal.gtk.OS.<clinit>(OS.java:58)
	at org.eclipse.swt.internal.Converter.wcsToMbcs(Converter.java:124)
	at org.eclipse.swt.internal.Converter.wcsToMbcs(Converter.java:80)
	at org.eclipse.swt.widgets.Display.<clinit>(Display.java:140)
	at org.eclipse.ui.internal.Workbench.createDisplay(Workbench.java:765)
	at org.eclipse.ui.PlatformUI.createDisplay(PlatformUI.java:160)
	at org.knime.product.rcp.KNIMEApplication.createDisplay(KNIMEApplication.java:200)
	at org.knime.product.rcp.KNIMEApplication.start(KNIMEApplication.java:103)
	at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:134)
	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:104)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:388)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:243)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:653)
	at org.eclipse.equinox.launcher.Main.basicRun(Main.java:590)
	at org.eclipse.equinox.launcher.Main.run(Main.java:1499)
	at org.eclipse.equinox.launcher.Main.main(Main.java:1472)

I’m not sure if I’ve missed a part of the set up process or not. Does anyone know what I’m doing wrong?

Thanks
David

You have the wrong command line. See https://www.knime.com/faq#q12.

1 Like

Dang, something as simple as RTFM! You were correct, when I used the correct command line it worked like a charm, thank you very much!