I am running Nextcloud Hub 7 28.0.1 on a KVM server. Nextcloud is working fine, but I canāt get Nextcloud Office to work. Iāve installed the Built-In CODE app (donāt want to install my own Collabora server just yet), then the Nexcloud Office app. I get the following error:
ConnectException cURL error 28: Operation timed out after 45002 milliseconds with 0 bytes received
Sometimes I am also getting this error:
Failed to fetch the Collabora capabilities endpoint: ClientException Client error: GET (link)/apps/richdocumentscode/proxy.php?req=/hosting/capabilities resulted in a 404 Not Found
I read on a thread titled āCollabra online not able to connect to nextcloud server](Collabra online not able to connect to nextcloud server)ā (sorry, canāt post more than 4 links as a new member) that it might be a DNS issue. I also found the following advice in nextcloud admin_manual/office/troubleshooting: āMake sure that the Nextcloud instance is able to reach itself using the same hostname that is used to access through the browser. You might want to add your Nextcloud domain to /etc/hosts to ensure the connectivity if DNS resolution doesnāt work for this: "
127.0.0.1 cloud.yourdomain.comā
My question is: How do I make sure that NC is āable to reach itselfā?
I did also try to edit my etc/hosts file. According to the thread above, it says to remove 127.0.0.1, but the website says to ADD it! Which is it?
I added the last line, and Iāve experimented with commenting out different lines, to no avail. Any help would be appreciated.
In case it helps, this is what Nextcloud system is listing:
Operating System: Linux 3.10.0-1160.71.1.el7.x86_64 x86_64
DNS: 100.100.100.17
IPv4: 127.0.0.1
IPv6: ::1
PHP Version: 8.1.26
The error shows DNS resolution fails for whatever reason. your āregularā DNS resolution fails to resolve the public fqdn of the server you need to add the FQDN+IP to /etc/hosts. the hosts file you posted looks good IMHO but the question is if your cloud is using this hosts file (or another one if this is a VM/container). As your system architecture is still unclear for me I canāt recommend you how to solve the issue.
basic troubleshooting would be to run curl https://<cloud.domain>/apps/richdocumentscode/proxy.php?req=/hosting/capabilities from the Nextcloud host/container/VM this is the step how Nextcloud learn the capabilities of the office server.
for general background information about the WOPI protocol and integration you might want to look at Collabora integration guide
One more piece of info: when I un-comment the localhost lines in etc/hosts and then re-run the curl you suggested, I get this:
curl: (51) Unable to communicate securely with peer: requested domain name does not match the serverāscertificate.
So it seems the issue is with the security certificate. Iām using Sectigo, and my domain is showing as auto validated (green check). But maybe I should switch to Letās Encrypt? Thanks.
this shows if you have access to the Collabora instance. /hosting/capabilities and expecially /hosting/discovery shows if the system is reachable and correctly reflects external hostname.
in this case you donāt reach the right system. you should point the hosts to the system where the right cert is installed (e.g. reverseproxy)