ReinerNippes/nextcloud_on_docker

ERR_TOO_MANY_REDIRECTS on fresh install

longride opened this issue · 7 comments

Hi,

great script, took a lot of work off me, so this is great. Recently I run into the ERR_TOO_MANY_REDIRECTS error.

This happens on a fresh Ubuntu 18.04 as well as Debian 10 install, and is the message I am greeted with right after the playbook finishes. I was able to recreate this behaviour with Traefik v2 and a current git pull from 6. June 2020.

Choosing a self signed certificate doesn't make a difference. The error remains in all major browsers with current updates. Deleting cookies desn't help.

All containers are up and running, even after reboot. Since the structure with Traefik and let's encrypt is a bit complicated, any ideas where I can narrow the error down?

Thanks for any help and kind regards

What options did you have set in the inventory file? So I can try to duplicate this issue. I am not able to duplicate this at the moment on an Ubuntu 18.04 Server image.

I only inserted domain and mail address.

I also removed the following. It causes an error while installing and if I understand correctly it makes only sense to have this service if you have more than 2GB or RAM which I don't have.

nextcloud_on_docker/roles/prep_os/tasks/tuning.yml

- name: disable transparent hugepages - copy service file
  copy:
    src: disable-transparent-huge-pages.service
    dest: '{{ service_path[ansible_distribution] }}/disable-transparent-huge-pages.service'
    owner: root
    group: root
    mode: 0644
  when: ansible_architecture == 'x86_64'

- name: enable service disable-transparent-hugepages
  service:
    name: disable-transparent-huge-pages.service
    enabled: true
    state: started
  when: ansible_architecture == 'x86_64'

EDIT: I read numerous posts on the nextcloud help forum, but it looks like the issues there are with wrong configurations of nginx or treafik which I didn't touch here.

What were your steps to disable that section? Also, after failed install did you go through and remove the /opt/nextcloud directory? I have seen this error before during testing, and it is usually from running the script a second time and not having fully deleted the Nextcloud instance.

I uncommented it.

I did not remove /opt/nextcloud
I just tried with removing it, after failure I installed Debian 10 again and run the script successful the first time but the redirect error still shows.

How are you accessing it with a FQDN? did you add it to an internal DNS, or are you going through a DNS provider like Cloudflare? If you are using an external DNS, do you have both port 80 and 443 opened on your firewall pointing to your Nextcloud installation?

EDIT: If you do have the ports opened and pointed to the Nextcloud install and using an external DNS service. Can you try using a phone or computer browser thru the cell network? This will help eliminate an internal network issue. Some firewalls have issues with redirects when your access it from the inside of the network and using the firewalls public ip address.

Yes, the problem was cloudfare and not opening the ports. It works now, thanks.

I also removed the following. It causes an error while installing and if I understand correctly it makes only sense to have this service if you have more than 2GB or RAM which I don't have.

nextcloud_on_docker/roles/prep_os/tasks/tuning.yml

I changed this with commit 9772d52.

  when:
    - ansible_memtotal_mb > 2048
    - ansible_architecture == 'x86_64'
    - hugepage_enabled.stat.isreg is defined and hugepage_enabled.stat.isreg