gotenberg
gotenberg copied to clipboard
LibreOffice listener fails to start
Discussed in https://github.com/gotenberg/gotenberg/discussions/440
Originally posted by Lincoln-hub March 22, 2022 I am running Gotenbergr on my local computer, I installed all the required engines but I'm running into this error: [FATAL] starting uno: start long-running LibreOffice listener: execute LibreOffice listener: context done: context deadline exceeded exit status 1. Does anyone know how to fix this?
@lincoln-hub could you disable the long-running LibreOffice listener with --uno-listener-restart-threshold=0
? If that does not work, could you rollback to version 7.3
?
Hi @gulien Thank you for your help. Disabling the long-running LibreOffice listener didn't work either. version 7.3 gives the error below(looks like there is no option for --user-profile): 2022/03/26 22:17:55.067 DEBUG api form data values: map[] {"trace": "4ea59205-b1da-4385-b4cd-057e025ce49e"} 2022/03/26 22:17:55.067 DEBUG api form data files: map[Data_for_scaling.xlsx:/tmp/55c85e27-b816-4442-bf56-81e47da09a86/Data_for_scaling.xlsx] {"trace": "4ea59205-b1da-4385-b4cd-057e025ce49e"} 2022/03/26 22:17:55.067 DEBUG api print to PDF with: {Landscape:false PageRanges: PDFArchive:false} {"trace": "4ea59205-b1da-4385-b4cd-057e025ce49e"} 2022/03/26 22:17:55.067 DEBUG api.cmd start unix process: /usr/bin/unoconv --user-profile ///tmp/bdd4323e-579f-445f-8c21-8a5c47cad9f8 --port 41383 --format pdf -vvv --output /tmp/55c85e27-b816-4442-bf56-81e47da09a86/26a72c11-882b-4ec2-9993-e82bb2d5d1a2.pdf /tmp/55c85e27-b816-4442-bf56-81e47da09a86/Data_for_scaling.xlsx {"trace": "4ea59205-b1da-4385-b4cd-057e025ce49e"} 2022/03/26 22:17:55.169 DEBUG api.cmd.stdout unoconv: option --user-profile not recognized, try unoconv -h for a list of all the options {"trace": "4ea59205-b1da-4385-b4cd-057e025ce49e"} 2022/03/26 22:17:55.182 DEBUG api.cmd unix process already killed {"trace": "4ea59205-b1da-4385-b4cd-057e025ce49e"} 2022/03/26 22:17:55.182 DEBUG api '/tmp/55c85e27-b816-4442-bf56-81e47da09a86' removed {"trace": "4ea59205-b1da-4385-b4cd-057e025ce49e"} 2022/03/26 22:17:55.182 ERROR api convert to PDF: unoconv PDF: unix process error: exit status 255 {"trace": "4ea59205-b1da-4385-b4cd-057e025ce49e", "remote_ip": "::1", "host": "localhost:3000", "uri": "/forms/libreoffice/convert", "method": "POST", "path": "/forms/libreoffice/convert", "referer": "", "user_agent": "PostmanRuntime/7.28.4", "status": 500, "latency": 116257920, "latency_human": "116.25792ms", "bytes_in": 9026, "bytes_out": 21}
Now thatβs weird.. Whatβs your system specifications? amd64?
We have the same problem since we upgraded from 7.4.3 to 7.5.2. The error log messages are:
{"level":"error","ts":1648454891.0365252,"logger":"uno","msg":"unlock long-running LibreOffice listener: restart LibreOffice listener: start LibreOffice listener: LibreOffice listener socket not available: context deadline exceeded"}
{"level":"error","ts":1648454901.0387313,"logger":"api","msg":"convert to PDF: lock long-running LibreOffice listener: restart long-running LibreOffice listener: start LibreOffice listener: LibreOffice listener socket not available: context deadline exceeded","trace":"188155ec-e383-4486-9b7a-e77ea6788bbf","remote_ip":"xxx.xxx.xxx.xxx","host":"zsp-pdfcreator-worker:3000","uri":"/pdfcreatorworker/forms/libreoffice/convert","method":"POST","path":"/pdfcreatorworker/forms/libreoffice/convert","referer":"","user_agent":"ReactorNetty/1.0.16","status":503,"latency":18618289204,"latency_human":"18.618289204s","bytes_in":-1,"bytes_out":19}
Our system spec is Linux 3.10.0-1160.53.1.el7.x86_64 #1 SMP Thu Dec 16 10:19:28 UTC 2021 x86_64 GNU/Linux
.
It may be related to https://github.com/gotenberg/gotenberg/issues/403
@remoteexception @Lincoln-hub could you run libreoffice --version
inside the container (latest version)?
With gotenberg 7.5.2:
libreoffice --version
LibreOffice 7.3.1.3 30(Build:3)
With gotenberg 7.4.3:
libreoffice --version
LibreOffice 7.2.5.2.0 20(Build:2)
I'm kinda blocked here..
The version 7.3
was the one actually causing the issue described in #403, but it's now the default in bullseye-backports
(and there is not other version in this distribution). I could rollback to 7.0
with bullseye
distribution, but that's an "old" version that has also some issues.
Any idea welcome π
Just wanted to say, I'm experiencing this problem too. I'm able to upload a single doc sometimes, but soon after it crashes with the above mentioned errors
I guess the version 7.4.3
still work in the mean time π
Maybe you could check, whether there is a known bug in Libreoffice or file a bug report at: https://bugs.documentfoundation.org/
I am also experiencing this problem since last upgrade. Unfortunately I don't have sufficient knowledge about gotenberg, GO, UNO etc. to file or search for a bug.
Instead of using bullseye-backports
, could you install the .deb
files from the LibreOffice archive using the latest 'Still Branch' release?
https://downloadarchive.documentfoundation.org/libreoffice/old/7.2.7.1/deb/x86_64/
@crackalak indeed, thanks π
I have to check if there are other platforms available (arm64
etc.), otherwise the amd64
image will differ from others.
Ah yes, looking at that archive it seems there are only arm64
builds for macos
Additionally, there appears to be a mismatch of versions between architectures in bullseye-backports
π€: https://packages.debian.org/bullseye-backports/libreoffice
I also have problems with 7.5.2, but 7.4.3 works fine for me
Version 7.5.3
brings a newer build of LibreOffice 7.3
. No issues on the demo instance so far.
I'm also facing this issue with 7.5.3
. Is a rollback to 7.4.3
the best solution for now?
@davidbasalla it is for now π
I wonder why it works on some systems/platforms, while on other it does not. For instance, it never happened on the demo instance.
It might be related to the switch from unoconv
to my own custom solution when it comes to creating the listener.
I also experience the same problem. Is returning to Unoconv a possible way to go? Maybe just to see if its related to that.
@HoffmannTom I do think it's more related to the LibreOffice version than unoconv.
I tested the new version 7.6.0. Unfortunately, the same problem shows up, listener dies after a certain time. Had to do rollback to 7.4.3
Having the same problem, had to downgrade to 7.4.3 from 7.7 which meant the loss of --uno-listener-restart-threshold=0
which in turn means that we get the error Service Unavailable rather than context deadline when converting multiple documents.
@NiklasBr how is it working for you as of now? I'm thinking about downgrading to 7.4.3 (I'm running it on CloudRun) as well
@NiklasBr @crackalak @davidbasalla @azmatzuberi @YuriyVorobyov96 @remoteexception 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.
@NiklasBr @crackalak @davidbasalla @azmatzuberi @YuriyVorobyov96 @remoteexception 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.
I came across the same issue today. I used this suggestion as an attempt to fix this issue and it worked for me. I did not perform extensive testing but with [gotenberg/gotenberg:latest] the issue occurred and with [gulnap/gotenberg:libreofficefix] it did not. Thank you!
@chuth-cx Thanks for the feedback!
As mentioned in https://github.com/paperless-ngx/paperless-ngx/issues/2065 there was also a problem with document conversion from office documents to pdf using Gotenberg 7.5/7.6, Gotenberg 7.4 is working fine.
I just tested file conversion with gulnap/gotenberg:libreofficefix
and can report back, that it's working too.
@mztiq Thanks for the feedback! Once a new release is available (soon I hope), could you update the paperless-ngx
issue too? π
@gulien of course.