Errors while trying to open a document

After container start:

2024-10-04T16:38:51.560008272Z wsd-00007-00007 2024-10-04 19:38:51.559883 +0300 [ coolwsd ] WRN  Waking up dead poll thread [main], started: false, finished: false| net/Socket.hpp:724
2024-10-04T16:38:51.560242538Z frk-00011-00011 2024-10-04 19:38:51.560180 +0300 [ forkit ] WRN  The systemplate directory [/opt/cool/systemplate] is read-only, and at least [/opt/cool/systemplate//etc/hosts] is out-of-date. Will have to copy sysTemplate to jails. To restore optimal performance, make sure the files in [/opt/cool/systemplate/etc] are up-to-date.| common/JailUtil.cpp:585
2024-10-04T16:38:51.561464342Z wsd-00007-00017 2024-10-04 19:38:51.561379 +0300 [ remotefontconfig_poll ] ERR  Remote config server has response status code: 0 (Unknown)| wsd/COOLWSD.cpp:1212
2024-10-04T16:38:51.564535267Z frk-00011-00011 2024-10-04 19:38:51.564427 +0300 [ forkit ] WRN  The systemplate directory [/opt/cool/systemplate] is read-only, and at least [/opt/cool/systemplate//etc/hosts] is out-of-date. Will have to copy sysTemplate to jails. To restore optimal performance, make sure the files in [/opt/cool/systemplate/etc] are up-to-date.| common/JailUtil.cpp:585
2024-10-04T16:38:51.565826667Z kit-00021-00021 2024-10-04 19:38:51.565696 +0300 [ kit_spare_002 ] ERR  Failed to stat or chown 65534:65534 /opt/cool/child-roots/7-191d10d3//linkable/opt/cool/systemplate/var/cache/fontconfig/7ef2298fde41cc6eeb7af42e48b7d293-le64.cache-8: Invalid argument missing cap_chown?, disabling linkable| kit/Kit.cpp:378
2024-10-04T16:38:51.565840213Z kit-00021-00021 2024-10-04 19:38:51.565774 +0300 [ kit_spare_002 ] ERR  link("/opt/cool/systemplate/var/cache/fontconfig/7ef2298fde41cc6eeb7af42e48b7d293-le64.cache-8", "/opt/cool/child-roots/7-191d10d3/pHDmHHZw6EskYlV2/var/cache/fontconfig/7ef2298fde41cc6eeb7af42e48b7d293-le64.cache-8") failed: Invalid argument. Very slow copying path triggered.| kit/Kit.cpp:394
2024-10-04T16:38:51.570086404Z frk-00011-00011 2024-10-04 19:38:51.569966 +0300 [ forkit ] WRN  The systemplate directory [/opt/cool/systemplate] is read-only, and at least [/opt/cool/systemplate//etc/hosts] is out-of-date. Will have to copy sysTemplate to jails. To restore optimal performance, make sure the files in [/opt/cool/systemplate/etc] are up-to-date.| common/JailUtil.cpp:585
2024-10-04T16:38:51.571111440Z kit-00022-00022 2024-10-04 19:38:51.570985 +0300 [ kit_spare_003 ] ERR  Failed to stat or chown 65534:65534 /opt/cool/child-roots/7-191d10d3//linkable/opt/cool/systemplate/var/cache/fontconfig/7ef2298fde41cc6eeb7af42e48b7d293-le64.cache-8: Invalid argument missing cap_chown?, disabling linkable| kit/Kit.cpp:378
2024-10-04T16:38:51.571192848Z kit-00022-00022 2024-10-04 19:38:51.571059 +0300 [ kit_spare_003 ] ERR  link("/opt/cool/systemplate/var/cache/fontconfig/7ef2298fde41cc6eeb7af42e48b7d293-le64.cache-8", "/opt/cool/child-roots/7-191d10d3/htY7ex8FDXJSR9y8/var/cache/fontconfig/7ef2298fde41cc6eeb7af42e48b7d293-le64.cache-8") failed: Invalid argument. Very slow copying path triggered.| kit/Kit.cpp:394
2024-10-04T16:38:51.577260357Z kit-00023-00023 2024-10-04 19:38:51.577110 +0300 [ kit_spare_004 ] ERR  Failed to stat or chown 65534:65534 /opt/cool/child-roots/7-191d10d3//linkable/opt/cool/systemplate/var/cache/fontconfig/7ef2298fde41cc6eeb7af42e48b7d293-le64.cache-8: Invalid argument missing cap_chown?, disabling linkable| kit/Kit.cpp:378
2024-10-04T16:38:51.577410992Z kit-00023-00023 2024-10-04 19:38:51.577344 +0300 [ kit_spare_004 ] ERR  link("/opt/cool/systemplate/var/cache/fontconfig/7ef2298fde41cc6eeb7af42e48b7d293-le64.cache-8", "/opt/cool/child-roots/7-191d10d3/OnGLdUek3FV5C9H6/var/cache/fontconfig/7ef2298fde41cc6eeb7af42e48b7d293-le64.cache-8") failed: Invalid argument. Very slow copying path triggered.| kit/Kit.cpp:394
2024-10-04T16:39:51.621459109Z wsd-00007-00017 2024-10-04 19:39:51.621396 +0300 [ remotefontconfig_poll ] ERR  Remote config server has response status code: 0 (Unknown)| wsd/COOLWSD.cpp:1212
2024-10-04T16:40:51.681474522Z wsd-00007-00017 2024-10-04 19:40:51.681383 +0300 [ remotefontconfig_poll ] ERR  Remote config server has response status code: 0 (Unknown)| wsd/COOLWSD.cpp:1212
2024-10-04T16:41:51.743895668Z wsd-00007-00017 2024-10-04 19:41:51.743744 +0300 [ remotefontconfig_poll ] ERR  Remote config server has response status code: 0 (Unknown)| wsd/COOLWSD.cpp:1212

Trying to open a document:

2024-10-04T16:51:40.026394765Z frk-00011-00011 2024-10-04 19:51:40.026140 +0300 [ forkit ] WRN  The systemplate directory [/opt/cool/systemplate] is read-only, and at least [/opt/cool/systemplate//etc/hosts] is out-of-date. Will have to copy sysTemplate to jails. To restore optimal performance, make sure the files in [/opt/cool/systemplate/etc] are up-to-date.| common/JailUtil.cpp:585
2024-10-04T16:51:40.029935111Z wsd-00007-00199 2024-10-04 19:51:40.029757 +0300 [ docbroker_001 ] ERR  WOPI::GetFile [https://cloud.DOMAINNAME.TLD/index.php/apps/richdocuments/wopi/files/630_ocoh941voayu/contents?access_token=&access_token_ttl=0] failed with Status Code: 0 (Unknown)| wsd/wopi/WopiStorage.cpp:681
2024-10-04T16:51:40.030472288Z wsd-00007-00199 2024-10-04 19:51:40.030329 +0300 [ docbroker_001 ] ERR  Cannot download document from WOPI storage uri [https://cloud.DOMAINNAME.TLD/index.php/apps/richdocuments/wopi/files/630_ocoh941voayu/contents?access_token=&access_token_ttl=0]. Error: WOPI::GetFile [https://cloud.DOMAINNAME.TLD/index.php/apps/richdocuments/wopi/files/630_ocoh941voayu/contents?access_token=&access_token_ttl=0] failed: | wsd/wopi/WopiStorage.cpp:611
2024-10-04T16:51:40.030545325Z wsd-00007-00199 2024-10-04 19:51:40.030428 +0300 [ docbroker_001 ] ERR  loading document exception: WOPI::GetFile [https://cloud.DOMAINNAME.TLD/index.php/apps/richdocuments/wopi/files/630_ocoh941voayu/contents?access_token=&access_token_ttl=0] failed: | wsd/DocumentBroker.cpp:3064
2024-10-04T16:51:40.030672425Z wsd-00007-00199 2024-10-04 19:51:40.030481 +0300 [ docbroker_001 ] ERR  Failed to add session to [https%3A%2F%2Fcloud.DOMAINNAME.TLD%3A443%2Findex.php%2Fapps%2Frichdocuments%2Fwopi%2Ffiles%2F630_ocoh941voayu] with URI [https://cloud.DOMAINNAME.TLD/index.php/apps/richdocuments/wopi/files/630_ocoh941voayu?access_token=zv489xLxthQZn9bewDCOZffc2yVDYSLo&access_token_ttl=0]: WOPI::GetFile [https://cloud.DOMAINNAME.TLD/index.php/apps/richdocuments/wopi/files/630_ocoh941voayu/contents?access_token=&access_token_ttl=0] failed: | wsd/DocumentBroker.cpp:3023
2024-10-04T16:51:40.030708637Z wsd-00007-00199 2024-10-04 19:51:40.030544 +0300 [ docbroker_001 ] ERR  Storage error while starting session on https%3A%2F%2Fcloud.DOMAINNAME.TLD%3A443%2Findex.php%2Fapps%2Frichdocuments%2Fwopi%2Ffiles%2F630_ocoh941voayu for socket #36. Terminating connection. Error: WOPI::GetFile [https://cloud.DOMAINNAME.TLD/index.php/apps/richdocuments/wopi/files/630_ocoh941voayu/contents?access_token=&access_token_ttl=0] failed: | wsd/RequestVettingStation.cpp:434
2024-10-04T16:51:40.031057059Z wsd-00007-00199 2024-10-04 19:51:40.030859 +0300 [ docbroker_001 ] ERR  #36: Socket write returned -1 (EPIPE: Broken pipe)| net/Socket.hpp:1484
2024-10-04T16:51:40.031082412Z wsd-00007-00199 2024-10-04 19:51:40.030979 +0300 [ docbroker_001 ] WRN  ClientSession must be known| wsd/DocumentBroker.cpp:4058
2024-10-04T16:51:40.041328261Z kit-00200-00200 2024-10-04 19:51:40.041100 +0300 [ kit_spare_005 ] ERR  Failed to stat or chown 65534:65534 /opt/cool/child-roots/7-191d10d3//linkable/opt/cool/systemplate/var/cache/fontconfig/7ef2298fde41cc6eeb7af42e48b7d293-le64.cache-8: Invalid argument missing cap_chown?, disabling linkable| kit/Kit.cpp:378
2024-10-04T16:51:40.041410497Z kit-00200-00200 2024-10-04 19:51:40.041262 +0300 [ kit_spare_005 ] ERR  link("/opt/cool/systemplate/var/cache/fontconfig/7ef2298fde41cc6eeb7af42e48b7d293-le64.cache-8", "/opt/cool/child-roots/7-191d10d3/pU3L9bmSrWjpzD9A/var/cache/fontconfig/7ef2298fde41cc6eeb7af42e48b7d293-le64.cache-8") failed: Invalid argument. Very slow copying path triggered.| kit/Kit.cpp:394
2024-10-04T16:51:40.047316944Z wsd-00007-00199 2024-10-04 19:51:40.047144 +0300 [ docbroker_001 ] WRN  #28: Unassociated Kit (23) disconnected unexpectedly| wsd/COOLWSD.cpp:3726
2024-10-04T16:51:40.047347935Z wsd-00007-00199 2024-10-04 19:51:40.047209 +0300 [ docbroker_001 ] WRN  #28: Unknown Kit process closed with pid -1| wsd/COOLWSD.cpp:3733
2024-10-04T16:51:40.049678217Z notcoolmount: unmount failed to detach [/opt/cool/child-roots/7-191d10d3/OnGLdUek3FV5C9H6/lo]: Operation not permitted.
2024-10-04T16:51:40.049712905Z notcoolmount: forced unmount of [/opt/cool/child-roots/7-191d10d3/OnGLdUek3FV5C9H6/lo] failed: Operation not permitted.
2024-10-04T16:51:41.206394784Z frk-00011-00011 2024-10-04 19:51:41.206301 +0300 [ forkit ] WRN  The systemplate directory [/opt/cool/systemplate] is read-only, and at least [/opt/cool/systemplate//etc/hosts] is out-of-date. Will have to copy sysTemplate to jails. To restore optimal performance, make sure the files in [/opt/cool/systemplate/etc] are up-to-date.| common/JailUtil.cpp:585
2024-10-04T16:51:41.207753801Z wsd-00007-00201 2024-10-04 19:51:41.207621 +0300 [ docbroker_002 ] ERR  WOPI::GetFile [https://cloud.DOMAINNAME.TLD/index.php/apps/richdocuments/wopi/files/630_ocoh941voayu/contents?access_token=&access_token_ttl=0&permission=edit] failed with Status Code: 0 (Unknown)| wsd/wopi/WopiStorage.cpp:681
2024-10-04T16:51:41.207775513Z wsd-00007-00201 2024-10-04 19:51:41.207668 +0300 [ docbroker_002 ] ERR  Cannot download document from WOPI storage uri [https://cloud.DOMAINNAME.TLD/index.php/apps/richdocuments/wopi/files/630_ocoh941voayu/contents?access_token=&access_token_ttl=0&permission=edit]. Error: WOPI::GetFile [https://cloud.DOMAINNAME.TLD/index.php/apps/richdocuments/wopi/files/630_ocoh941voayu/contents?access_token=&access_token_ttl=0&permission=edit] failed: | wsd/wopi/WopiStorage.cpp:611
2024-10-04T16:51:41.207782482Z wsd-00007-00201 2024-10-04 19:51:41.207693 +0300 [ docbroker_002 ] ERR  loading document exception: WOPI::GetFile [https://cloud.DOMAINNAME.TLD/index.php/apps/richdocuments/wopi/files/630_ocoh941voayu/contents?access_token=&access_token_ttl=0&permission=edit] failed: | wsd/DocumentBroker.cpp:3064
2024-10-04T16:51:41.207847523Z wsd-00007-00201 2024-10-04 19:51:41.207706 +0300 [ docbroker_002 ] ERR  Failed to add session to [https%3A%2F%2Fcloud.DOMAINNAME.TLD%3A443%2Findex.php%2Fapps%2Frichdocuments%2Fwopi%2Ffiles%2F630_ocoh941voayu] with URI [https://cloud.DOMAINNAME.TLD/index.php/apps/richdocuments/wopi/files/630_ocoh941voayu?access_token=zv489xLxthQZn9bewDCOZffc2yVDYSLo&access_token_ttl=0&permission=edit]: WOPI::GetFile [https://cloud.DOMAINNAME.TLD/index.php/apps/richdocuments/wopi/files/630_ocoh941voayu/contents?access_token=&access_token_ttl=0&permission=edit] failed: | wsd/DocumentBroker.cpp:3023
2024-10-04T16:51:41.207855975Z wsd-00007-00201 2024-10-04 19:51:41.207730 +0300 [ docbroker_002 ] ERR  Storage error while starting session on https%3A%2F%2Fcloud.DOMAINNAME.TLD%3A443%2Findex.php%2Fapps%2Frichdocuments%2Fwopi%2Ffiles%2F630_ocoh941voayu for socket #32. Terminating connection. Error: WOPI::GetFile [https://cloud.DOMAINNAME.TLD/index.php/apps/richdocuments/wopi/files/630_ocoh941voayu/contents?access_token=&access_token_ttl=0&permission=edit] failed: | wsd/RequestVettingStation.cpp:434
2024-10-04T16:51:41.208388622Z wsd-00007-00201 2024-10-04 19:51:41.208249 +0300 [ docbroker_002 ] ERR  #32: Socket write returned -1 (EPIPE: Broken pipe)| net/Socket.hpp:1484
2024-10-04T16:51:41.208405339Z wsd-00007-00201 2024-10-04 19:51:41.208285 +0300 [ docbroker_002 ] WRN  ClientSession must be known| wsd/DocumentBroker.cpp:4058
2024-10-04T16:51:41.214072476Z kit-00202-00202 2024-10-04 19:51:41.213941 +0300 [ kit_spare_006 ] ERR  Failed to stat or chown 65534:65534 /opt/cool/child-roots/7-191d10d3//linkable/opt/cool/systemplate/var/cache/fontconfig/7ef2298fde41cc6eeb7af42e48b7d293-le64.cache-8: Invalid argument missing cap_chown?, disabling linkable| kit/Kit.cpp:378
2024-10-04T16:51:41.214092914Z kit-00202-00202 2024-10-04 19:51:41.214034 +0300 [ kit_spare_006 ] ERR  link("/opt/cool/systemplate/var/cache/fontconfig/7ef2298fde41cc6eeb7af42e48b7d293-le64.cache-8", "/opt/cool/child-roots/7-191d10d3/tLJZPFN56Yk7lLqC/var/cache/fontconfig/7ef2298fde41cc6eeb7af42e48b7d293-le64.cache-8") failed: Invalid argument. Very slow copying path triggered.| kit/Kit.cpp:394
2024-10-04T16:51:41.216026191Z wsd-00007-00201 2024-10-04 19:51:41.215927 +0300 [ docbroker_002 ] ERR  #28: Read failed, have 0 buffered bytes (ECONNRESET: Connection reset by peer)| net/Socket.hpp:1156
2024-10-04T16:51:41.216043529Z wsd-00007-00201 2024-10-04 19:51:41.215964 +0300 [ docbroker_002 ] WRN  #28: Unassociated Kit (200) disconnected unexpectedly| wsd/COOLWSD.cpp:3726
2024-10-04T16:51:41.216049077Z wsd-00007-00201 2024-10-04 19:51:41.215974 +0300 [ docbroker_002 ] WRN  #28: Unknown Kit process closed with pid -1| wsd/COOLWSD.cpp:3733
2024-10-04T16:51:41.217084157Z notcoolmount: unmount failed to detach [/opt/cool/child-roots/7-191d10d3/pU3L9bmSrWjpzD9A/lo]: Operation not permitted.
2024-10-04T16:51:41.217100302Z notcoolmount: forced unmount of [/opt/cool/child-roots/7-191d10d3/pU3L9bmSrWjpzD9A/lo] failed: Operation not permitted.

WOPI has 0.0.0.0 and ::00, nextcloud logs dont seem to have anything interesting except maybe empty callback URL (is it needed? i have no idea)

Troubleshooting Steps

  1. Check Permissions:

    • Ensure that the /opt/cool/systemplate directory and its contents have the correct permissions set so that the Collabora service can read/write to it.
    • You can change the permissions with commands like:
      sudo chmod -R 755 /opt/cool/systemplate
      sudo chown -R <user>:<group> /opt/cool/systemplate
      
    • Replace <user> and <group> with the appropriate values for your setup.
  2. Update Systemplate Files:

    • Since the logs indicate that files in /opt/cool/systemplate/etc are out-of-date, consider copying the updated systemplate files. This typically involves running a command to sync the configuration files if you haven’t already.
  3. Verify WOPI Configuration:

    • Make sure that the WOPI endpoint URL configured in Collabora matches the actual URL your Nextcloud installation is using. Check your Collabora configuration file for settings like:
      <server>
        <url>https://cloud.DOMAINNAME.TLD</url>
      </server>
      
    • Additionally, ensure that the WOPI URL has the correct access tokens set up and that the Collabora server can communicate with the Nextcloud server.
  4. Review Docker Capabilities:

    • If you’re running Collabora in a Docker container, you might need to provide additional capabilities, such as --cap-add=CAP_CHOWN, to allow the container to change ownership of files. Adjust your Docker run command accordingly:
      docker run --cap-add=CAP_CHOWN ...
      
  5. Check Network Configuration:

    • Ensure that there are no network issues preventing the Collabora server from reaching the WOPI endpoint. You can test this by accessing the WOPI URL directly in a browser to see if it returns the expected response.
  6. Log Review:

    • Continuously monitor the Collabora logs after making adjustments to capture any new errors or warnings that may help further diagnose the problem.
  7. Reboot the Service:

    • After making the above changes, restart your Collabora service to ensure all configurations are reloaded correctly:
      sudo systemctl restart coolwsd
      

Thanks,
Darshan