Unable to edit file using Collabora Online

Hi All,

I have just installed and configured the Nextcloud version 11. Everything is working great. I have also enabled the Collabora online app and configured the same using below instructions.

(https://www.linuxbabe.com/cloud-storage/integrate-collabora-online-server-nextcloud-ubuntu-16-04)

But when i clicked on word files it takes me to Collabora page and gives below error.

Well, this is embarrassing, we cannot connect to your document. Please try again.

Kindly help me on this and correct me if i have done any wrong things. Your reply would be appreciable.

Regards,
Irfan Hussain

Does the WOPI discovery URL work?

Is there any way to verify that WOPI URL is working or not. Because when i browsing WOPI URL its landing on Apache page.

If office.domain.tld is your vhost for Collabora, the the WOPI discovery URL is

office.domain.tld/hosting/discovery

I dont know whether it is working or not. But when i browsed using your syntax it landed on other pages. Please find below the page details.

This XML file does not appear to have any style information associated with it. The document tree is shown below.

After this code of sets is there.

Here is a screenshot

So far me included that error is often just simple DNS where the container is pointing to the wrong IP or doesn’t have an entry.

docker ps -a #list all containers.
docker stop [container-id] #stop container
docker rm [container-id] #delete container
docker images #list all images
docker rmi [image-id] #delete image
docker exec -i -t [container-id] /bin/sh #run shell inside container
docker logs [container-id] #view log
docker info #environment setup

https://docs.docker.com/engine/reference/commandline/docker/1

Check your DNS on the server, clients and inside the container.
nslookup subdomain.example.com
Check your certs on the server, clients and inside container.
openssl s_client -connect subdomain.example.com:443

you can enter the container with docker exec -i -t [container-id] /bin/sh and install dnsutils there
might just be an edit to /etc/hosts and install nano to complete

docker run -t -d -p 127.0.0.1:9980:9980 -e 'domain=nextcloud\\.vote4u\\.org\\.uk' --dns=192.168.1.2 --restart always --cap-add MKNOD collabora/code
If you are on a local subnet and have local dns then you can pass that address with the above.
Its the same as the standard docker run but just passes the dns server ip with dns=192.168.1.2

docker info & docker logs will tell much and maybe post your findings as there are some distro differences.

2 Likes

When i ran command “sudo systemctl status docker” it is showing active as you can see in below screen shot.

But when i ran docker info command it says
Cannot connect to the Docker daemon. Is the docker daemon running on this host?

Well there you go.

And you can see the colloabora interface but no document?! with a “Well, this is embarrassing, we cannot connect to your document. Please try again.”

Did you miss a sudo?

Here is my docker info. Kindly have a look. and suggest what should i do next.

Docker seems to be OK with Xenial and Aufs as long as
sudo apt-get install linux-image-extra-$(uname -r) linux-image-extra-virtual

Has been installed.

After that its time to start checking your dns from inside the container.

The docker logs [container-id] and then exec into the container and see how things are from in there

How can we check dns from inside the container.

docker exec -i -t [container-id] /bin/sh #enters the container as a root shell

apt-get install dnsutils (apt-get update first)

nslookup subdomain.example.com

or

openssl s_client -connect subdomain.example.com:443 (which will check certs at same time)

pointing to your nextcloud and not office subdomain.

Please find docker logs it looks like some error is there. i am not able to decode that error.

what you can do is copy that url (the first red line) paste into a browser and you will prob find it returns the file json from nextcloud. https://… bit.

For some reason Collabora isn’t recieving the json and file and my bet is that your dns in the container is wrong.

Then maybe try and curl that from in the container and the above dns tips given.

I ran command nslookup and checked for both domain office and nextcloud as well. and both are having same DNS.

I also copied and paste first error url and that one is landing on nextcloud login page that as you said.

Can you describe your third points that curl thing, i didnot get that curl things.

Did you check your Apache config?

I cannot see Header always set X-Frame-Options DENY properties in my Apache.conf file.

One more thing i have just noticed that in my Nextcloud console office icon is not showing in top docker. Please see in the below screen shot.

This is the actual error that i am getting.

Well, that 11 point howto linked above did success in my case.

Is there anything else that i should need to check.