Welcome to Knowage Q&A, where you can ask questions and receive answers from other members of the community.
0 votes
1 view
Caused by: java.io.IOException: Cannot run program "xvfb-run" (in directory "."): error=2, No such file or directory
        at java.lang.ProcessBuilder.start(ProcessBuilder.java:1048)
        at java.lang.Runtime.exec(Runtime.java:620)
        at org.apache.commons.exec.launcher.Java13CommandLauncher.exec(Java13CommandLauncher.java:61)
        at org.apache.commons.exec.DefaultExecutor.launch(DefaultExecutor.java:279)
        at org.apache.commons.exec.DefaultExecutor.executeInternal(DefaultExecutor.java:336)
        at org.apache.commons.exec.DefaultExecutor.execute(DefaultExecutor.java:166)
        at org.apache.commons.exec.DefaultExecutor.execute(DefaultExecutor.java:153)
        at it.eng.knowage.slimerjs.wrapper.SlimerJS.exec(SlimerJS.java:266)
        at it.eng.knowage.slimerjs.wrapper.SlimerJS.render(SlimerJS.java:127)
        at it.eng.knowage.slimerjs.wrapper.SlimerJS.render(SlimerJS.java:56)
        at it.eng.knowage.engine.cockpit.api.export.jpg.JpgExporter.getBinaryData(JpgExporter.java:70)
        at org.apache.jsp.WEB_002dINF.jsp.ngCockpitExportJpg_jsp._jspService(ngCockpitExportJpg_jsp.java:75)
        at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:728)
        at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:432)
        ... 46 more

Caused by: java.io.IOException: error=2, No such file or directory
        at java.lang.UNIXProcess.forkAndExec(Native Method)
        at java.lang.UNIXProcess.<init>(UNIXProcess.java:247)
        at java.lang.ProcessImpl.start(ProcessImpl.java:134)
        at java.lang.ProcessBuilder.start(ProcessBuilder.java:1029)
        ... 60 more
Environment Ubuntu Server, Chrome
in Cockpit, Dashboard and Console by (150 points)
edited by

Please provide info on:

  • Ubuntu version
  • Knowage version
  • How you installed Knowage
  • Any other useful information

1 Answer

+1 vote
 
Best answer

The export PDF feature relies on SlimerJS, which on Ubuntu has a dependency on the lib xvfb.

You haven't installed such lib, that's why you face that error. Actually this configuration in missing on the available online documentation, so we are sorry about that.

To configure the export feature properly, please install the libs [1] and the package xvfb [2], as per SlimerJS documentation:

On Linux, standalone editions need these libraries: libpthread.so, libdl.so, libstdc++.so, libm.so, libgcc_s.so, libc.so, ld-linux-x86-64.so, libXrender1.so, libasound.so.2, libgtk-x11-2.0.so.0. On Ubuntu/Debian, you can install/verify it by doing:

sudo apt-get install libc6 libstdc++6 libgcc1 libgtk2.0-0 libasound2 libxrender1

There is a tool called xvfb, available on Linux and MacOS. It allows to launch any “graphical” programs without the need of an X-Windows environment. Windows of the application won’t be shown and will be drawn only in memory.

Install it from your prefered repository (e.g. with Ubuntu/Debian): 

sudo apt-get install xvfb

[1] https://docs.slimerjs.org/0.9/installation.html#requirements

[2] https://docs.slimerjs.org/0.9/installation.html#having-a-headless-slimerjs

by (15.2k points)
...