Search code examples
node.jslibreoffice

LibreOffice (soffice) command line stuck when executed as a node child process


I am running headless, command-line libreoffice to convert documents to pdf or png. I am running. E.g.

soffice --headless --convert-to png --outdir /tmp /tmp/myfile.pub

The conversion happens successfully when I run the command on the command line directly. However, if I run it by spawning (or execing) a child process in node, it just hangs (the conversion does not happen). When I do a ps aux, I can see this command running.

Any idea why it may be happening?

I have already tried a number of things, including:

  1. Used full path to binary
  2. Ensured the file permissions are all good

Solution

  • A server restart miraculously fixed it.