Richdocuments failing to open documents after upgrade

Support intro

Sorry to hear you’re facing problems. :slightly_frowning_face:

The community help forum (help.nextcloud.com) is for home and non-enterprise users. Support is provided by other community members on a best effort / “as available” basis. All of those responding are volunteering their time to help you.

If you’re using Nextcloud in a business/critical setting, paid and SLA-based support services can be accessed via portal.nextcloud.com where Nextcloud engineers can help ensure your business keeps running smoothly.

Getting help

In order to help you as efficiently (and quickly!) as possible, please fill in as much of the below requested information as you can.

Before clicking submit: Please check if your query is already addressed via the following resources:

(Utilizing these existing resources is typically faster. It also helps reduce the load on our generous volunteers while elevating the signal to noise ratio of the forums otherwise arising from the same queries being posted repeatedly).

Some or all of the below information will be requested if it isn’t supplied; for fastest response please provide as much as you can. :heart:

The Basics

  • Nextcloud Server version (e.g., 29.x.x):
    • 31.0.5.1
  • Operating system and version (e.g., Ubuntu 24.04):
    • 24.04.2 LTS
  • Web server and version (e.g, Apache 2.4.25):
    • nginx 1.28.0
  • Reverse proxy and version _(e.g. nginx 1.27.2)
    • nginx 1.28.0
  • PHP version (e.g, 8.3):
    • 8.3.6
  • Is this the first time you’ve seen this error? (Yes / No):
    • Yes
  • When did this problem seem to first start?
    • After upgrading richdocuments and/or NextCloud
  • Installation method (e.g. AlO, NCP, Bare Metal/Archive, etc.)
    • Bare Metal
  • Are you using CloudfIare, mod_security, or similar? (Yes / No)
    • No

Summary of the issue you are facing:

[in short : after upgrading ( both nextcloud and apps ) , I get error when I access any documents handled by RIchdocuments App. Everything else seems to be working fine.
whenever I click on a document ( docx, odt, xlsx, …) I get an error message saying

Failed to establish socket connection or socket connection closed unexpectedly. The reverse proxy might be misconfigured, please contact the administrator. For more info on proxy configuration please checkout Proxy settings — SDK https://sdk.collaboraonline.com/ documentation]

Steps to replicate it (hint: details matter!):

  1. Just click on any document handled in richdocuments ( e.g. test.docx )

Log entries

Nextcloud

Please provide the log entries from your Nextcloud log that are generated during the time of problem (via the Copy raw option from Administration settings->Logging screen or from your nextcloud.log located in your data directory). Feel free to use a pastebin/gist service if necessary.

I don't see any entries in the Nextcloud log. Maybe because the problem occurs in collabora

Web Browser

If the problem is related to the Web interface, open your browser inspector Console and Network tabs while refreshing (reloading) and reproducing the problem. Provide any relevant output/errors here that appear.

Web server / Reverse Proxy

The output of your Apache/nginx/system log in /var/log/____:

this is from collabora-access.log

192.168.10.16 - - [18/May/2025:22:48:17 +0000] "GET /cool/https%3A%2F%2Fnextcloud.middelf.art%2Findex.php%2Fapps%2Frichdocuments%2Fwopi%2Ffiles%2F467970_ocaqw24ymq8c%3Faccess_token%3D4qtMrtnd6CD0je32rgqzzr4YdHCblgGk%26access_token_ttl%3D0/ws?WOPISrc=https%3A%2F%2Fnextcloud.middelf.art%2Findex.php%2Fapps%2Frichdocuments%2Fwopi%2Ffiles%2F467970_ocaqw24ymq8c&compat=/ws HTTP/1.1" 403 0 "-" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:138.0) Gecko/20100101 Firefox/138.0"
192.168.10.16 - - [18/May/2025:22:48:17 +0000] "GET /cool/https%3A%2F%2Fnextcloud.middelf.art%2Findex.php%2Fapps%2Frichdocuments%2Fwopi%2Ffiles%2F467970_ocaqw24ymq8c%3Faccess_token%3D4qtMrtnd6CD0je32rgqzzr4YdHCblgGk%26access_token_ttl%3D0%26permission%3Dedit/ws?WOPISrc=https%3A%2F%2Fnextcloud.middelf.art%2Findex.php%2Fapps%2Frichdocuments%2Fwopi%2Ffiles%2F467970_ocaqw24ymq8c&compat=/ws HTTP/1.1" 403 0 "-" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:138.0) Gecko/20100101 Firefox/138.0"

Configuration

Nextcloud

The output of occ config:list system or similar is best, but, if not possible, the contents of your config.php file from /path/to/nextcloud is fine (make sure to remove any identifiable information!):

occ config:list system
{
    "system": {
        "instanceid": "***REMOVED SENSITIVE VALUE***",
        "passwordsalt": "***REMOVED SENSITIVE VALUE***",
        "secret": "***REMOVED SENSITIVE VALUE***",
        "trusted_domains": [
            "nextcloud.middelf.art"
        ],
        "datadirectory": "***REMOVED SENSITIVE VALUE***",
        "dbtype": "pgsql",
        "version": "31.0.5.1",
        "overwrite.cli.url": "https:\/\/nextcloud.middelf.art",
        "dbname": "***REMOVED SENSITIVE VALUE***",
        "dbhost": "***REMOVED SENSITIVE VALUE***",
        "dbport": "",
        "dbtableprefix": "oc_",
        "dbuser": "***REMOVED SENSITIVE VALUE***",
        "dbpassword": "***REMOVED SENSITIVE VALUE***",
        "installed": true,
        "htaccess_RewriteBase": "\/",
        "default_phone_region": "DA",
        "memcache.local": "\\OC\\Memcache\\Redis",
        "memcache.distributed": "\\OC\\Memcache\\Redis",
        "memcache.locking": "\\OC\\Memcache\\Redis",
        "redis": {
            "host": "***REMOVED SENSITIVE VALUE***",
            "port": 0
        },
        "trusted_proxies": "***REMOVED SENSITIVE VALUE***",
        "maintenance": false,
        "theme": "",
        "loglevel": 2,
        "mail_from_address": "***REMOVED SENSITIVE VALUE***",
        "mail_smtpmode": "smtp",
        "mail_sendmailmode": "smtp",
        "mail_domain": "***REMOVED SENSITIVE VALUE***",
        "mail_smtphost": "***REMOVED SENSITIVE VALUE***",
        "mail_smtpport": "587",
        "mail_smtpauth": 1,
        "mail_smtpname": "***REMOVED SENSITIVE VALUE***",
        "mail_smtppassword": "***REMOVED SENSITIVE VALUE***",
        "twofactor_enforced": "false",
        "twofactor_enforced_groups": [
            "users"
        ],
        "twofactor_enforced_excluded_groups": [
            "admin"
        ],
        "memories.exiftool": "\/var\/www\/nextcloud\/apps\/memories\/bin-ext\/exiftool-amd64-glibc",
        "memories.vod.path": "\/var\/www\/nextcloud\/apps\/memories\/bin-ext\/go-vod-amd64",
        "preview_libreoffice_path": "\/usr\/bin\/libreoffice",
        "enable_previews": true,
        "enabledPreviewProviders": [
            "OC\\Preview\\OpenDocument",
            "OC\\Preview\\MSOffice2007",
            "OC\\Preview\\MSOffice2010",
            "OC\\Preview\\Movie",
            "OC\\Preview\\Image",
            "OC\\Preview\\HEIC",
            "OC\\Preview\\TXT",
            "OC\\Preview\\MarkDown",
            "OC\\Preview\\PDF"
        ],
        "app_install_overwrite": [
            "sharingpath",
            "holiday_calendars",
            "printer",
            "files_rightclick",
            "drawio"
        ],
        "memories.vod.ffmpeg": "\/usr\/bin\/ffmpeg",
        "memories.vod.ffprobe": "\/usr\/bin\/ffprobe",
        "maintenance_window_start": 1,
        "memories.db.triggers.fcu": true,
        "memories.gis_type": 2
    }
}

Apps

The output of occ app:list (if possible).
occ app:list
Enabled:

  • activity: 4.0.0
  • analytics: 5.4.0
  • app_api: 5.0.2
  • bruteforcesettings: 4.0.0
  • calendar: 5.2.4
  • circles: 31.0.0
  • cloud_federation_api: 1.14.0
  • comments: 1.21.0
  • contacts: 7.1.0
  • contactsinteraction: 1.12.0
  • dashboard: 7.11.0
  • dav: 1.33.0
  • deck: 1.15.1
  • drawio: 3.1.0
  • external: 6.0.2
  • federatedfilesharing: 1.21.0
  • federation: 1.21.0
  • files: 2.3.1
  • files_3dmodelviewer: 0.0.15
  • files_automatedtagging: 2.0.0
  • files_confidential: 3.2.0
  • files_downloadlimit: 4.0.0
  • files_external: 1.23.0
  • files_pdfviewer: 4.0.0
  • files_reminders: 1.4.0
  • files_sharing: 1.23.1
  • files_trashbin: 1.21.0
  • files_versions: 1.24.0
  • firstrunwizard: 4.0.0
  • groupfolders: 19.0.4
  • logreader: 4.0.0
  • lookup_server_connector: 1.19.0
  • mail: 5.0.7
  • memories: 7.5.2
  • music: 2.1.4
  • nextcloud_announcements: 3.0.0
  • notes: 4.12.0
  • notifications: 4.0.0
  • notify_push: 1.1.0
  • oauth2: 1.19.1
  • password_policy: 3.0.0
  • phonetrack: 0.8.2
  • photos: 4.0.0-dev.1
  • previewgenerator: 5.8.0
  • privacy: 3.0.0
  • profile: 1.0.0
  • provisioning_api: 1.21.0
  • quota_warning: 1.21.0
  • recognize: 9.0.1
  • recommendations: 4.0.0
  • related_resources: 2.0.0
  • richdocuments: 8.6.5
  • serverinfo: 3.0.0
  • settings: 1.14.0
  • sharebymail: 1.21.0
  • spreed: 21.0.4
  • support: 3.0.0
  • survey_client: 3.0.0
  • systemtags: 1.21.1
  • text: 5.0.0
  • theming: 2.6.1
  • twofactor_backupcodes: 1.20.0
  • twofactor_totp: 13.0.0-dev.0
  • updatenotification: 1.21.0
  • user_status: 1.11.0
  • viewer: 4.0.0
  • weather_status: 1.11.0
  • webhook_listeners: 1.2.0
  • workflow_media_converter: 1.13.5
  • workflow_ocr: 1.31.0
  • workflowengine: 2.13.0
    Disabled:
  • admin_audit: 1.21.0
  • encryption: 2.19.0
  • sharingpath: 0.4.4 (installed 0.4.4)
  • suspicious_login: 9.0.1
  • twofactor_nextcloud_notification: 5.0.0
  • user_ldap: 1.22.0

Tips for increasing the likelihood of a response

  • Use the preformatted text formatting option in the editor for all log entries and configuration output.
  • If screenshots are useful, feel free to include them.
    • If possible, also include key error output in text form so it can be searched for.
  • Try to edit log output only minimally (if at all) so that it can be ran through analyzers / formatters by those trying to help you.

The problem is more or less clear from your screenshot - the request to https://collabora.../cool/.. is denied. 403 is an “active” response - it’s not failed network connection or timeout this error was intentionally created by some system.. The remaining question is which component is responsible for it? please check all involved components one-by one to find which of the systems generate 403. do you have any other protection measures in place like fail2ban or crowdsec? where the collabora-access.log comes from? is it a reverse proxy? to which system belongs the IP 192.168.10.16

1 Like

just a hunch, error 403 forbidden is also displayed when the secretpasswordkey is not long enough, see troubleshooting Talk:HPB, but since you’re not using the docker image… just guessing.

1 Like

Just a quick update
I guess your hints were kind of leading in the clever direction but as usual - what did the trick was indeed a bit surprising. Well to me at least - given the symptoms and the timing (immediately following an upgrade of 1) the richdocuments app, 2) Nextcloud itselv and finally 3) collaborate CODE ( using apt update/upgrade )
Anyway, what made things work again was to change the folowing in /etc/coolwsd/coolwsd.xml :

stuff that worked previously but not anymore:

<server_name default="" desc="External hostname:port of the server running coolwsd. If empty, it's derived from the request (please set it if this doesn't work). May be specified when behind a reverse-proxy or when the hostname is not reachable directly." type="string">https://collabora.middelf.art:443</server_name>

stuff that works now:

<server_name default="" desc="External hostname:port of the server running coolwsd. If empty, it's derived from the request (please set it if this doesn't work). May be specified when behind a reverse-proxy or when the hostname is not reachable directly." type="string"></server_name>

i.e. letting hostname and port be derived at runtime.
Quite frankly, I don’t remember if I ever tried to NOT set the hostname:port but in conclusion, nothing wrong with Nextcloud / richdocuments app nor with nvginx for that matter
The (somewhat embarrassing) root cause seems to be lack of understanding the Collaborate configuration file and its features in details. In fact, my previous configuration may have been working by coincidence.

Hopefully, someone may find this useful, although somewhat lenghty

2 Likes