Nextcloud can't connect to Collabora
-
@girish Similar problem here with a new Cloudron installation on a dedicated server with a public IPv4. The Nextcloud container cannot access the host's external IP (loopback issue?), thus it cannot reach the Collabora container by DNS name. I do not have access to update any routing settings external to my host server. Is there a similar internal DNS trick with Unbound I could try? Thanks!
Curl from within my Nextcloud container works with external hosts...
root@1971ddba-1e76-495e-b0f7-40ab4a544caf:/app/code# curl -v yahoo.com * Rebuilt URL to: yahoo.com/ * Trying 98.137.11.164... * TCP_NODELAY set * Connected to yahoo.com (98.137.11.164) port 80 (#0) > GET / HTTP/1.1 > Host: yahoo.com > User-Agent: curl/7.58.0 > Accept: */* > < HTTP/1.1 301 Moved Permanently < Date: Wed, 03 Feb 2021 21:33:41 GMT < Connection: keep-alive < Server: ATS < Cache-Control: no-store, no-cache < Content-Type: text/html < Content-Language: en < X-Frame-Options: SAMEORIGIN < Location: https://yahoo.com/ < Content-Length: 8 < * Connection #0 to host yahoo.com left intact
But not when trying to connect to my Collabora container:
root@1971ddba-1e76-495e-b0f7-40ab4a544caf:/app/code# curl -v collab.mydomain.com * Rebuilt URL to: collab.mydomain.com/ * Trying 131.xxx.xxx.xxx... * TCP_NODELAY set
-
@girish Thanks for the response! Restart of Unbound had no effect. Actually, the problem seems to be independent of DNS. I also cannot complete a curl request directly to the external IP of my host machine from inside the Nextcloud container. I can, however, complete a curl request from the host itself to the host's external IP. The problem only occurs when traffic originates from inside a container.
-
@staypath That's indeed strange that the container cannot ping the host IP. Is there anything unique about your setup we should know or is it the equivalent of a server with a public IP? Is there some special virtualization/networking going on?
-
@girish I ran some tcpdump sessions. When the container pings the public IPv4 of the host, the host responds to the ICMP packet, but it is responding to the private IP of the container (172.18.0.x). The packet doesn't seem to know how to get back to the container from the host.
-
@staypath Most apps don't. The only case I can think of on top of my head is if you had webooks when one app is calling the other. Say you setup GitLab notifications to rocket.chat but those are not configured out of the box. So, you will see the issue and they won't be failing transparently.
-
@staypath said in Nextcloud can't connect to Collabora:
When the container pings the public IPv4 of the host, the host responds to the ICMP packet, but it is responding to the private IP of the container (172.18.0.x). The packet doesn't seem to know how to get back to the container from the host.
If you happen to have another server, can you test this with a normal ubuntu and docker installation ? i.e just create server, install docker. Then from a container try to ping public IP.
FWIW, this works out of the box in all the VPS servers.
-
@girish Thank you for the recommendation. I have tried on another bare metal server running Docker and I am able to access the external host IP from the Docker container. This is clearly a network issue with the host where I have Cloudron installed.
-
I just tried installing Collabora and hit this exact same issue.
This issue is marked as solved, but I'm not sure why as it doesn't appear to be actually solved.
-
@jdaviescoates actually so far reinstallation of collabora and resetting the app in nextcloud mostly solved this. It is however quite unclear still why this happens.
-
Although I think in my case perhaps it's just because I've already connected Netxtcloud to OnlyOffice! I'm not sure it's actually possible to use both alongside eachother.
-
@jdaviescoates said in Nextcloud can't connect to Collabora:
Although I think in my case perhaps it's just because I've already connected Netxtcloud to OnlyOffice!
Nope, that's not it. I just tried it with a Nextcloud that doesn't have OnlyOffice set-up and that couldn't connect either.
I'm not sure it's actually possible to use both alongside eachother.
Sounds like perhaps it is possible https://help.nextcloud.com/t/install-both-onlyoffice-and-collabora/76180/3
-
OK, so actually the solution was maddeningly simple
You mustn't put a trailing slash because then it's not a FQDN
You have to put
collabora.domain.coop
or
https://collabora.domain.coopNOT
collabora.domain.coop/
nor
https://collabora.domain.coop/Then it works fine!
(And it is possible to have both OnlyOffice and Collabora installs. My files still default to opening in OnlyOffice but I've now got an extra Edit with Collabora Online Development Edition option in the 3 little dots menu for files)
@nebulon I guess something about trailing slashes could be added to the docs?
-
@jdaviescoates Oh good catch. I much prefer fixing the app itself than docs which nobody reads cc @nebulon