CollaboraOnline / online

Collabora Online is a collaborative online office suite based on LibreOffice technology. This is also the source for the Collabora Office apps for iOS and Android.
https://collaboraonline.com
Other
1.85k stars 704 forks source link

PDF export fails with "Document cannot be exported. Please contact the storage server administrator." #5039

Closed M-Stenzel closed 2 years ago

M-Stenzel commented 2 years ago

Hi team,

I cannot export pdf files from CODE, but receive the browser error message (see title).

In the coolwsd logs I find


Jul 19 18:34:27 terve.xy-space.de coolwsd[16526]: kit-16526-14688 2022-07-19 18:34:27.890093 +0300 [ kitbroker_004 ] ERR ToMaster-0f3: SaveAs Failed for id=export [/tmp/user/docs/5vKqNWnZGdU1aFox6kCC8pi4lad1Yx5fEqJlXtEf8AQEHhXYtjcLTwQPCkuXIDzB/Fox.pdf]. error= exception: SfxBaseModel::impl_store file:///tmp/user/docs/5vKqNWnZGdU1aFox6kCC8pi4lad1Yx5fEqJlXtEf8AQEHhXYtjcLTwQPCkuXIDzB/Fox.pdf failed: 0xc10(Error Area:Io Class:Write Code:16) /opt/collaboraoffice/debugsource/sfx2/source/doc/sfxbasemodel.cxx:3202 /opt/collaboraoffice/debugsource/sfx2/source/doc/sfxbasemodel.cxx:1775| kit/ChildSession.cpp:1083 Jul 19 18:34:27 terve.xy-space.de coolwsd[16526]: kit-16526-14688 2022-07-19 18:34:27.890284 +0300 [ kitbroker_004 ] ERR ToMaster-0f3: error: cmd=downloadas kind=saveasfailed| common/Session.hpp:148 Jul 19 18:34:27 terve.xy-space.de coolwsd[14680]: wsd-14680-18805 2022-07-19 18:34:27.890519 +0300 [ docbroker_004 ] ERR ToClient-0f3: downloadas error failure: saveasfailed| wsd/ClientSession.cpp:1519

The name of the file is Fox.docx. Exporting to Word/EPUB/ODF works. Everything else (document creation, etc.) works well.

In the browser console (Linux Iridium and Firefox (latest versions)) there is no error or warning message.

Installation is CODE version 22.05 from the official CODE repos (SuSE Linux). This is no dockerised installation, everything is rpm based. Owncloud version 10.10.0 (latest version), apache 2.4.54 (latest version). There are no error messages in the apache logs.

This is my coolwsd.xml


de_DE en_GB en_US es_ES fr_FR it nl pt_BR pt_PT ru true 1 4 5 false 96 3600 30 300 false 0 8000 0 0 100 5 100 10000 60 300 3072 85 120 false 120 900 true warning notice fatal false -INFO-WARN /var/log/coolwsd.log never timestamp true 10 days 10 true false false 82589933 false false /var/log/coolwsd.trace.json false false IPv4 loopback 192\.168\.[0-9]{1,3}\.[0-9]{1,3} ::ffff:192\.168\.[0-9]{1,3}\.[0-9]{1,3} 127\.0\.0\.1 ::ffff:127\.0\.0\.1 ::1 172\.1[6789]\.[0-9]{1,3}\.[0-9]{1,3} ::ffff:172\.1[6789]\.[0-9]{1,3}\.[0-9]{1,3} 172\.2[0-9]\.[0-9]{1,3}\.[0-9]{1,3} ::ffff:172\.2[0-9]\.[0-9]{1,3}\.[0-9]{1,3} 172\.3[01]\.[0-9]{1,3}\.[0-9]{1,3} ::ffff:172\.3[01]\.[0-9]{1,3}\.[0-9]{1,3} 10\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3} ::ffff:10\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3} true false /etc/coolwsd/cert.pem /etc/coolwsd/key.pem /etc/coolwsd/ca-chain.cert.pem 1000 false 31536000 true true 1800 false 1 false default true 0 900 true true true false

There is no /tmp/user/docs directory, nor a /tmp/user directory. Creating those directories by hand does not change things. The /tmp/user/docs/... directory seems to be expected (name changes every time) but obviously does not exist before the export procedure. The /tmp directory is writable and has enough space.

Any help appreciated,

Martin.

M-Stenzel commented 2 years ago

This is a short update,

this scenario was self constructed,

I ran: symlinks -r / | grep angli

which resulted in: dangling: /opt/cool/systemplate/dev/urandom -> ../tmp/dev/urandom dangling: /opt/cool/systemplate/dev/random -> ../tmp/dev/random

I stupidly tried to correct the "broken" links, bad one!

After reinstalling CODE which created the correct symlinks again, the problem was solved.

vmiklos commented 2 years ago

FWIW the reason the PDF export is broken without access to a random device is that the PDF export calculates some checksum of the document, which requires initializing NSS, which fails when no random device is available. Such hash is not calculated for the other formats mentioned in this issue, so those don't fail.