CollaboraOnline / richdocumentscode

Built-in CODE Server app
https://apps.nextcloud.com/apps/richdocumentscode
Apache License 2.0
119 stars 29 forks source link

Built-in CODE Server not opening files with NC 29.0.4 #277

Closed iacchi closed 3 months ago

iacchi commented 3 months ago

Today I updated my NC version from 28.x to 29.0.4 and since then I cannot open any odt/ods files in the browser with the Built-in CODE Server. If I click on the file it gets downloaded and if I explicitly tell NC to open it with Collabora nothing happens. I checked nginx error log and I found this:

2024/07/19 16:23:40 [error] 15598#15598: *12678 FastCGI sent in stderr: "PHP message: richdocumentscode (proxy.php) error exit, PID: 80752, Message: No content in reply from coolwsd. Is SSL enabled in error ?" while reading upstream, client: 77.102.76.29, server: cloud.iacchi.casa, request: "POST /apps/richdocumentscode/proxy.php?req=/cool/convert-to/png HTTP/1.1", upstream: "fastcgi://unix:/var/run/fpm-cloud.iacchi.casa.sock:", host: "cloud.iacchi.casa"

I then checked coolwsd logs and I got this:

frk-53254-53254 2024-07-19 17:04:31.462801 +0100 [ forkit ] WRN  The systemplate directory [/tmp/.mount_CollabPhlRBL/] is read-only, and at least [/tmp/.mount_CollabPhlRBL//etc/passwd] is out-of-date. Will have to copy sysTemplate to jails. To restore optimal performance, make sure the files in [/tmp/.mount_CollabPhlRBL//etc] are up-to-date.| common/JailUtil.cpp:557
kit-139548-139548 2024-07-19 17:04:31.478293 +0100 [ kit_spare_fa5 ] WRN  Security warning: running without chroot jails is insecure.| kit/Kit.cpp:3245
kit-139515-139515 2024-07-19 17:04:31.520001 +0100 [ kitbroker_fa1 ] ERR  Failed to load: file:///tmp/coolwsd.iFkMPdjub3/jails/53216-b7556fa3/DduN1cc6KLwlcnD2/tmp/user/docs/rmjq3pPpFT97tZ8l/callbackwrapper-, error: loadComponentFromURL returned an empty reference| kit/Kit.cpp:1851
kit-139515-139515 2024-07-19 17:04:31.524411 +0100 [ kitbroker_fa1 ] ERR  ToMaster-fd8: error: cmd=load kind=faileddocloading| common/Session.hpp:172
kit-139515-139515 2024-07-19 17:04:31.531009 +0100 [ kitbroker_fa1 ] FTL  Failed to load the document. Setting TerminationFlag| kit/Kit.cpp:1878
wsd-53216-139544 2024-07-19 17:04:31.531214 +0100 [ docbroker_fa1 ] ERR  ToClient-fd8: Document load failed: faileddocloading| wsd/ClientSession.cpp:1797
wsd-53216-139544 2024-07-19 17:04:31.532039 +0100 [ docbroker_fa1 ] ERR  Unexpected message: [o1135005 close: ].| wsd/DocumentBroker.cpp:3399
wsd-53216-139544 2024-07-19 17:04:31.532143 +0100 [ docbroker_fa1 ] ERR  #29: Socket write returned -1 (EPIPE: Broken pipe)| net/Socket.hpp:1484
wsd-53216-139544 2024-07-19 17:04:31.532182 +0100 [ docbroker_fa1 ] ERR  #29: Socket write returned -1 (EPIPE: Broken pipe)| net/Socket.hpp:1484
wsd-53216-139544 2024-07-19 17:04:31.532202 +0100 [ docbroker_fa1 ] WRN  #29: Shutting down but 4 bytes couldn't be flushed and still remain in the output buffer| net/WebSocketHandler.hpp:895
wsd-53216-139544 2024-07-19 17:04:31.532249 +0100 [ docbroker_fa1 ] ERR  #29: Socket write returned -1 (EPIPE: Broken pipe)| net/Socket.hpp:1484
wsd-53216-139544 2024-07-19 17:04:31.532270 +0100 [ docbroker_fa1 ] WRN  #29: DocBroker [%2Ftmp%2Fcoolwsd.iFkMPdjub3%2Fjails%2F53216-b7556fa3%2Ftmp%2Fincoming%2Fcool-n56br92HzOWhM1zw%2Fcallbackwrapper-] got disconnected from its Kit (139515) unexpectedly. Closing| wsd/COOLWSD.cpp:3687
kit-139515-139515 2024-07-19 17:04:31.536803 +0100 [ kitbroker_fa1 ] ERR  ToMaster-fd8: Failed to get LoKitDocument instance for [file:///tmp/coolwsd.iFkMPdjub3/jails/53216-b7556fa3/DduN1cc6KLwlcnD2/tmp/user/docs/rmjq3pPpFT97tZ8l/callbackwrapper-]| kit/ChildSession.cpp:904
frk-53254-53254 2024-07-19 17:04:34.132688 +0100 [ forkit ] WRN  The systemplate directory [/tmp/.mount_CollabPhlRBL/] is read-only, and at least [/tmp/.mount_CollabPhlRBL//etc/passwd] is out-of-date. Will have to copy sysTemplate to jails. To restore optimal performance, make sure the files in [/tmp/.mount_CollabPhlRBL//etc] are up-to-date.| common/JailUtil.cpp:557
kit-139556-139556 2024-07-19 17:04:34.148474 +0100 [ kit_spare_fa6 ] WRN  Security warning: running without chroot jails is insecure.| kit/Kit.cpp:3245
kit-139548-139548 2024-07-19 17:04:34.184564 +0100 [ kitbroker_fa2 ] ERR  Failed to load: file:///tmp/coolwsd.iFkMPdjub3/jails/53216-b7556fa3/FMoJXwQH07i2sHgo/tmp/user/docs/dcY4YHe5vhJGJAck/callbackwrapper-, error: loadComponentFromURL returned an empty reference| kit/Kit.cpp:1851
kit-139548-139548 2024-07-19 17:04:34.188641 +0100 [ kitbroker_fa2 ] ERR  ToMaster-fd9: error: cmd=load kind=faileddocloading| common/Session.hpp:172
kit-139548-139548 2024-07-19 17:04:34.192139 +0100 [ kitbroker_fa2 ] FTL  Failed to load the document. Setting TerminationFlag| kit/Kit.cpp:1878
wsd-53216-139552 2024-07-19 17:04:34.192395 +0100 [ docbroker_fa2 ] ERR  ToClient-fd9: Document load failed: faileddocloading| wsd/ClientSession.cpp:1797
wsd-53216-139552 2024-07-19 17:04:34.192673 +0100 [ docbroker_fa2 ] ERR  Unexpected message: [o1135008 close: ].| wsd/DocumentBroker.cpp:3399
wsd-53216-139552 2024-07-19 17:04:34.192717 +0100 [ docbroker_fa2 ] ERR  #35: Socket write returned -1 (EPIPE: Broken pipe)| net/Socket.hpp:1484
wsd-53216-139552 2024-07-19 17:04:34.193164 +0100 [ docbroker_fa2 ] ERR  #35: Socket write returned -1 (EPIPE: Broken pipe)| net/Socket.hpp:1484
wsd-53216-139552 2024-07-19 17:04:34.193203 +0100 [ docbroker_fa2 ] WRN  #35: Shutting down but 4 bytes couldn't be flushed and still remain in the output buffer| net/WebSocketHandler.hpp:895
wsd-53216-139552 2024-07-19 17:04:34.193247 +0100 [ docbroker_fa2 ] ERR  #35: Socket write returned -1 (EPIPE: Broken pipe)| net/Socket.hpp:1484
wsd-53216-139552 2024-07-19 17:04:34.193269 +0100 [ docbroker_fa2 ] WRN  #35: DocBroker [%2Ftmp%2Fcoolwsd.iFkMPdjub3%2Fjails%2F53216-b7556fa3%2Ftmp%2Fincoming%2Fcool-UQa4upMKs3tOEo2q%2Fcallbackwrapper-] got disconnected from its Kit (139548) unexpectedly. Closing| wsd/COOLWSD.cpp:3687
kit-139548-139548 2024-07-19 17:04:34.196939 +0100 [ kitbroker_fa2 ] ERR  ToMaster-fd9: Failed to get LoKitDocument instance for [file:///tmp/coolwsd.iFkMPdjub3/jails/53216-b7556fa3/FMoJXwQH07i2sHgo/tmp/user/docs/dcY4YHe5vhJGJAck/callbackwrapper-]| kit/ChildSession.cpp:904

Everything is installed on Debian Bookworm with nginx 1.22.1 and php 8.2.21. As far as I can tell the problem happened after the NC update, with nothing else changed.

timur-g commented 3 months ago

And what is your Built-in CODE Server version? I saw the sam message in log, but I have modified setup and can open files after all updates, so let someone else retests.

iacchi commented 3 months ago

It's 24.4.502, which is the latest afaik. It was that also in NC 28. Do I need to reinstall it because the binary is different in NC 29 or something? I see on the NC store page that there are different versions for the different NC versions.

iacchi commented 3 months ago

Problem solved: I had to update my nginx config file for the NC installation to reflect some changes needed for the new version of NC.