Execution failure of PhantomJSImageGenerator on Linux machines


#1

Hello everyone,

I would like to use plots using JavaScript on Linux machines but failed with the following errors:


Console:

WARN KNIMEApplication$3 Potential deadlock in SWT Display thread detected. Full thread dump will follow as debug output.
WARN Scatter Plot (JavaScript) 0:1 Data table must have at least one numerical or categorical column.
ERROR Scatter Plot (JavaScript) 0:3 Execute failed: org/knime/ext/phantomjs/PhantomJSImageGenerator


$HOME/phantomjs.log

(nothing reported)


knime-workspace/.metadata/knime/knime.log

2018-06-21 11:32:52,774 : DEBUG : KNIME-WFM-Parent-Notifier : NodeContainer : : : ROOT has new state: IDLE
2018-06-21 11:32:54,724 : DEBUG : main : NodeContainerEditPart : : : Scatter Plot (JavaScript) 0:3 (CONFIGURED)
2018-06-21 11:32:55,815 : DEBUG : main : ExecuteAction : : : Creating execution job for 1 node(s)…
2018-06-21 11:32:55,816 : DEBUG : main : NodeContainer : : : Scatter Plot (JavaScript) 0:3 has new state: CONFIGURED_MARKEDFOREXEC
2018-06-21 11:32:55,816 : DEBUG : main : NodeContainer : : : Scatter Plot (JavaScript) 0:3 has new state: CONFIGURED_QUEUED
2018-06-21 11:32:55,816 : DEBUG : main : NodeContainer : : : JavaScriptPlot 0 has new state: EXECUTING
2018-06-21 11:32:55,816 : DEBUG : KNIME-WFM-Parent-Notifier : NodeContainer : : : ROOT has new state: EXECUTING
2018-06-21 11:32:55,816 : DEBUG : KNIME-Worker-71 : WorkflowManager : Scatter Plot (JavaScript) : 0:3 : Scatter Plot (JavaScript) 0:3 doBeforePreExecution
2018-06-21 11:32:55,816 : DEBUG : KNIME-Worker-71 : NodeContainer : Scatter Plot (JavaScript) : 0:3 : Scatter Plot (JavaScript) 0:3 has new state: PREEXECUTE
2018-06-21 11:32:55,816 : DEBUG : KNIME-Worker-71 : WorkflowManager : Scatter Plot (JavaScript) : 0:3 : Scatter Plot (JavaScript) 0:3 doBeforeExecution
2018-06-21 11:32:55,816 : DEBUG : KNIME-Worker-71 : NodeContainer : Scatter Plot (JavaScript) : 0:3 : Scatter Plot (JavaScript) 0:3 has new state: EXECUTING
2018-06-21 11:32:55,817 : DEBUG : KNIME-Worker-71 : WorkflowFileStoreHandlerRepository : Scatter Plot (JavaScript) : 0:3 : Adding handler 5b1e4b05-c2cf-4c7d-9dcd-76350f22a371 (Scatter Plot (JavaScript) 0:3: ) - 3 in total
2018-06-21 11:32:55,817 : DEBUG : KNIME-Worker-71 : LocalNodeExecutionJob : Scatter Plot (JavaScript) : 0:3 : Scatter Plot (JavaScript) 0:3 Start execute
2018-06-21 11:32:55,817 : DEBUG : KNIME-Worker-71 : Node : Scatter Plot (JavaScript) : 0:3 : reset
2018-06-21 11:32:55,817 : ERROR : KNIME-Worker-71 : Node : Scatter Plot (JavaScript) : 0:3 : Execute failed: org/knime/ext/phantomjs/PhantomJSImageGenerator
2018-06-21 11:32:55,818 : DEBUG : KNIME-Worker-71 : Node : Scatter Plot (JavaScript) : 0:3 : Execute failed: org/knime/ext/phantomjs/PhantomJSImageGenerator
java.lang.NoClassDefFoundError: org/knime/ext/phantomjs/PhantomJSImageGenerator
at org.knime.js.core.node.AbstractImageWizardNodeModel.renderViewAndCreateImage(AbstractImageWizardNodeModel.java:132)
at org.knime.js.core.node.AbstractImageWizardNodeModel.performExecute(AbstractImageWizardNodeModel.java:100)
at org.knime.js.core.node.AbstractWizardNodeModel.execute(AbstractWizardNodeModel.java:133)
at org.knime.core.node.NodeModel.executeModel(NodeModel.java:567)
at org.knime.core.node.Node.invokeFullyNodeModelExecute(Node.java:1172)
at org.knime.core.node.Node.execute(Node.java:959)
at org.knime.core.node.workflow.NativeNodeContainer.performExecuteNode(NativeNodeContainer.java:561)
at org.knime.core.node.exec.LocalNodeExecutionJob.mainExecute(LocalNodeExecutionJob.java:95)
at org.knime.core.node.workflow.NodeExecutionJob.internalRun(NodeExecutionJob.java:179)
at org.knime.core.node.workflow.NodeExecutionJob.run(NodeExecutionJob.java:110)
at org.knime.core.util.ThreadUtils$RunnableWithContextImpl.runWithContext(ThreadUtils.java:328)
at org.knime.core.util.ThreadUtils$RunnableWithContext.run(ThreadUtils.java:204)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at org.knime.core.util.ThreadPool$MyFuture.run(ThreadPool.java:123)
at org.knime.core.util.ThreadPool$Worker.run(ThreadPool.java:246)
2018-06-21 11:32:55,818 : DEBUG : KNIME-Worker-71 : WorkflowManager : Scatter Plot (JavaScript) : 0:3 : Scatter Plot (JavaScript) 0:3 doBeforePostExecution
2018-06-21 11:32:55,818 : DEBUG : KNIME-Worker-71 : NodeContainer : Scatter Plot (JavaScript) : 0:3 : Scatter Plot (JavaScript) 0:3 has new state: POSTEXECUTE
2018-06-21 11:32:55,818 : DEBUG : KNIME-Worker-71 : WorkflowManager : Scatter Plot (JavaScript) : 0:3 : Scatter Plot (JavaScript) 0:3 doAfterExecute - failure
2018-06-21 11:32:55,818 : DEBUG : KNIME-Worker-71 : Node : Scatter Plot (JavaScript) : 0:3 : reset
2018-06-21 11:32:55,818 : DEBUG : KNIME-Worker-71 : Node : Scatter Plot (JavaScript) : 0:3 : clean output ports.
2018-06-21 11:32:55,818 : DEBUG : KNIME-Worker-71 : WorkflowFileStoreHandlerRepository : Scatter Plot (JavaScript) : 0:3 : Removing handler 5b1e4b05-c2cf-4c7d-9dcd-76350f22a371 (Scatter Plot (JavaScript) 0:3: ) - 2 remaining
2018-06-21 11:32:55,818 : DEBUG : KNIME-Worker-71 : NodeContainer : Scatter Plot (JavaScript) : 0:3 : Scatter Plot (JavaScript) 0:3 has new state: IDLE
2018-06-21 11:32:55,819 : DEBUG : KNIME-Worker-71 : Node : Scatter Plot (JavaScript) : 0:3 : Configure succeeded. (Scatter Plot (JavaScript))
2018-06-21 11:32:55,819 : DEBUG : KNIME-Worker-71 : NodeContainer : Scatter Plot (JavaScript) : 0:3 : Scatter Plot (JavaScript) 0:3 has new state: CONFIGURED
2018-06-21 11:32:55,819 : DEBUG : KNIME-Worker-71 : NodeContainer : Scatter Plot (JavaScript) : 0:3 : JavaScriptPlot 0 has new state: CONFIGURED
2018-06-21 11:32:55,819 : DEBUG : KNIME-WFM-Parent-Notifier : NodeContainer : : : ROOT has new state: IDLE

I’ve tried the same plotting on machines with several Operating Systems, like CentOS6, CentOS7 and Ubuntu 16.04. However, all the trials on Linux resulted in failure with the same error. On the other hand, this phenomenon cannot be observed on Mac OS (Sierra).

By checking the community log, I found the information that turning-off the “Create image at outport” would work, and it really works. However, it would be much better to be able to get images on Linux machines, too.

Many thanks for your help, in advance.


#2

Hi @Koji_Oda,

My suggestion would be to switch to KNIME 3.6 if you’re still using a previous version and switch to the “Bundled Chromium Browser” option for JavaScript Views in your KNIME preferences (Preferences -> KNIME -> JavaScript Views):

Best,
Anna


#3

Hi, @amartin,

Thank you very much for your suggestion.

I could find the same preference page on KNIME 3.6.0 which runs on CentOS 7 (not on CentOS 6, but it does not matter because I understand that the latest version of Chromium is not available for CentOS 6).

However, it still doesn’t work on CentOS 7…

2018-08-09 18:18:49,149 : DEBUG : KNIME-Worker-3 : Buffer : Scatter Plot (JavaScript) : 0:2 : Opening input stream on file “/tmp/knime_test62202/knime_container_20180809_5582197721124951456.tmp”, 0 open streams
2018-08-09 18:18:49,151 : DEBUG : KNIME-Worker-3 : Buffer : Scatter Plot (JavaScript) : 0:2 : Closing input stream on “/tmp/knime_test62202/knime_container_20180809_5582197721124951456.tmp”, 0 remaining
2018-08-09 18:18:49,382 : INFO : KNIME-Worker-3 : JavaScriptViewCreator : Scatter Plot (JavaScript) : 0:2 : JavaScript view - Scatter Plot - created. Debug output at: /tmp/knimeViewContainer62205/debug_15338063293821734857498845056612.html
2018-08-09 18:18:49,384 : DEBUG : KNIME-Worker-3 : ChromeViewService : Scatter Plot (JavaScript) : 0:2 : Acquiring Chromium image generation instance (9 left available of 10).
2018-08-09 18:19:09,397 : ERROR : KNIME-Worker-3 : ChromeImageGenerator : Scatter Plot (JavaScript) : 0:2 : Could not initialize Chrome driver. Timed out waiting for driver server to start.
Build info: version: ‘3.12.0’, revision: ‘7c6e0b3’, time: ‘2018-05-08T15:15:03.216Z’
System info: host: ‘(hostname)’, ip: ‘(ip address)’, os.name: ‘Linux’, os.arch: ‘amd64’, os.version: ‘3.10.0-693.el7.x86_64’, java.version: ‘1.8.0_152’
Driver info: driver.version: ChromeDriver
2018-08-09 18:19:09,397 : DEBUG : KNIME-Worker-3 : ChromeImageGenerator : Scatter Plot (JavaScript) : 0:2 : Could not initialize Chrome driver. Timed out waiting for driver server to start.

FirewallD is not running on this machine.
I would appreciate if I could get further assistance on this problem.

Best regards,
Koji


#4

Hi @Koji_Oda,

Please go to your KNIME installation folder, more precisely at something similar (I am using MacOS) to /Eclipse/plugins/org.knime.ext.chromium.bin.macosx.x86_64_67.0.3396.v201806150845/macosx/x86_64

where you should find a Chromium executable. Please try to run it from console and see what the error messages will be, probably some dependent libraries are missing.

Best,
Anna