Document upload failed - Collabora-office in Nextcloud

Hello.
A few months ago I used an old laptop that was forgotten at home, and I installed a servidfor on debian 11.
Web server and DNS server

Then install nextcloud to make a private cloud and share photos, videos and documents with my family.
We are only 7 users and my cloud works very well.

Over time I decided to install an office tool and be able to edit documents online.

I have installed Collabora-office and everything seems to be fine, yet I get errors when opening or creating documents.

I have followed this installation guide, because I don’t want to use docker Install Nextcloud 23 with Collabora and HPB on Debian 11 natively

When I do a certbot --apache I get this

Requesting a certificate for collabora-office.miva.sytes.net
Performing the following challenges:
http-01 challenge for collabora-office.miva.sytes.net
Waiting for verification...
Challenge failed for domain collabora-office.miva.sytes.net
http-01 challenge for collabora-office.miva.sytes.net
Cleaning up challenges
Some challenges have failed.

IMPORTANT NOTES:
 - The following errors were reported by the server:

   Domain: collabora-office.miva.sytes.net
   Type:   dns
   Detail: DNS problem: NXDOMAIN looking up A for
   collabora-office.miva.sytes.net - check that a DNS record exists
   for this domain; DNS problem: NXDOMAIN looking up AAAA for
   collabora-office.miva.sytes.net - check that a DNS record exists
   for this domain

It seems that I have problems with SSL certificates and what I have configured with cerbot is not correct.

Hello.
At the moment that is already resolved and the SSL certificates have already been generated
Change the name to a shorter one to collabora-miva.sytes.net

Now it won’t let me put the address https://collabora-miva.sytes.net

Yes, I can put https://miva.sytes.net (which is the domain)

It does not address and when I open an office file it tells me again “the document load has failed”

i’m stuck

at his point you have to start from the beginning and generate fresh certificates, as TLS certificates always bind to a domain name, once you change the domain previous certificates become invalid.

I have already updated the certificates to the address collabora-miva.sytes.net

But the message “the document load has failed” continues.

My server manages the domain through NOIP, because the IP is dynamic.

And I also installed a DNS server; is it possible that you should add this subdomain?

the integration of Nextcloud with Collabora is little demanding until you get the point how they belong together. Please review following post and work through referred material as well - this will provide good understanding of both integration and useful troubleshooting techniques.

basically speaking the client must reach both servers using fqdn and both servers much reach each other using the same hostname as the client. very detailed drawing how to achieve this using local “split-brain” or “split-horizon” DNS server is here:

The truth is that I am lost.
The vhost is created and the diagnosis seems correct

dig collabora-miva.sytes.net

; <<>> DiG 9.16.27-Debian <<>> collabora-miva.sytes.net
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 17753
;; flags: qr rd ra; QUERY: 1, ANSWER: 0, AUTHORITY: 1, ADDITIONAL: 1

;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 1232
; COOKIE: 5a8da3a1ba48f0cb01000000632970cd876e4c990d085858 (good)
;; QUESTION SECTION:
;collabora-miva.sytes.net. IN A

;; AUTHORITY SECTION:
sytes.net. 6 IN SOA nf1.no-ip.com. hostmaster.no-ip.com. 2095365172 600 300 604800 600

;; Query time: 0 msec
;; SERVER: 192.168.1.100#53(192.168.1.100)
;; WHEN: Tue Sep 20 09:50:37 CEST 2022
;; MSG SIZE rcvd: 141

But when I type the URL in the box, it tells me that it can’t connect to the Collabora Online server.

my installation is not done with docker. It is a native debian 11 installation.

I have used this guide

In principle the diagnosis of collabora-miva.sytes.net is correct, and if I ping the result is positive.

64 bytes from miva.sytes.net (192.168.1.100): icmp_seq=1 ttl=64 time=0.208 ms
64 bytes from miva.sytes.net (192.168.1.100): icmp_seq=2 ttl=64 time=0.204 ms
64 bytes from miva.sytes.net (192.168.1.100): icmp_seq=3 ttl=64 time=0.193 ms
64 bytes from miva.sytes.net (192.168.1.100): icmp_seq=4 ttl=64 time=0.194 ms
64 bytes from miva.sytes.net (192.168.1.100): icmp_seq=5 ttl=64 time=0.198 ms
64 bytes from miva.sytes.net (192.168.1.100): icmp_seq=6 ttl=64 time=0.227 ms
64 bytes from miva.sytes.net (192.168.1.100): icmp_seq=7 ttl=64 time=0.203 ms
^C
collabora-miva.sytes.net ping statistics —
7 packets transmitted, 7 received, 0% packet loss, time 6150ms
rtt min/avg/max/mdev = 0.193/0.203/0.227/0.010 ms

I think I’m close to the solution, but I can’t figure out what’s going on.

I have noticed that this warning appears in the nextcloud log

Trusted domain error. “127.0.0.1” tried to access using “collabora-miva.sytes.net” as host.

Both the IP and the subdomain are mine, so I don’t understand why my cloud rejects the connection from collaboraoffice

I have added collabora-miva.sytes.net in /var/www/nextcloud/config:

‘trusted_domains’ =>
array (
0 => ‘miva.sytes.net’,
1 => ‘collabora-miva.sytes.net’,
),

it doesn’t matte how you install the systems - the mechanics behind the scenes are the same - client needs access to both system, each system requires access to the other. troubleshooting techniques described in referenced threads apply everywhere…

something is wrong when requests to collabora-miva arrive on your Nextcloud.

did this solved the issue?

No.
I’m still investigating what could happen.

I wonder if the /etc/apache2/sites-available/collabora.conf file is correct?

image

I’m not Apache expert but looks you are missing lot of required directives. take a look at this guide, it includes detailed Apache configs…

or even better use official docs:

I have checked the vhost files in apache, and they seem correct.
SSL certificates are fine.
I have added my collabora server in the collabora office box and it has been accepted.
However when I try to open any file, I continue to have the same problem “document upload failed”

Any new idea?

Is it necessary to add a DNS record in my nameserver?

Fixed adding CNAME record to DNS server