ReinerNippes / nextcloud_on_docker

Run Nextcloud in Docker Container on various Linux Hosts
MIT License
203 stars 48 forks source link

Q: Still strugling with Collabora #93

Open LinuksGuru opened 3 years ago

LinuksGuru commented 3 years ago

Hi!

I'm still strugling with default install and Collabora connection on Debian Buster/self-signed certificate. During install playbook shows error, which IMHO can't affect docker (its just add-on for NextCloud). The rest installed correctly (removed firewalld sections from playbook). Installed Collabora Online add-on manually from web admin panel, its latest version marked as unsupported by latest dockerized NextCloud. NextCloud itself works OK, however, it can't connect to Collabora, and connection to portainer also don't work. All necessary ports opened in ufw.

docker ps -a
60ebf3ecfdad   collabora/code:latest                  "/bin/sh -c 'bash st…"   16 hours ago    Up 16 hours             9980/tcp 

shows container is running. However

sudo netstat -lnpt | grep docker
tcp        0      0 0.0.0.0:80              0.0.0.0:*               LISTEN      6358/docker-proxy   
tcp        0      0 0.0.0.0:443             0.0.0.0:*               LISTEN      6345/docker-proxy 

curl 127.0.0.1:9980/hosting/discovery
curl: (7) Failed to connect to 127.0.0.1 port 9980: Connection refused

At first sight looks something is wrong with nginx reverse proxy. Is it possible that for some reason any playbook parts was skipped? I run playbook again, everythiong went OK. How to fix that? Thanks in advance.

TASK [nextcloud_config : install collabora app] ***************************************************************************************************************
Monday 22 February 2021  17:48:44 +0200 (0:00:00.091)       0:07:44.369 ******* 
fatal: [localhost]: FAILED! => changed=true 
  cmd: docker exec --user www-data nextcloud php occ app:install richdocuments
  delta: '0:00:02.031925'
  end: '2021-02-22 17:48:46.337033'
  msg: non-zero return code
  rc: 1
  start: '2021-02-22 17:48:44.305108'
  stderr: ''
  stderr_lines: <omitted>
  stdout: 'Error: App "Collabora Online" cannot be installed because it is not compatible with this version of the server.'
  stdout_lines: <omitted>
LinuksGuru commented 3 years ago

I wiped out content of ./rules/nextcloud_config/tasks, and the whole playbook run succesfully. Missing app reinstalled manually from web admin. Unfortunately, still can't connect neither "https://cloud1.mydoman.com:443" neither "https://cloud1.mydoman.com:9980". Collabora docker is running. What I'm missing here? Or I should use docker-compose.yml in order to link NextCloud and Collabora togehter?

LinuksGuru commented 3 years ago

I found one culprit. Playbook pulling latest fpm-alpine NextCloud image which is version 21. Collabora app for NC v21 is an early beta and may not function correctly. Solution: 1) Edit "./nextcloud_on_docker/group_vars/all.yml", and change "docker_nextcloud_image: fpm-alpine" to "docker_nextcloud_image: 20.0.7-fpm-alpine". 2) Stop watchtower to prevent automatic updates.

Anyway connection failed "https://cloud1.mydomain.com:443" - "Could not establish connection to the Collabora Online server.".

ReinerNippes commented 3 years ago

I wiped out content of ./rules/nextcloud_config/tasks

it's enough to comment out line 12 of nextdocker.yml

Stop watchtower to prevent automatic updates

this is not necessary. if you pin the container version to 20.0.7-fpm-alpine that nextcloud version won't be changed. but also you won't get any os and php update of that image. (e.g. 18-fpm-alpine got an update 18 days ago.)

During install playbook shows error, which IMHO can't affect docker

if the playbook "Failed" it stops working. you end up with an unfinished setup.

At first sight looks something is wrong with nginx reverse proxy.

this playbook installs traefik as reverse proxy to the internet. traefik is opening port 80&443. the traffik to collabora in my setup is handled "internal". there is no extra domain for collabora.

if you want to use an extra domain for collabora you have to add labels to the collabora container to configure a route in traefik to this container. this done for example with portainer and adminer.

LinuksGuru commented 3 years ago

It seems there is a fix on this thread.

https://github.com/ReinerNippes/nextcloud_on_docker/issues/91#issuecomment-787508054

LinuksGuru commented 3 years ago

Re-installed everything from scratch, downgraded docker, as suggested by wget, still can't connect to Collabora and vice versa. Any idea how to fix? Thanks in advance.

apt-cache policy docker-ce
apt install docker-ce=5:20.10.0~3-0~debian-buster
apt-mark hold docker-ce

More here: https://github.com/ReinerNippes/nextcloud_on_docker/issues/91#issuecomment-787508054