Collabora cannot connect - cURL error 60 - disable cert set

NOTE: Newbie to admin. Managed to get NextOffice and Collabora working in Jan of 2024 using snap and this forum.

The Basics

  • Nextcloud Server version: 30.0.4
  • Operating system and version: Ubuntu 22.04.5 LTS
  • Web server and version: Apache - not sure which version, managed by snap
  • Reverse proxy and version: Apache (I guess? Not sure how to check)
  • PHP version: 8.2.26
  • Is this the first time you’ve seen this error? (Yes / No): Yes
  • When did this problem seem to first start?: I haven’t used Office docs in awhile, so anytime between Jan of 2024 and now.
  • Installation method: snap
  • Are you using Cloudflare, mod_security, or similar? (Yes / No): I don’t think so. Everything is local

Summary of the issue you are facing:

I cannot load Office documents - I get the never-ending spinner of death/doom/despair.

I see errors on the admin page (see full log below)
[richdocuments] Error: Failed to convert preview: cURL error 28: Operation timed out after 5000 milliseconds with 0 bytes received

When I run cURL from the CLI with same URL, I get:
curl: (60) SSL certificate problem: self-signed certificate
More details here: curl - SSL CA Certificates

When I look at the NextCloud Office admin page, I see two errors show up:

Failed to connect to the remote server: Could not find urlsrc for application/vnd.openxmlformats-officedocument.wordprocessingml.document in WOPI discovery response

AND

our browser has been unable to connect to the Collabora server: http://localhost/extra-apps/richdocumentscode/proxy.php?req=

NOTE:
I have “Disable Certificate Verification” checked in the Admin/Nextcloud Office page.

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

Log into my Nextcloud, navigate to Files and try to open a document, spreadsheet or other supported Office document. See above for troubleshooting that I’ve done so far.

Log entries

Nextcloud

“message”:“Failed to convert preview: cURL error 28: Operation timed out after 5000 milliseconds with 0 bytes received (see libcurl - Error Codes) for https://localhost/extra-apps/richdocumentscode/proxy.php?req=/cool/convert-to/png",“exception”:[],“CustomMessage”:"Failed to convert preview: cURL error 28: Operation timed out after 5000 milliseconds with 0 bytes received (see libcurl - Error Codes) for https://localhost/extra-apps/richdocumentscode/proxy.php?req=/cool/convert-to/png"},“id”:"6761903eadd7b”}

(Pastebin for rest of raw: {"reqId":"R56UemJ3RltXCoh8E4wo","level":3,"time":"2024-12-17T13:58:49+00:00","re - Pastebin.com)

Web server / Reverse Proxy

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

NOT SURE HOW TO GET THIS FOR SNAP.

Configuration

Nextcloud

{
“system”: {
“apps_paths”: [
{
“path”: “/snap/nextcloud/current/htdocs/apps”,
“url”: “/apps”,
“writable”: false
},
{
“path”: “/var/snap/nextcloud/current/nextcloud/extra-apps”,
“url”: “/extra-apps”,
“writable”: true
}
],
“supportedDatabases”: [
“mysql”
],
“memcache.locking”: “\OC\Memcache\Redis”,
“memcache.local”: “\OC\Memcache\Redis”,
“redis”: {
“host”: “REMOVED SENSITIVE VALUE”,
“port”: 0
},
“log_type”: “file”,
“logfile”: “/var/snap/nextcloud/current/logs/nextcloud.log”,
“logfilemode”: 416,
“passwordsalt”: “REMOVED SENSITIVE VALUE”,
“secret”: “REMOVED SENSITIVE VALUE”,
“trusted_domains”: [
“localhost”,
“192.168.86.40”,
“192.168.86.*”,
“shortennc.myddns.me”,
“(NC SERVER NAME REMOVED)”
],
“datadirectory”: “REMOVED SENSITIVE VALUE”,
“dbtype”: “mysql”,
“version”: “30.0.4.1”,
“overwrite.cli.url”: “http://localhost”,
“dbname”: “REMOVED SENSITIVE VALUE”,
“dbhost”: “REMOVED SENSITIVE VALUE”,
“dbport”: “”,
“dbtableprefix”: “oc_”,
“mysql.utf8mb4”: true,
“dbuser”: “REMOVED SENSITIVE VALUE”,
“dbpassword”: “REMOVED SENSITIVE VALUE”,
“installed”: true,
“instanceid”: “REMOVED SENSITIVE VALUE”,
“allow_local_remote_servers”: true,
“maintenance”: false,
“mail_from_address”: “REMOVED SENSITIVE VALUE”,
“mail_smtpmode”: “smtp”,
“mail_sendmailmode”: “smtp”,
“mail_domain”: “REMOVED SENSITIVE VALUE”,
“mail_smtphost”: “REMOVED SENSITIVE VALUE”,
“mail_smtpport”: “465”,
“mail_smtpauth”: 1,
“mail_smtpname”: “REMOVED SENSITIVE VALUE”,
“mail_smtppassword”: “REMOVED SENSITIVE VALUE”,
“loglevel”: 2,
“theme”: “”,
“maintenance_window_start”: 1
}
}

Apps

===
I’ve browsed a number of topics, but the threads seem to end w/out a resolution listed. If I get this solved, I’ll put the answer here.

yeah, thanks for that :+1:

Appreciate the link. I’ve looked at that thread before posting my own. I’m not on nginx or any sort of container/VM - this is straight to the machine installation. This was working back in Jan/Feb of this year, but somehow, with an update, it’s broken. I didn’t notice it until now. So at some point, something changed. It wouldn’t be with my network setup, as other functions of NC work and I’ve not altered anything.

Comment by scubamuc scubamuc - Release 30.0.4snap1
nextcloud-snap:master ← pachulo:release/30.0.4snap1
fresh install completed without issues

Not sure what the suggestion is here? I don’t want to lose what I’ve already got set up?

this two problems likely belong together but this will definitely never work as long you are using localhost (and really hard to make Office work with self-signed certs)

really? and you never find Collabora integration guide with detailed explanation of the protocol and your issues?

really? and you never find Collabora integration guide with detailed explanation of the protocol and your issues?

Yes, really. I’ve worked through various guides prior, as I explained, and things were working. Now, suddenly, they are not. :frowning: Thank you.

I’ve tried it with both the hostname and with localhost. Prior, it worked with localhost. Now, it doesn’t work with either.

  1. “from the client, verify access to the Nextcloud UI (use a browser or run curl https:///status.php)”
    #DONE - SUCCESSFUL

  2. from the client, verify access to Collabora (use browser or run curl https:///extra-apps/richdocumentscode/proxy.php?req=/hosting/discovery

curl -k https:///extra-apps/richdocumentscode/proxy.php?req=/hosting/discovery
Socket proxy error

Error: no_fontconfig

#Installed fontconfig via apt-get and rebooted
#Reran, came up with info
#DONE

  1. from Nextcloud, verify access to Collabora (from console run curl https:///extra-apps/richdocumentscode/proxy.php?req=/hosting/discovery)
    #DONE - RESULTS RETURNED, note that I ran with -k to ignore the SSL self-sign issue

  2. from Collabora, verify access to the Nextcloud UI (from console run curl https:///status.php)
    #DONE - RESULTS RETURNED, with -k

  3. richdocuments already installed.

  4. configure CODE server URL
    6.a. nextcloud.occ config:app:set richdocuments wopi_url --value ${CODE_URL}

#instead of literally “${CODE_URL}”, used “https:///extra-apps/richdocumentscode/proxy.php?req=”
#DONE

6.b. nextcloud.occ richdocuments:activate-config
#ERROR
Failed to fetch discovery endpoint from https://sholinux1/extra-apps/richdocumentscode/proxy.php?req=
Server error: GET https://<SERVERNAME>/extra-apps/richdocumentscode/proxy.php?req=/hosting/discovery resulted in a 503 Service Unavailable response:


SO why doesn’t that URL work through nextcloud, if it works through curl -k? That’s a different error now, and I didn’t do anything except reboot?

likely because there is no (reverse proxy?) config for sholinux1 likely you didn’t test the same using curl and this is the reason why you got different results. and again please stop wasting time while trying to make it work with self-signed certificates!