ReinerNippes / nextcloud_on_docker

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

Problems running '/nextdocker.yml' #17

Closed Gerry33 closed 4 years ago

Gerry33 commented 4 years ago

Hi Reiner, thanks for this nice setup and the efforts on your work. Unfortunately I don't get it to work, so I kindly ask for some assistance.

After struggling with of problems on the python setup, I finally managed to get 'ansible' working. It reports:

ansible --version
ansible 2.8.6
  config file = /home/xxx/programs/nextcloud_on_docker/ansible.cfg
  configured module search path = [u'/root/.ansible/plugins/modules', u'/usr/share/ansible/plugins/modules']
  ansible python module location = /usr/local/lib/python2.7/dist-packages/ansible
  executable location = /usr/local/bin/ansible
  python version = 2.7.15+ (default, Oct  7 2019, 17:39:04) [GCC 7.4.0]

Is that correct ?

When running ansible playbook '/nextdocker.yml', it fails with error messages:

PLAY [install nextcloud] ... 
TASK [Gathering Facts] *... 
Sunday 20 October 2019  16:06:25 +0200 (0:00:00.604)       0:00:00.604 ********
ok: [localhost]

TASK [prep_ufw : include os specific tasks] ***...
Sunday 20 October 2019  16:06:30 +0200 (0:00:04.453)       0:00:05.058 ********
included: /home/gsi/programs/nextcloud_on_docker/roles/prep_ufw/tasks/Ubuntu.yml for localhost

TASK [prep_ufw : Installing ufw package] 
*
Sunday 20 October 2019  16:06:30 +0200 (0:00:00.403)       0:00:05.462 ********
ok: [localhost]

TASK [prep_ufw : Configuring port/protocol/network rules] 
Sunday 20 October 2019  16:06:37 +0200 (0:00:06.287)       0:00:11.750 ********
failed: [localhost] (item={u'port': 22, u'rule': u'allow'}) => changed=false
  ansible_loop_var: item
  commands:
  - /usr/sbin/ufw status verbose
  item:
    port: 22
    rule: allow
  msg: |-
    ERROR: problem running iptables: iptables v1.6.1: can't initialize iptables table `filter': Table does not exist (do you need to insmod?)
    Perhaps iptables or your kernel needs to be upgraded.
failed: [localhost] (item={u'port': 80, u'rule': u'allow'}) => changed=false
  ansible_loop_var: item
  commands:
  - /usr/sbin/ufw status verbose
  item:
    port: 80
    rule: allow
  msg: |-
    ERROR: problem running iptables: iptables v1.6.1: can't initialize iptables table `filter': Table does not exist (do you need to insmod?)
    Perhaps iptables or your kernel needs to be upgraded.
failed: [localhost] (item={u'port': 443, u'rule': u'allow'}) => changed=false
  ansible_loop_var: item
  commands:
  - /usr/sbin/ufw status verbose
  item:
    port: 443
    rule: allow
  msg: |-
    ERROR: problem running iptables: iptables v1.6.1: can't initialize iptables table `filter': Table does not exist (do you need to insmod?)
    Perhaps iptables or your kernel needs to be upgraded.

I do not have iptables installed. I'm running a bare blank server edition of:

NAME=Ubuntu
    ++ VERSION='18.04.3 LTS (Bionic Beaver)'
    ++ ID=ubuntu
    ++ ID_LIKE=debian
    ++ PRETTY_NAME='Ubuntu 18.04.3 LTS'
    ++ VERSION_ID=18.04

on an ODROID C2 which reports its hardware Linux server 3.16.72-46 #1 SMP PREEMPT Tue Aug 13 18:09:58 -03 2019 aarch64 aarch64 aarch64

BTW, does your setup need 'docker-compose' as an executable as this is not present in the official docker repositories for arm64/aarch64 ?

Thanks for any help ! Gerd

ReinerNippes commented 4 years ago

If you don't want/need a firewall just comment out this line: https://github.com/ReinerNippes/nextcloud_on_docker/blob/f95ff0cf71cc4cd3d4905d8c9dfc22b64d6e10a2/nextdocker.yml#L8

and there is another include_role: ufw in roles\talk\tasks\main.yml that needs to be disabled if you want to install talk.

docker-compose is not needed. the playbook is a kind of replacement to docker-compose.

Gerry33 commented 4 years ago

Hi Reiner, thank your very much for your fast response. It worked ....

But immediately followed by the next blocker:


> TASK [prep_os : enable service disable-transparent-hugepages] *********************************************************************
> Sunday 20 October 2019  19:44:31 +0200 (0:00:02.798)       0:01:47.228 ********
> fatal: [localhost]: FAILED! => changed=false
>   msg: |-
>     Unable to start service disable-transparent-huge-pages.service: Job for disable-transparent-huge-pages.service failed because the control proces                   s exited with error code.
>     See "systemctl status disable-transparent-huge-pages.service" and "journalctl -xe" for details.

"journalctl -xe" reports:


  kt 20 19:44:35 server sh[9368]: /bin/sh: 1: cannot create /sys/kernel/mm/transparent_hugepage/enabled: Directory nonexistent
  Okt 20 19:44:35 server systemd[1]: disable-transparent-huge-pages.service: Main process exited, code=exited, status=2/INVALIDARGUMENT
  Okt 20 19:44:35 server systemd[1]: disable-transparent-huge-pages.service: Failed with result 'exit-code'.
  Okt 20 19:44:35 server systemd[1]: Failed to start Disable Transparent Huge Pages.
  -- Subject: Unit disable-transparent-huge-pages.service has failed
  -- Defined-By: systemd
  -- Support: http://www.ubuntu.com/support
  --
  -- Unit disable-transparent-huge-pages.service has failed.
  --
  -- The result is RESULT

Although I'm a bit familiar with Linux, I never heard of 'Starting Disable Transparent Huge Pages.'

Edit1: Found this: https://unix.stackexchange.com/questions/99154/disable-transparent-hugepages Tried apt install hugepages' && hugeadm --thp-never but 2nd failed: hugeadm:ERROR: Couldn't open /sys/kernel/mm/transparent_hugepage/enabled: No such file or directory

Edit2: My 'hugepages' are named different: /sys/kernel/mm/hugepages/hugepages-2048kB/

Shall I try to change that in your setup ? # But where ?

Again, thanks for taking care. Gerd

ReinerNippes commented 4 years ago

here: https://github.com/ReinerNippes/nextcloud_on_docker/blob/dd93e8ea9ce62dc4d08ba5ecc88cf3086797eb20/roles/prep_os/files/disable-transparent-huge-pages.service#L9

but you may try first on the cli if it's working anyway. i think on odroid it might not be a big deal anyhow.

Gerry33 commented 4 years ago

Hi Reiner, and thanks for response.

One step ahead, but then again a big blocker , where I will now give up here. The docker daemon will not even start, so its time to finish this here.

Again thanks for your efforts and have a nice remaining sunday. Gerd



- Unit docker.socket has begun starting up.
Okt 20 21:02:05 server systemd[1]: Listening on Docker Socket for the API.
-- Subject: Unit docker.socket has finished start-up
-- Defined-By: systemd
-- Support: http://www.ubuntu.com/support
--
-- Unit docker.socket has finished starting up.
--
-- The start-up result is RESULT.
Okt 20 21:02:05 server systemd[1]: docker.service: Start request repeated too quickly.
Okt 20 21:02:05 server systemd[1]: docker.service: Failed with result 'exit-code'.
Okt 20 21:02:05 server systemd[1]: Failed to start Docker Application Container Engine.
-- Subject: Unit docker.service has failed
-- Defined-By: systemd
-- Support: http://www.ubuntu.com/support
--
-- Unit docker.service has failed.
--
-- The result is RESULT.
Okt 20 21:02:05 server systemd[1]: docker.socket: Failed with result 'service-start-limit-hit'.
ReinerNippes commented 4 years ago

may you can use the docker version from your ubuntu droid distro.

change to state: present

https://github.com/ReinerNippes/nextcloud_on_docker/blob/dd93e8ea9ce62dc4d08ba5ecc88cf3086797eb20/roles/prep_docker/tasks/Ubuntu.yml#L10

choose the name of the docker package. (apt-cache search docker - remove the docker.com repo in /etc/apt/source.list.d first) and delete the rest of file Ubuntu.yml

Gerry33 commented 4 years ago

Thansk, I wil give it a try.

I used to install Docker this way:

curl -fSSl https://get.docker.com -o docker.sh
chmod +x docker.sh
sudo ./docker.sh

Will try to get it done this way.