-
Notifications
You must be signed in to change notification settings - Fork 24
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
libreoffice exits - error code 81 #20
Comments
Did you change the lambda layer version you're using after upgrading the npm package to 3.0.0? |
Yes I am using |
I was able to workaround this issue by essentially pre warming the lambda function with a dummy conversion prior to doing the real pdf conversions. Our application converts lots of files, and runs up to 5 concurrent instances of the conversion function. The work around creates a dummy text file, and attempts to do a pdf conversion, which fails with exit code 81. It will then attempt to process the real data file and work successfully. The dummy text file will remain on the disk when the AWS lambda container is reused. The code is essentially:
|
Hey @lurch83 This is a known issue, we end up with the same workaround as well: https://github.com/shelfio/aws-lambda-libreoffice/blob/master/src/convert.ts#L33 Adding |
Thanks for that. I didn't notice that you were doing it as well as I am not using the |
Problem: When executing a convert to pdf command, libreoffice will exit with an unexpected error, and exit code 81. Even after using workaround mentioned by @lurch83 it is still failing with below error for subsequent command : Code snippet as below :
Any idea ?? @vladgolubev @KnupMan |
@jayeshkulkarni - I am facing the same issue. were you able to solve this ? Appreciate your help. |
I have the same problem. Did anybody solve this? |
Node environments don't contain fonts nor a FontConfig anymore. It used to come with a lot more stuff, but now you have to include a lot just to get anything to run. You'll need to put some fonts and a FontConfig in an archive somewhere online (like S3) and then download + extract it in your Lambda. There is more discussion at #23. |
@shelfio/aws-lambda-libreoffice
Version: 3.0.1Problem: When executing a convert to pdf command, libreoffice will exit with an unexpected error, and exit code 81. It appears to be happening on first startup, sometimes subsequent commands are successful.
Command being run:
After looking into this error code, it looks like it could be an issue with using
../soffice.bin
as the executable rather than just../soffice
See this bug report where the same error was reported:
https://bugs.documentfoundation.org/show_bug.cgi?id=107912
I was using the previous version of this where i had to use
getExecutablePath
which would return/tmp/instdir/program/soffice
, where as unpack returns/tmp/instdir/program/soffice.bin
as libreoffice is now being extracted with the .bin file extension, as documented in the readme diffWas adding the .bin on intentional and required for this version?
The text was updated successfully, but these errors were encountered: