Skip to content
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

Nextcloud 10.2.0 and SMB Shares -> Collabora not working #4376

Open
mx5gr opened this issue Jan 8, 2025 · 2 comments
Open

Nextcloud 10.2.0 and SMB Shares -> Collabora not working #4376

mx5gr opened this issue Jan 8, 2025 · 2 comments

Comments

@mx5gr
Copy link

mx5gr commented Jan 8, 2025

Steps to reproduce

  1. Sign in to Nextcloud
  2. Go to an SMB-shared directory
  3. Try to open/edit document

Expected behavior

Document should open for edit

Actual behavior

Collabora is launched, but either an error message regarding corrupted files is displayed (Read-only share) or a blank document (no contents) is shown (Read-write share)

Other information

Host OS: Ubuntu 24

Other valuable info

We are using the all-in-one docker version of nextcloud (version 10.2.0) and we have attached two external SMB shares, one as read-only and the other as read-write. The files are accessible within the nextcloud platform and we can download and/or upload them accordingly. The shares have being attached using a password locally-stored within the DB.

When we try to edit (or view) the files however using Collabora, we get two different kinds of errors...

For the Read-only share:

kit-00163-00163 2025-01-08 17:25:59.292640 +0200 [ kitbroker_003 ] ERR  ToMaster-00e: Failed to get LoKitDocument instance for [file:///tmp/user/docs/BYklEJn57xZb3AP7/oc_tmp_HPJjAj-.doc]| kit/ChildSession.cpp:927

wsd-00007-00179 2025-01-08 17:25:59.293956 +0200 [ docbroker_003 ] ERR  ToClient-00e: Document load failed: faileddocloading| wsd/ClientSession.cpp:1866

wsd-00007-00179 2025-01-08 17:25:59.294085 +0200 [ docbroker_003 ] ERR  Unexpected message: [o9 close: ].| wsd/DocumentBroker.cpp:3662

wsd-00007-00179 2025-01-08 17:25:59.294133 +0200 [ docbroker_003 ] WRN  #26: DocBroker [%2Fopt%2Fcool%2Fchild-roots%2F7-9b04fd52%2Ftmp%2Fincoming%2Fcool-QkHUmdwN2utQ3zFJ%2Foc_tmp_HPJjAj-.doc] got disconnected from its Kit (163) unexpectedly. Closing| wsd/COOLWSD.cpp:2918

frk-00013-00013 2025-01-08 17:26:01.296881 +0200 [ 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 clone dynamic elements of systemplate to the jails. To restore optimal performance, make sure the files in [/opt/cool/systemplate/etc] are up-to-date.| common/JailUtil.cpp:585

frk-00013-00013 2025-01-08 17:26:28.836511 +0200 [ 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 clone dynamic elements of systemplate to the jails. To restore optimal performance, make sure the files in [/opt/cool/systemplate/etc] are up-to-date.| common/JailUtil.cpp:585

kit-00187-00187 2025-01-08 17:26:29.236762 +0200 [ kitbroker_004 ] ERR  Failed to load: file:///tmp/user/docs/0ppBcYD5XWKX8iOn/%CE%91%CE%A0%CE%9F%CE%94%CE%9F%CE%A7%CE%97%20PARKING.doc, error: loadComponentFromURL returned an empty reference| kit/Kit.cpp:1985

kit-00187-00187 2025-01-08 17:26:29.237033 +0200 [ kitbroker_004 ] ERR  ToMaster-011: error: cmd=load kind=faileddocloading| common/Session.hpp:181

wsd-00007-00196 2025-01-08 17:26:29.237252 +0200 [ docbroker_004 ] ERR  ToClient-011: Document load failed: faileddocloading| wsd/ClientSession.cpp:1866
Failed to load the document. Setting TerminationFlagwsd-00007-00196 2025-01-08 17:26:29.237504 +0200 [ docbroker_004 ] ERR  Unexpected message: [o21 close: ].| wsd/DocumentBroker.cpp:3662

kit-00187-00187 2025-01-08 17:26:29.238150 +0200 [ kitbroker_004 ] FTL  Failed to load the document. Setting TerminationFlag| kit/Kit.cpp:2012

wsd-00007-00196 2025-01-08 17:26:29.238298 +0200 [ docbroker_004 ] WRN  #27: DocBroker [https%3A%2F%2Fmy.server.com%3A443%2Findex.php%2Fapps%2Frichdocuments%2Fwopi%2Ffiles%2F663770_ocnnlf8dlzvu] got disconnected from its Kit (187) unexpectedly. Closing| wsd/COOLWSD.cpp:2918

kit-00187-00187 2025-01-08 17:26:29.238242 +0200 [ kitbroker_004 ] ERR  ToMaster-011: Failed to get LoKitDocument instance for [file:///tmp/user/docs/0ppBcYD5XWKX8iOn/%CE%91%CE%A0%CE%9F%CE%94%CE%9F%CE%A7%CE%97%20PARKING.doc]| kit/ChildSession.cpp:927

kit-00187-00187 2025-01-08 17:26:29.237033 +0200 [ kitbroker_004 ] ERR  ToMaster-011: error: cmd=load kind=faileddocloading| common/Session.hpp:181

wsd-00007-00196 2025-01-08 17:26:29.237252 +0200 [ docbroker_004 ] ERR  ToClient-011: Document load failed: faileddocloading| wsd/ClientSession.cpp:1866
Failed to load the document. Setting TerminationFlagwsd-00007-00196 2025-01-08 17:26:29.237504 +0200 [ docbroker_004 ] ERR  Unexpected message: [o21 close: ].| wsd/DocumentBroker.cpp:3662

kit-00187-00187 2025-01-08 17:26:29.238150 +0200 [ kitbroker_004 ] FTL  Failed to load the document. Setting TerminationFlag| kit/Kit.cpp:2012

wsd-00007-00196 2025-01-08 17:26:29.238298 +0200 [ docbroker_004 ] WRN  #27: DocBroker [https%3A%2F%2Fthemis.photopoulos.com%3A443%2Findex.php%2Fapps%2Frichdocuments%2Fwopi%2Ffiles%2F663770_ocnnlf8dlzvu] got disconnected from its Kit (187) unexpectedly. Closing| wsd/COOLWSD.cpp:2918

kit-00187-00187 2025-01-08 17:26:29.238242 +0200 [ kitbroker_004 ] ERR  ToMaster-011: Failed to get LoKitDocument instance for [file:///tmp/user/docs/0ppBcYD5XWKX8iOn/%CE%91%CE%A0%CE%9F%CE%94%CE%9F%CE%A7%CE%97%20PARKING.doc]| kit/ChildSession.cpp:927

Regarding the SMB Read-write share however, the behavior is totally different:

frk-00013-00013 2025-01-08 17:28:07.390352 +0200 [ 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 clone dynamic elements of systemplate to the jails. To restore optimal performance, make sure the files in [/opt/cool/systemplate/etc] are up-to-date.| common/JailUtil.cpp:585

wsd-00007-00028 2025-01-08 17:28:08.123105 +0200 [ websrv_poll ] ERR  FileServerRequestHandler: File not found: Invalid URI request (hash): [/browser/a4b67a7664/src/layer/tile/TileWorker.js].| wsd/FileServer.cpp:780

In both cases, however, either Collabora launches with an error being displayed regarding "corrupted files" (R/O case), whereas in the latter case (RW share), Collabora opens the document but its contents are empty.

Only files that are stored within the local Nextcloud storage can be opened/edited by Collabora, at this time.

Any help? ;)

@joshtrichards
Copy link
Member

Do you have any log entries from your Nextcloud during these attempts?

@mx5gr
Copy link
Author

mx5gr commented Jan 19, 2025

Unfortunately, the nextcloud log within the respective docker container shows nothing, when the above occur (true server name replaced by "myserver.mycompany.com"):

System config value one-click-instance.link set to string https://nextcloud.com/all-in-one/
support already enabled
Adjusting log files...
System config value upgrade.cli-upgrade-link set to string https://github.com/nextcloud/all-in-one/discussions/2726
System config value logfile set to string /var/www/html/data/nextcloud.log
Config value were not updated
System config value updatedirectory set to string /nc-updater
System config value maintenance_window_start set to integer 100
Applying network settings...
System config value allow_local_remote_servers set to boolean true
System config value davstorage.request_timeout set to integer 3600
System config value trusted_domains => 1 set to string myserver.mycompany.com
System config value overwrite.cli.url set to string https://myserver.mycompany.com/
System config value documentation_url.server_logs set to string https://github.com/nextcloud/all-in-one/discussions/5425
System config value htaccess.RewriteBase set to string /
.htaccess has been updated
System config value dbpersistent set to boolean false
System config value auth.bruteforce.protection.enabled set to boolean true
System config value ratelimit.protection.enabled set to boolean true
System config value files_external_allow_create_new_local set to boolean true
notify_push is up-to-date or no updates could be found
System config value trusted_proxies => 0 set to string 127.0.0.1
System config value trusted_proxies => 1 set to string ::1
System config value trusted_proxies => 10 set to string 172.18.0.0/16
Config value were not updated
+ echo nextcloud-aio-collabora
+ grep -q 'nextcloud-.*-collabora'
+ COLLABORA_HOST=myserver.mycompany.com
+ set +x
richdocuments is up-to-date or no updates could be found
Config value were not updated
No ipv6-address found for myserver.mycompany.com.
Config value were not updated
System config value enabledPreviewProviders => 0 set to string OC\Preview\Imaginary
System config value enabledPreviewProviders => 23 set to string OC\Preview\ImaginaryPDF
System config value preview_imaginary_url set to string http://nextcloud-aio-imaginary:9000
System config value preview_imaginary_key set to string e217f4d6414934d17b5bced9117fe878e3280ddb3307a37b
Connection to nextcloud-aio-fulltextsearch (172.18.0.5) 9200 port [tcp/*] succeeded!
fulltextsearch is up-to-date or no updates could be found
fulltextsearch_elasticsearch is up-to-date or no updates could be found
files_fulltextsearch is up-to-date or no updates could be found
{
    "search_platform": "OCA\\FullTextSearch_Elasticsearch\\Platform\\ElasticSearchPlatform",
    "app_navigation": "0",
    "provider_indexed": "",
    "cron_err_reset": "1736934667",
    "tick_ttl": "1800",
    "collection_indexing_list": "50",
    "migration_24": "1",
    "collection_internal": "local"
}
{
    "elastic_host": "http:\/\/elastic:35e8ce0dce3b09c167803118be3c91b9dd74c4569e68fe34@nextcloud-aio-fulltextsearch:9200",
    "elastic_index": "nextcloud-aio",
    "fields_limit": "10000",
    "es_ver_below66": "0",
    "elastic_logger_enabled": "true",
    "analyzer_tokenizer": "standard",
    "allow_self_signed_cert": "false"
}
{
    "files_local": "0",
    "files_external": "1",
    "files_group_folders": "0",
    "files_encrypted": "0",
    "files_federated": "0",
    "files_size": "20",
    "files_pdf": "1",
    "files_office": "1",
    "files_image": "0",
    "files_audio": "0",
    "files_chunk_size": "2",
    "files_open_result_directly": "1"
}
+ '[' true = true ']'
+ '[' 11000 = 443 ']'
+ set +x
Waiting for Apache to become available...
[19-Jan-2025 06:03:27] NOTICE: fpm is running, pid 266
[19-Jan-2025 06:03:27] NOTICE: ready to handle connections
Connection to nextcloud-aio-apache (172.18.0.10) 11000 port [tcp/*] succeeded!
Activating Collabora config...
✓ Reset callback url autodetect
Checking configuration
🛈 Configured WOPI URL: https://myserver.mycompany.com
🛈 Configured public WOPI URL: https://myserver.mycompany.com
🛈 Configured callback URL: 
✓ Fetched /hosting/discovery endpoint
✓ Valid mimetype response
✓ Valid capabilities entry
✓ Fetched /hosting/capabilities endpoint
✓ Detected WOPI server: Collabora Online Development Edition 24.04.11.1
Collabora URL (used for Nextcloud to contact the Collabora server):
  https://myserver.mycompany.com
Collabora public URL (used in the browser to open Collabora):
  https://myserver.mycompany.com
Callback URL (used by Collabora to connect back to Nextcloud):
  autodetected (will use the same URL as your user for browsing Nextcloud)

Within the Nextcloud platform, unrelated to the actions in the platform during file navigation and/or actions (i.e. open file for edit etc), we get in the nextcloud logs, which appears several times and seems to be related to some kind of nextcloud/collabora initialization (for example, if something has been changed within the "Office" tab configuration within the Nextcloud platform):

Exception
Path cannot be empty in file '/var/www/html/custom_apps/richdocuments/lib/Service/RemoteService.php' line 64

Nothing else is logged within nextcloud.

Within collabora, we get the following every time we try to open a file from a read-write SMB share or when nextcloud tries to make a document preview icon during directory listing:

frk-00019-00019 2025-01-19 13:17:56.719662 +0200 [ 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 clone dynamic elements of systemplate to the jails. To restore optimal performance, make sure the files in [/opt/cool/systemplate/etc] are up-to-date.| common/JailUtil.cpp:587

kit-00359-00359 2025-01-19 13:17:57.087155 +0200 [ kitbroker_00c ] ERR  Failed to load: file:///tmp/user/docs/RM0zl850EpeJ0EAE/oc_tmp_inLJnN-.doc, error: loadComponentFromURL returned an empty reference| kit/Kit.cpp:1944

kit-00359-00359 2025-01-19 13:17:57.089068 +0200 [ kitbroker_00c ] ERR  ToMaster-026: error: cmd=load kind=faileddocloading| common/Session.hpp:181

Failed to load the document. Setting TerminationFlag

kit-00359-00359 2025-01-19 13:17:57.089530 +0200 [ kitbroker_00c ] FTL  Failed to load the document. Setting TerminationFlag| kit/Kit.cpp:1971

kit-00359-00359 2025-01-19 13:17:57.089607 +0200 [ kitbroker_00c ] ERR  ToMaster-026: Failed to get LoKitDocument instance for [file:///tmp/user/docs/RM0zl850EpeJ0EAE/oc_tmp_inLJnN-.doc]| kit/ChildSession.cpp:935

wsd-00007-00379 2025-01-19 13:17:57.090142 +0200 [ docbroker_00c ] ERR  ToClient-026: Document load failed: faileddocloading| wsd/ClientSession.cpp:1982

wsd-00007-00379 2025-01-19 13:17:57.093128 +0200 [ docbroker_00c ] ERR  Unexpected message: [o327 close: ].| wsd/DocumentBroker.cpp:3665

wsd-00007-00379 2025-01-19 13:17:57.093295 +0200 [ docbroker_00c ] WRN  #23: DocBroker [%2Fopt%2Fcool%2Fchild-roots%2F7-22ef610e%2Ftmp%2Fincoming%2Fcool-OGCNS5gHT4SCXxzg%2Foc_tmp_inLJnN-.doc] got disconnected from its Kit (359) unexpectedly. Closing| wsd/COOLWSD.cpp:2735

kit-00377-00377 2025-01-19 13:17:57.446190 +0200 [ kitbroker_00d ] ERR  Failed to load: file:///tmp/user/docs/TyMzUIErzkr2lHMi/oc_tmp_GNHdop-.doc, error: loadComponentFromURL returned an empty reference| kit/Kit.cpp:1944

kit-00377-00377 2025-01-19 13:17:57.446226 +0200 [ kitbroker_00d ] ERR  ToMaster-027: error: cmd=load kind=faileddocloading| common/Session.hpp:181

wsd-00007-00387 2025-01-19 13:17:57.446330 +0200 [ docbroker_00d ] ERR  ToClient-027: Document load failed: faileddocloading| wsd/ClientSession.cpp:1982

wsd-00007-00387 2025-01-19 13:17:57.446440 +0200 [ docbroker_00d ] ERR  Unexpected message: [o330 close: ].| wsd/DocumentBroker.cpp:3665

wsd-00007-00387 2025-01-19 13:17:57.446467 +0200 [ docbroker_00d ] WRN  #27: DocBroker [%2Fopt%2Fcool%2Fchild-roots%2F7-22ef610e%2Ftmp%2Fincoming%2Fcool-JBOanTPWVnLXPEnu%2Foc_tmp_GNHdop-.doc] got disconnected from its Kit (377) unexpectedly. Closing| wsd/COOLWSD.cpp:2735

Failed to load the document. Setting TerminationFlag

kit-00377-00377 2025-01-19 13:17:57.446606 +0200 [ kitbroker_00d ] FTL  Failed to load the document. Setting TerminationFlag| kit/Kit.cpp:1971

kit-00377-00377 2025-01-19 13:17:57.446623 +0200 [ kitbroker_00d ] ERR  ToMaster-027: Failed to get LoKitDocument instance for [file:///tmp/user/docs/TyMzUIErzkr2lHMi/oc_tmp_GNHdop-.doc]| kit/ChildSession.cpp:935

frk-00019-00019 2025-01-19 13:17:57.473128 +0200 [ 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 clone dynamic elements of systemplate to the jails. To restore optimal performance, make sure the files in [/opt/cool/systemplate/etc] are up-to-date.| common/JailUtil.cpp:587

frk-00019-00019 2025-01-19 13:19:10.870175 +0200 [ 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 clone dynamic elements of systemplate to the jails. To restore optimal performance, make sure the files in [/opt/cool/systemplate/etc] are up-to-date.| common/JailUtil.cpp:587

kit-00457-00457 2025-01-19 13:19:11.204203 +0200 [ kitbroker_014 ] ERR  Failed to load: file:///tmp/user/docs/5PrwUiSxUmatIlkJ/%CE%91%CE%94%CE%95%CE%99%CE%95%CE%A3%202010.doc, error: loadComponentFromURL returned an empty reference| kit/Kit.cpp:1944

kit-00457-00457 2025-01-19 13:19:11.204315 +0200 [ kitbroker_014 ] ERR  ToMaster-032: error: cmd=load kind=faileddocloading| common/Session.hpp:181

wsd-00007-00475 2025-01-19 13:19:11.204391 +0200 [ docbroker_014 ] ERR  ToClient-032: Document load failed: faileddocloading| wsd/ClientSession.cpp:1982

wsd-00007-00475 2025-01-19 13:19:11.204818 +0200 [ docbroker_014 ] ERR  Unexpected message: [o360 close: ].| wsd/DocumentBroker.cpp:3665

wsd-00007-00475 2025-01-19 13:19:11.204940 +0200 [ docbroker_014 ] WRN  #22: DocBroker [https%3A%2F%2Fmyserver.company.com%3A443%2Findex.php%2Fapps%2Frichdocuments%2Fwopi%2Ffiles%2F772701_ocnnlf8dlzvu] got disconnected from its Kit (457) unexpectedly. Closing| wsd/COOLWSD.cpp:2735

Failed to load the document. Setting TerminationFlag

kit-00457-00457 2025-01-19 13:19:11.205288 +0200 [ kitbroker_014 ] FTL  Failed to load the document. Setting TerminationFlag| kit/Kit.cpp:1971

kit-00457-00457 2025-01-19 13:19:11.205311 +0200 [ kitbroker_014 ] ERR  ToMaster-032: Failed to get LoKitDocument instance for [file:///tmp/user/docs/5PrwUiSxUmatIlkJ/%CE%91%CE%94%CE%95%CE%99%CE%95%CE%A3%202010.doc]| kit/ChildSession.cpp:935

If you refer to another log, please let me know...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants