Knime server functioning normally in standard execution mode fails in per-user execution mode with RMI error that shows:
!SESSION 2019-02-13 08:53:24.228 -----------------------------------------------
eclipse.buildId=unknown
java.version=1.8.0_191
java.vendor=Oracle Corporation
BootLoader constants: OS=linux, ARCH=x86_64, WS=gtk, NL=en_US
Command-line arguments: -os linux -ws gtk -arch x86_64
!ENTRY org.eclipse.osgi 4 0 2019-02-13 08:53:25.145
!MESSAGE Application error
!STACK 1
org.eclipse.swt.SWTError: No more handles [gtk_init_check() failed]
at org.eclipse.swt.SWT.error(SWT.java:4559)
at org.eclipse.swt.widgets.Display.createDisplay(Display.java:955)
at org.eclipse.swt.widgets.Display.create(Display.java:942)
at org.eclipse.swt.graphics.Device.<init>(Device.java:174)
at org.eclipse.swt.widgets.Display.<init>(Display.java:566)
at org.eclipse.swt.widgets.Display.<init>(Display.java:557)
at org.eclipse.ui.internal.Workbench.createDisplay(Workbench.java:781)
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)
In the RMI log…in the tomcat localhost log I see:
13-Feb-2019 10:24:07.724 WARNING [KNIME-RMI-syserr-<xxxxxxx>-50101] com.knime.enterprise.server.executor.rmi.ProcessOutputConsumer.logOutput Knime: Cannot open display:
13-Feb-2019 10:24:09.122 WARNING [KNIME-RMI-syserr-<xxxxxxx>-50101] com.knime.enterprise.server.executor.rmi.ProcessOutputConsumer.logOutput Knime:
13-Feb-2019 10:24:09.122 WARNING [KNIME-RMI-syserr-<xxxxxxx>-50101] com.knime.enterprise.server.executor.rmi.ProcessOutputConsumer.logOutput An error has occurred. See the log file
13-Feb-2019 10:24:09.122 WARNING [KNIME-RMI-syserr-<xxxxxxx>-50101] com.knime.enterprise.server.executor.rmi.ProcessOutputConsumer.logOutput /ddn/gs1/home/xxxxxxx/.eclipse/1504701571_linux_gtk_x86_64/configuration/1550071447794.log.
13-Feb-2019 10:24:09.504 WARNING [http-nio-8080-exec-7] com.knime.enterprise.server.executor.rmi.RMIExecutorImpl.startSlave The RMI process terminated unexpectedly with exit code 13
13-Feb-2019 10:24:09.504 SEVERE [http-nio-8080-exec-7] com.knime.enterprise.server.executor.rmi.RMIExecutorImpl.reportStartupError RMI executor could not be started. Command executed:
/usr/bin/sudo -u xxxxxxx /opt/knime/knime_server/knime_executor/knime --launcher.suppressErrors --launcher.ini /opt/knime/knime_server/workflow_repository/runtime/runtime_knime-rmi_xxxxxxx-50101/knime-rmi.ini
Last 4 lines of log output follow:
Knime: Cannot open display:
Knime:
An error has occurred. See the log file
/ddn/gs1/home/xxxxxxx/.eclipse/1504701571_linux_gtk_x86_64/configuration/1550071447794.log.
Also check log file in /opt/knime/knime_server/knime_executor/configuration
13-Feb-2019 10:24:09.505 SEVERE [http-nio-8080-exec-7] com.knime.enterprise.webportal.components.wkfpanels.WorkflowJobInputFirstPagePanel.attach Failed to load quick form input: RMI executor could not be started, see log file for details
com.knime.enterprise.utility.ExecutorException: RMI executor could not be started, see log file for details
at com.knime.enterprise.server.executor.rmi.RMIExecutorImpl.reportStartupError(RMIExecutorImpl.java:420)
at com.knime.enterprise.server.executor.rmi.RMIExecutorImpl.startSlave(RMIExecutorImpl.java:364)
at com.knime.enterprise.server.executor.rmi.RMIExecutorImpl.<init>(RMIExecutorImpl.java:224)
at com.knime.enterprise.server.executor.rmi.RMIExecutorManagerImpl.startNewRMI(RMIExecutorManagerImpl.java:307)
at com.knime.enterprise.server.executor.rmi.RMIExecutorManagerImpl.getExecutorInstance(RMIExecutorManagerImpl.java:384)
at com.knime.enterprise.server.executor.rmi.RMIExecutorManagerImpl.getExecutorInstance(RMIExecutorManagerImpl.java:63)
at com.knime.enterprise.webportal.presenters.ExecutionHandler.checkExecutor(ExecutionHandler.java:167)
at com.knime.enterprise.webportal.presenters.ExecutionHandler.<init>(ExecutionHandler.java:129)
If I just remove this:
com.knime.server.executor.sudo_cmd=/usr/bin/sudo
It goes back into the standard exec mode and works fine (under the knime user)
I tried various things like setting DISPLAY in the environment of this xxxx target user and turning on X11 Forwarding, etc. I have ended up pretty stumped. Anyone else seen this? It might be some X11 Fu that is beyond my skill set.
-bash-4.2$ whoami
knime
-bash-4.2$ /usr/bin/sudo -u xxxxxxx /opt/knime/knime_server/knime_executor/knime --launcher.suppressErrors --launcher.ini /opt/knime/knime_server/workflow_repository/runtime/runtime_knime-rmi_xxxxxx-50101/knime-rmi.ini
Knime: Cannot open display:
Knime:
An error has occurred. See the log file
/ddn/gs1/home/xxxxx/.eclipse/1504701571_linux_gtk_x86_64/configuration/1550168755390.log.
-bash-4.2$
dumping the log referred to above…
!SESSION 2019-02-14 13:25:55.267 -----------------------------------------------
eclipse.buildId=unknown
java.version=1.8.0_191
java.vendor=Oracle Corporation
BootLoader constants: OS=linux, ARCH=x86_64, WS=gtk, NL=en_US
Command-line arguments: -os linux -ws gtk -arch x86_64
!ENTRY org.eclipse.osgi 4 0 2019-02-14 13:25:56.356
!MESSAGE Application error
!STACK 1
org.eclipse.swt.SWTError: No more handles [gtk_init_check() failed]
at org.eclipse.swt.SWT.error(SWT.java:4559)
at org.eclipse.swt.widgets.Display.createDisplay(Display.java:955)
at org.eclipse.swt.widgets.Display.create(Display.java:942)
at org.eclipse.swt.graphics.Device.<init>(Device.java:174)
at org.eclipse.swt.widgets.Display.<init>(Display.java:566)
at org.eclipse.swt.widgets.Display.<init>(Display.java:557)
at org.eclipse.ui.internal.Workbench.createDisplay(Workbench.java:781)
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)
/ddn/gs1/home/xxxxx/.eclipse/1504701571_linux_gtk_x86_64/configuration/1550168755390.log (END)
I thought I’d share that ‘knime’ is an executable here, which looks like it’s the Eclipse app? That seems wrong!:
as the ‘knime’ user, if I just try to ./knime and run that executable in place, I get…
-bash-4.2$ ./knime
CompilerOracle: exclude javax/swing/text/GlyphView.getBreakSpot
Knime: Cannot open display:
Knime: Cannot open display:
Knime:
An error has occurred. See the log file
/opt/knime/knime_server/knime_executor/configuration/1550169332584.log.
Is the ini file readable by user xxxxx? Try sudo -u xxxxx cat /opt/knime/knime_server/workflow_repository/runtime/runtime_knime-rmi_xxxxxx-50101/knime-rmi.ini
It was not! I added my xxx user to knime group and gave knime +rwx in the workflow_repository. I think it’s past the ‘display’ issue, giving me an invalid directory which I suspect has to do with some more permissions issues.
NB we are in a machine room downtime until the beginning of next week but I think we can consider this closed and I’ll try and track down any remaining permissions issues next week. Thanks!
After our maintenance window I can bring the box up and we’re good now. It was a permissions issue and the graphics problem was a red herring. Hopefully this can help the next person, thanks for your good support work!