ReinerNippes / nextcloud_on_docker

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

Playbook fails to complete. Postgres container is restarting. #80

Closed vaczyam closed 3 years ago

vaczyam commented 3 years ago

HI, My system is ubuntu 20.04.01 python3 postgres image: 10-alpine # Afte install I would like to migrate an older install to the new server.

TASK [nextcloud_config : first setup nextcloud] *** Sunday 20 December 2020 16:21:16 +0100 (0:00:00.063) 0:01:39.159 * fatal: [localhost]: FAILED! => changed=true cmd: |- docker exec --user www-data nextcloud php occ maintenance:install --database pgsql --database-host nextcloud-db --database-name nextcloud --database-user nextcloud --database-pass xxxxxxx --admin-user admin --admin-pass xxxxxx --data-dir /var/nc-data delta: '0:00:00.272509' end: '2020-12-20 16:21:17.856897' msg: non-zero return code rc: 1 start: '2020-12-20 16:21:17.584388' stderr: '' stderr_lines: stdout: 'Could not open input file: occ' stdout_lines:

$ docker logs nextcloud-db chmod: /var/lib/postgresql/data: Operation not permitted

Thank You!

ReinerNippes commented 3 years ago

Did you run the playbook on a newly installed machine?

Could you check the ownership of sudo ls -l /var/lib/docker/volumes/nextcloud-database-vol/_data. It should belong to uid=70 gid=70

vaczyam commented 3 years ago

Hi, My machine is newly installed. First I tried to migrate nextcloud_on_docker and /opt/nextcloud to the new machine without success. After that I tried a new, clean install.

The owner was root. After repairing the ownership the playbook stopped here:

TASK [nextcloud_config : install collabora app] ***** Monday 21 December 2020 20:08:09 +0100 (0:00:00.124) 0:01:51.737 * fatal: [localhost]: FAILED! => changed=true cmd: docker exec --user www-data nextcloud php occ app:install richdocuments delta: '0:00:00.753945' end: '2020-12-21 20:08:11.130701' msg: non-zero return code rc: 1 start: '2020-12-21 20:08:10.376756' stderr: |2-

  Command "app:install" is not defined.

  Did you mean one of these?
      app:check-code
      maintenance:install

stderr_lines: stdout: Nextcloud is not installed - only a limited number of commands are available stdout_lines:

Thank You!

ReinerNippes commented 3 years ago

stdout: Nextcloud is not installed

that means that your recovery didn't work. did you put the correct config.php in place too?

vaczyam commented 3 years ago

Hi, It was by the mixture different version of python in the old and new prepare_system.sh. Close this please. Thank You!