gotenberg: unoconv PDF: unix process error: wait for unix process: exit status 5

When using gotenberg:7 and the endpoint forms/chromium/convert/html with the additional multipart data pdfFormat=PDF/A-1a the following error ocurred (Convert HTML to PDF/A-1a):

{"level":"error","ts":1664889966.8094878,"logger":"api","msg":"convert HTML to PDF: convert PDF: convert PDF to 'PDF/A-1a' with multi PDF engines: convert PDF to 'PDF/A-1a' with PDFcpu: method not available; convert PDF to 'PDF/A-1a' with PDFtk: method not available; convert PDF to 'PDF/A-1a' with QPDF: method not available; convert PDF to 'PDF/A-1a' with unoconv: unoconv PDF: unix process error: wait for unix process: exit status 5","trace":"a4b50916-7779-4b54-b14a-883469dc98dc","remote_ip":"172.20.0.68","host":"converter:3000","uri":"/forms/chromium/convert/html","method":"POST","path":"/forms/chromium/convert/html","referer":"","user_agent":"ReactorNetty/1.0.17","status":500,"latency":2274155848,"latency_human":"2.274155848s","bytes_in":-1,"bytes_out":21}

Especially the part: convert PDF to 'PDF/A-1a' with unoconv: unoconv PDF: unix process error: wait for unix process: exit status 5

This happened using a gotenberg container, which was running for about 3 weeks in total. I guess the unoconv-service / listener failed / crashed and didn’t recover? Either way, this shouldn’t be the case I guess.

About this issue

  • Original URL
  • State: closed
  • Created 2 years ago
  • Reactions: 1
  • Comments: 30 (5 by maintainers)

Commits related to this issue

Most upvoted comments

The issue is still occuring with the latest 7.7.1

I also have this issue, i cannot convert epub files. Gotenberg 7.7.0

docker run --rm -p 3000:3000 gotenberg/gotenberg
curl -X POST 'http://localhost:3042/forms/libreoffice/convert' -F 'files=@"./Alices_Adventures_in_Wonderland.epub"' -o test.pdf

Results in the error message:

{"level":"error","ts":1667908795.8060749,"logger":"api","msg":"convert to PDF: unoconv PDF: unix process error: wait for unix process: exit status 5","trace":"0f13fdf3-7067-475b-b0ca-0e2b260300aa","remote_ip":"172.17.0.1","host":"localhost:3042","uri":"/forms/libreoffice/convert","method":"POST","path":"/forms/libreoffice/convert","referer":"","user_agent":"curl/7.86.0","status":500,"latency":136665529,"latency_human":"136.665529ms","bytes_in":886127,"bytes_out":21}

I have tried many epub files, the one in this example was taken from here.

Maybe related to https://bugs.documentfoundation.org/show_bug.cgi?id=146807 / https://bugs.documentfoundation.org/show_bug.cgi?id=151766 A crash could explain why the document is Null when attempting to load via unoconv. But I can’t be sure sadly - If anyone want’s to investigate further into that, I’d be glad. Will try to research and test further with 7.7.1 - maybe with “bisecting” there are new information to be found 😕

Test in progress on my dev environment. Keep in touch!

Edit : Seems to be good. It’s quicker without --uno-listener-restart-threshold=0 and no more bug after waiting period.

Release 7.7.2 is now available with the fix. Please open a new issue if the problem still persist 😄

Deployed the update on our dev system and will monitor the behavior. I’ll keep you updated!

@PhE @cars10 @PierreSchwang @ytilotti could you try the image gulnap/gotenberg:libreofficefix? It’s using a downgraded version of LibreOffice (7.0.4) but with the Gotenberg 7.7.1 codebase.

Hi! After quick testing with multiple requests with a bit of a time difference (13:54, 14:24, 14:44) it seems to work so far. Do you know the culprit? I’ll try to test further but looks promising so far, thanks!

My feedback was without stateless mode. After new test with stateless mode (--uno-listener-restart-threshold=0) it’s working. More slow but working.

Hi @PierreSchwang, same problem here with version 7.6.1.

Process:

  1. Up the instance of docker
  2. Convert files with call /forms/libreoffice/convert
  3. File pdf generated
  4. Call /health, API up
  5. Convert files with call /forms/libreoffice/convert
  6. File pdf generated
  7. Call /health, API up
  8. Wait 10 minutes
  9. Convert with call /forms/libreoffice/convert
  10. Error convert to PDF: unoconv PDF: unix process error: wait for unix process: exit status 5
  11. Call /health, API up
  12. restart the instance
  13. Convert with /forms/libreoffice/convert
  14. File pdf generated

I don’t understand. Ater few minutes without activity, the error appear without PDF/A-1a.

Small status update: Seems like this is no issue with long-term runs only, but happens on freshly restarted containers after 2 hours now as well 😕

Edit - even more information: After triggering unoconv in the container manually, I can reproduce the same exit code:

gotenberg@daf006eb8a88:~$ unoconv --no-launch --format pdf --port 45379 -vvv --export SelectPdfVersion=1 --output out.pdf xxx.pdf
Verbosity set to level 3
Using office base path: /usr/lib/libreoffice
Using office binary path: /usr/lib/libreoffice/program
DEBUG: Connection type: socket,host=127.0.0.1,port=45379,tcpNoDelay=1;urp;StarOffice.ComponentContext
Input file: xxxx.pdf
unoconv: UnoException during import phase:
The document 'file:///home/gotenberg/xxxx.pdf' could not be opened.
gotenberg@daf006eb8a88:~$ echo $?
5

Still no idea why tho