Nextcloud / Collabora CODE curl error 28

I am running Nextcloud 29.0.3 in a Truenas Core iocage jail. On the same Truenas Core server, I run a docker host in a Ubuntu VM, and my Collabora container is hosted there.

In my Nextcloud log, I get this message over and over. Sometimes a few times the same day, and sometimes a few days apart.

ConnectException
cURL error 28: Resolving timed out after 5005 milliseconds (see https://curl.haxx.se/libcurl/c/libcurl-errors.html) for https://collabora.example.com/hosting/capabilities
Failed to fetch capabilities: cURL error 28: Resolving timed out after 5005 milliseconds (see https://curl.haxx.se/libcurl/c/libcurl-errors.html) for https://collabora.example.com/hosting/capabilities

https://collabora.example.com/hosting/capabilities works fine, presents the same page in my browser (both on local LAN and via the Internet), and in curl from my nextcloud server (nextcloud.example.com). And instantly, there is no delay whatsoever.

Everything Collabora / Nextcloud related is working fine, no problems or other errors. What else can i do to identify the problem? Anyone with experience of this? I see this has been posted before, but i didnĀ“t find much of a solution. If there is one I missed, I apologizeā€¦

This indicates a bad, slow DNS solution. How is your local DNS organized? Are you using PiHole or something like that?

Otherwise, you can try adding collabora.example.com to the /etc/hosts file.

I hope that helps.


Much and good luck,
ernolf

I would agree it indicates a slow DNS, but when I run a manual curl it seems instant, and the timeout from the error, on 5 seconds is just not there. I would say itĀ“s not even half a second? Coudl that be an intermittent thing? How would I detect what is the cause in that case?

There is no piHole or anything like that involved.
I assume the host file to edit is the one on my nextcloud server?

In that hosts file, should I point http://collabora.example.com to its local IP directly to make it faster, or what is the point?

ping http://collabora.example.com has a respone time of appx 1.3ms, and a ping on the local IP has 0,5ms. Would that really help, seeing as the tiemout in the error message is on 5000ms?

Not sure how to answer the question about how DNS is organizedā€¦

You should read the ā†’ manpage ā† As you can see there, the hosts file does not point to a URL (http://collabora.example.com) but only to hosts (collabora.example.com). The syntax is extremely important. Thatā€™s why you should try out what exactly solves your issue and deliver the answer here. Simply asking people who do not have your system (Nextcloud 29.0.3 in a Truenas Core iocage jail with a docker host for the Collabora container in a Ubuntu VM on the same Truenas Core server) is not solution-oriented.
If you have to use the hosts file of your container or from your truenas as I linked above is out of my knowledge but since your Nextcloud is in a Truenas Core iocage jail, I would assume that I gave you the right link above. But I canā€™t try it here. You have to do THAT yourself! I would like to encourage you to try it out sistematicaly.


Much and good luck,
ernolf

This solved the problem. At least I think so, I havenĀ“t had a single error lik this in 48hrs now, and it usually shows up several times a day.

In my Nextcloud jail I pointed collabora.example.com to the IP of my docker host running Collabora. That didnĀ“t work, since Nextcloud is calling Collabora on port 443, and the container is listening on 9980 only. So instead I pointed it to my reverse proxy, and since then the error seems to have stopped happening. Thank you for pointing me in the right direction.

I did a trace before the change, and saw that requests went all the way up to the Internet and back, so pointing directly to the proxy was of course much faster.

1 Like