crazy-max / docker-nextcloud

Nextcloud Docker image
MIT License
239 stars 47 forks source link

Upgrade FAILED: ERROR: column "type" does not exist at character 45 #170

Closed aronmgv closed 1 month ago

aronmgv commented 2 months ago

Support guidelines

I've found a bug and checked that ...

Description

After performing upgrade (from 28.0.1 to 29.0.3) started having this problem - Nextcloud will end up in maintenance mode

Expected behaviour

Successful upgrade

Actual behaviour

Nextcloud will end up in maintenance mode

Steps to reproduce

docker-compose pull docker-compose down docker-compose up -d

Docker info

Client: Docker Engine - Community
 Version:    27.0.3
 Context:    default
 Debug Mode: false
 Plugins:
  buildx: Docker Buildx (Docker Inc.)
    Version:  v0.15.1
    Path:     /usr/libexec/docker/cli-plugins/docker-buildx
  compose: Docker Compose (Docker Inc.)
    Version:  v2.28.1
    Path:     /usr/libexec/docker/cli-plugins/docker-compose

Server:
 Containers: 62
  Running: 62
  Paused: 0
  Stopped: 0
 Images: 288
 Server Version: 27.0.3
 Storage Driver: overlay2
  Backing Filesystem: extfs
  Supports d_type: true
  Using metacopy: false
  Native Overlay Diff: true
  userxattr: false
 Logging Driver: json-file
 Cgroup Driver: systemd
 Cgroup Version: 2
 Plugins:
  Volume: local
  Network: bridge host ipvlan macvlan null overlay
  Log: awslogs fluentd gcplogs gelf journald json-file local splunk syslog
 Swarm: inactive
 Runtimes: io.containerd.runc.v2 nvidia runc
 Default Runtime: nvidia
 Init Binary: docker-init
 containerd version: ae71819c4f5e67bb4d5ae76a6b735f29cc25774e
 runc version: v1.1.13-0-g58aa920
 init version: de40ad0
 Security Options:
  apparmor
  seccomp
   Profile: builtin
  cgroupns
 Kernel Version: 6.1.0-17-amd64
 Operating System: Debian GNU/Linux 12 (bookworm)
 OSType: linux
 Architecture: x86_64
 CPUs: 32
 Total Memory: 125.7GiB
 Name: caradhras
 ID: 63807d6d-6b70-47ad-b333-a30cc599fa54
 Docker Root Dir: /var/lib/docker
 Debug Mode: false
 Username: aronmgv
 Experimental: false
 Insecure Registries:
  127.0.0.0/8
 Live Restore Enabled: false
 Default Address Pools:
   Base: 10.255.0.0/16, Size: 24

Docker Compose config

version: "3.7"

services:
  nextcloud:
    container_name: nextcloud.52480
    image: crazymax/nextcloud:latest
    restart: always
    ports:
      - 52480:8000
    depends_on:
      - postgres
      - redis
      - msmtpd
    volumes:
      - "$PWD/nextcloud:/data"
      - "/lvm/raid/public/nextcloud/data/:/data/data"
      - "/lvm/raid/private/backups/:/mnt/private/backups"
      - "/lvm/raid/private/data/:/mnt/private/data"
      - "/lvm/raid/private/drive/:/mnt/private/drive"
      - "/lvm/raid/private/media/:/mnt/private/media"
      - "/lvm/raid/public/backups/:/mnt/public/backups"
      - "/lvm/raid/public/drive/:/mnt/public/drive"
      - "/lvm/raid/public/ftp/:/mnt/public/ftp"
    env_file:
      - "./nextcloud.env"
    environment:
      - "TZ"
      - "PUID"
      - "PGID"
      - "DB_TYPE=${DB_TYPE}"
      - "DB_HOST=${DB_HOST}"
      - "DB_NAME=${DB_NAME}"
      - "DB_USER=${DB_USER}"
      - "DB_PASSWORD=${DB_PASSWORD}"

  postgres:
    container_name: nextcloud.postgres
    image: postgres:12
    restart: always
    expose:
      - 5432
    volumes:
      - $PWD/postgres:/var/lib/postgresql/data
    environment:
      - TZ
      - PUID
      - PGID
      - POSTGRES_DB=${DB_NAME}
      - POSTGRES_USER=${DB_USER}
      - POSTGRES_PASSWORD=${DB_PASSWORD}
      #docker exec -it nextcloud.524.postgres bash
      #su postgres
      #createuser -P nextcloud
      #createdb -O nextcloud nextcloud

  adminer:
    container_name: nextcloud.adminer.52482
    image: adminer
    ports:
      - 52482:8080
    restart: always

  redis:
    container_name: nextcloud.redis
    image: redis:4.0-alpine
    environment:
      - "TZ"
    restart: always

  msmtpd:
    container_name: nextcloud.msmtpd
    image: crazymax/msmtpd:latest
    env_file:
      - "./msmtpd.env"
    environment:
      - "TZ"
    restart: always

  cron:
    container_name: nextcloud.cron
    image: crazymax/nextcloud:latest
    depends_on:
      - nextcloud
    volumes:
      - "$PWD/nextcloud:/data"
      - "/lvm/raid/public/nextcloud/data/:/data/data"
      - "/lvm/raid/private/backups/:/mnt/private/backups"
      - "/lvm/raid/private/data/:/mnt/private/data"
      - "/lvm/raid/private/drive/:/mnt/private/drive"
      - "/lvm/raid/private/media/:/mnt/private/media"
      - "/lvm/raid/public/backups/:/mnt/public/backups"
      - "/lvm/raid/public/drive/:/mnt/public/drive"
      - "/lvm/raid/public/ftp/:/mnt/public/ftp"
    env_file:
      - "./nextcloud.env"
    environment:
      - "TZ"
      - "PUID"
      - "PGID"
      - "DB_TYPE=${DB_TYPE}"
      - "DB_HOST=${DB_HOST}"
      - "DB_NAME=${DB_NAME}"
      - "DB_USER=${DB_USER}"
      - "DB_PASSWORD=${DB_PASSWORD}"
      - "SIDECAR_CRON=1"
      - "CRON_PERIOD=*/5 * * * *"
    restart: always

  previewgen:
    container_name: nextcloud.previewgen
    image: crazymax/nextcloud:latest
    depends_on:
      - nextcloud
    volumes:
      - "$PWD/nextcloud:/data"
      - "/lvm/raid/public/nextcloud/data/:/data/data"
    env_file:
      - "./nextcloud.env"
    environment:
      - "TZ"
      - "PUID"
      - "PGID"
      - "DB_TYPE=${DB_TYPE}"
      - "DB_HOST=${DB_HOST}"
      - "DB_NAME=${DB_NAME}"
      - "DB_USER=${DB_USER}"
      - "DB_PASSWORD=${DB_PASSWORD}"
      - "SIDECAR_PREVIEWGEN=1"
      - "PREVIEWGEN_PERIOD=0 * * * *"
    restart: always

  news_updater:
    container_name: nextcloud.news_updater
    image: crazymax/nextcloud:latest
    depends_on:
      - nextcloud
    volumes:
      - "$PWD/nextcloud:/data"
      - "/lvm/raid/public/nextcloud/data/:/data/data"
    env_file:
      - "./nextcloud.env"
    environment:
      - "TZ"
      - "PUID"
      - "PGID"
      - "DB_TYPE=${DB_TYPE}"
      - "DB_HOST=${DB_HOST}"
      - "DB_NAME=${DB_NAME}"
      - "DB_USER=${DB_USER}"
      - "DB_PASSWORD=${DB_PASSWORD}"
      - "SIDECAR_NEWSUPDATER=1"
      - "NC_NEWSUPDATER_THREADS=10"
      - "NC_NEWSUPDATER_TIMEOUT=300"
      - "NC_NEWSUPDATER_INTERVAL=900"
      - "NC_NEWSUPDATER_LOGLEVEL=error"
    restart: always

  collabora:
    container_name: nextcloud.collabora.52481
    image: collabora/code
    cap_add:
      - MKNOD
    ports:
      - 52481:9980
    environment:
      - "DONT_GEN_SSL_CERT=true"
      - "extra_params=--disable-ssl"
      #- "extra_params=--o:ssl.enable=false"
    restart: always

networks:
  default:
    name: nextcloud

Logs

nextcloud.postgres         | 2024-07-27 07:34:12.084 UTC [54] ERROR:  column "type" does not exist at character 45
nextcloud.postgres         | 2024-07-27 07:34:12.084 UTC [54] STATEMENT:  SELECT "appid", "configkey", "configvalue", "type" FROM "appconfig" WHERE "lazy" = $1
nextcloud.52480            | 192.168.255.12 - - [27/Jul/2024:09:34:12 +0200] "GET / HTTP/1.1" 503 15999 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:128.0) Gecko/20100101 Firefox/128.0"
nextcloud.postgres         | 2024-07-27 07:34:13.238 UTC [55] ERROR:  column "type" does not exist at character 45
nextcloud.postgres         | 2024-07-27 07:34:13.238 UTC [55] STATEMENT:  SELECT "appid", "configkey", "configvalue", "type" FROM "appconfig" WHERE "lazy" = $1
nextcloud.52480            | 192.168.255.12 - - [27/Jul/2024:09:34:13 +0200] "GET /index.php/apps/files/preview-service-worker.js HTTP/1.1" 404 1538 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:128.0) Gecko/20100101 Firefox/128.0"
nextcloud.postgres         | 2024-07-27 07:34:15.684 UTC [57] ERROR:  column "type" does not exist at character 45
nextcloud.postgres         | 2024-07-27 07:34:15.684 UTC [57] STATEMENT:  SELECT "appid", "configkey", "configvalue", "type" FROM "appconfig" WHERE "lazy" = $1
nextcloud.news_updater     | Nextcloud or one of the apps require upgrade - only a limited number of commands are available
nextcloud.news_updater     | You may use your browser or the occ upgrade command to do the upgrade
nextcloud.news_updater     |
nextcloud.news_updater     |
nextcloud.news_updater     |   There are no commands defined in the "news:updater" namespace.
nextcloud.news_updater     |
nextcloud.news_updater     |   Did you mean this?
nextcloud.news_updater     |       maintenance:update
nextcloud.news_updater     |
nextcloud.news_updater     |
nextcloud.news_updater     | 2024-07-27 09:34:15,794 - Nextcloud News Updater - ERROR - Command '['php', '-f', '/var/www/occ', 'news:updater:before-update']' returned non-zero exit status 1.: Trying again in 30 seconds
nextcloud.news_updater     | Traceback (most recent call last):
nextcloud.news_updater     |   File "/usr/lib/python3.12/site-packages/nextcloud_news_updater/api/updater.py", line 69, in run
nextcloud.news_updater     |     self.before_update()
nextcloud.news_updater     |   File "/usr/lib/python3.12/site-packages/nextcloud_news_updater/api/cli.py", line 103, in before_update
nextcloud.news_updater     |     self.cli.run(self.api.before_cleanup_command)
nextcloud.news_updater     |   File "/usr/lib/python3.12/site-packages/nextcloud_news_updater/api/cli.py", line 12, in run
nextcloud.news_updater     |     return check_output(commands)
nextcloud.news_updater     |            ^^^^^^^^^^^^^^^^^^^^^^
nextcloud.news_updater     |   File "/usr/lib/python3.12/subprocess.py", line 466, in check_output
nextcloud.news_updater     |     return run(*popenargs, stdout=PIPE, timeout=timeout, check=True,
nextcloud.news_updater     |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
nextcloud.news_updater     |   File "/usr/lib/python3.12/subprocess.py", line 571, in run
nextcloud.news_updater     |     raise CalledProcessError(retcode, process.args,
nextcloud.news_updater     | subprocess.CalledProcessError: Command '['php', '-f', '/var/www/occ', 'news:updater:before-update']' returned non-zero exit status 1.
nextcloud.postgres         | 2024-07-27 07:34:22.525 UTC [58] ERROR:  column "type" does not exist at character 45
nextcloud.postgres         | 2024-07-27 07:34:22.525 UTC [58] STATEMENT:  SELECT "appid", "configkey", "configvalue", "type" FROM "appconfig" WHERE "lazy" = $1
nextcloud.52480            | 192.168.255.12 - - [27/Jul/2024:09:34:22 +0200] "GET / HTTP/1.1" 503 15998 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:128.0) Gecko/20100101 Firefox/128.0"
nextcloud.postgres         | 2024-07-27 07:34:23.561 UTC [59] ERROR:  column "type" does not exist at character 45
nextcloud.postgres         | 2024-07-27 07:34:23.561 UTC [59] STATEMENT:  SELECT "appid", "configkey", "configvalue", "type" FROM "appconfig" WHERE "lazy" = $1
nextcloud.postgres         | 2024-07-27 07:34:23.561 UTC [60] ERROR:  column "type" does not exist at character 45
nextcloud.postgres         | 2024-07-27 07:34:23.561 UTC [60] STATEMENT:  SELECT "appid", "configkey", "configvalue", "type" FROM "appconfig" WHERE "lazy" = $1
nextcloud.52480            | 192.168.255.12 - - [27/Jul/2024:09:34:23 +0200] "GET / HTTP/1.1" 503 15998 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:128.0) Gecko/20100101 Firefox/128.0"
nextcloud.52480            | 192.168.255.12 - - [27/Jul/2024:09:34:23 +0200] "GET /index.php/apps/files/preview-service-worker.js HTTP/1.1" 404 1538 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:128.0) Gecko/20100101 Firefox/128.0"
nextcloud.postgres         | 2024-07-27 07:34:24.572 UTC [61] ERROR:  column "type" does not exist at character 45
nextcloud.postgres         | 2024-07-27 07:34:24.572 UTC [61] STATEMENT:  SELECT "appid", "configkey", "configvalue", "type" FROM "appconfig" WHERE "lazy" = $1
nextcloud.52480            | 192.168.255.12 - - [27/Jul/2024:09:34:24 +0200] "GET /index.php/apps/files/preview-service-worker.js HTTP/1.1" 404 1536 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:128.0) Gecko/20100101 Firefox/128.0"
nextcloud.52480            | 2024/07/27 09:34:39 [info] 591#591: *27 epoll_wait() reported that client prematurely closed connection, so upstream connection is closed too while sending request to upstream, client: 192.168.255.12, server: , request: "GET /index.php/204 HTTP/1.1", upstream: "fastcgi://unix:/var/run/php-fpm/php-fpm.sock:", host: "cloud.aronmgv.com"
nextcloud.52480            | 192.168.255.12 - macgyver [27/Jul/2024:09:34:39 +0200] "GET /index.php/204 HTTP/1.1" 499 0 "-" "Mozilla/5.0 (Windows) mirall/3.13.23.12-Win64 (build 20240708) (Nextcloud, windows-10.0.22631 ClientArchitecture: x86_64 OsArchitecture: x86_64)"
nextcloud.postgres         | 2024-07-27 07:34:39.561 UTC [62] ERROR:  column "type" does not exist at character 45
nextcloud.postgres         | 2024-07-27 07:34:39.561 UTC [62] STATEMENT:  SELECT "appid", "configkey", "configvalue", "type" FROM "appconfig" WHERE "lazy" = $1
nextcloud.postgres         | 2024-07-27 07:34:39.636 UTC [63] ERROR:  column "type" does not exist at character 45
nextcloud.postgres         | 2024-07-27 07:34:39.636 UTC [63] STATEMENT:  SELECT "appid", "configkey", "configvalue", "type" FROM "appconfig" WHERE "lazy" = $1
nextcloud.52480            | 192.168.255.12 - macgyver [27/Jul/2024:09:34:39 +0200] "GET /index.php/204 HTTP/1.1" 503 15998 "-" "Mozilla/5.0 (Windows) mirall/3.13.23.12-Win64 (build 20240708) (Nextcloud, windows-10.0.22631 ClientArchitecture: x86_64 OsArchitecture: x86_64)"
nextcloud.postgres         | 2024-07-27 07:34:39.658 UTC [64] ERROR:  column "type" does not exist at character 45
nextcloud.postgres         | 2024-07-27 07:34:39.658 UTC [64] STATEMENT:  SELECT "appid", "configkey", "configvalue", "type" FROM "appconfig" WHERE "lazy" = $1
nextcloud.52480            | 192.168.255.12 - macgyver [27/Jul/2024:09:34:39 +0200] "GET /status.php HTTP/1.1" 200 150 "-" "Mozilla/5.0 (Windows) mirall/3.13.23.12-Win64 (build 20240708) (Nextcloud, windows-10.0.22631 ClientArchitecture: x86_64 OsArchitecture: x86_64)"
nextcloud.postgres         | 2024-07-27 07:34:45.907 UTC [66] ERROR:  column "type" does not exist at character 45
nextcloud.postgres         | 2024-07-27 07:34:45.907 UTC [66] STATEMENT:  SELECT "appid", "configkey", "configvalue", "type" FROM "appconfig" WHERE "lazy" = $1
nextcloud.news_updater     | Nextcloud or one of the apps require upgrade - only a limited number of commands are available
nextcloud.news_updater     | You may use your browser or the occ upgrade command to do the upgrade
nextcloud.news_updater     |
nextcloud.news_updater     |
nextcloud.news_updater     |   There are no commands defined in the "news:updater" namespace.
nextcloud.news_updater     |
nextcloud.news_updater     |   Did you mean this?
nextcloud.news_updater     |       maintenance:update
nextcloud.news_updater     |
nextcloud.news_updater     |
nextcloud.news_updater     | 2024-07-27 09:34:46,016 - Nextcloud News Updater - ERROR - Command '['php', '-f', '/var/www/occ', 'news:updater:before-update']' returned non-zero exit status 1.: Trying again in 30 seconds
nextcloud.news_updater     | Traceback (most recent call last):
nextcloud.news_updater     |   File "/usr/lib/python3.12/site-packages/nextcloud_news_updater/api/updater.py", line 69, in run
nextcloud.news_updater     |     self.before_update()
nextcloud.news_updater     |   File "/usr/lib/python3.12/site-packages/nextcloud_news_updater/api/cli.py", line 103, in before_update
nextcloud.news_updater     |     self.cli.run(self.api.before_cleanup_command)
nextcloud.news_updater     |   File "/usr/lib/python3.12/site-packages/nextcloud_news_updater/api/cli.py", line 12, in run
nextcloud.news_updater     |     return check_output(commands)
nextcloud.news_updater     |            ^^^^^^^^^^^^^^^^^^^^^^
nextcloud.news_updater     |   File "/usr/lib/python3.12/subprocess.py", line 466, in check_output
nextcloud.news_updater     |     return run(*popenargs, stdout=PIPE, timeout=timeout, check=True,
nextcloud.news_updater     |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
nextcloud.news_updater     |   File "/usr/lib/python3.12/subprocess.py", line 571, in run
nextcloud.news_updater     |     raise CalledProcessError(retcode, process.args,
nextcloud.news_updater     | subprocess.CalledProcessError: Command '['php', '-f', '/var/www/occ', 'news:updater:before-update']' returned non-zero exit status 1.
nextcloud.postgres         | 2024-07-27 07:34:53.285 UTC [67] ERROR:  column "type" does not exist at character 45
nextcloud.postgres         | 2024-07-27 07:34:53.285 UTC [67] STATEMENT:  SELECT "appid", "configkey", "configvalue", "type" FROM "appconfig" WHERE "lazy" = $1
nextcloud.52480            | 192.168.255.12 - macgyver [27/Jul/2024:09:34:53 +0200] "GET /index.php/204 HTTP/1.1" 503 15998 "-" "Mozilla/5.0 (Windows) mirall/3.13.23.12-Win64 (build 20240708) (Nextcloud, windows-10.0.22631 ClientArchitecture: x86_64 OsArchitecture: x86_64)"
nextcloud.postgres         | 2024-07-27 07:34:53.321 UTC [68] ERROR:  column "type" does not exist at character 45
nextcloud.postgres         | 2024-07-27 07:34:53.321 UTC [68] STATEMENT:  SELECT "appid", "configkey", "configvalue", "type" FROM "appconfig" WHERE "lazy" = $1
nextcloud.52480            | 192.168.255.12 - macgyver [27/Jul/2024:09:34:53 +0200] "GET /status.php HTTP/1.1" 200 150 "-" "Mozilla/5.0 (Windows) mirall/3.13.23.12-Win64 (build 20240708) (Nextcloud, windows-10.0.22631 ClientArchitecture: x86_64 OsArchitecture: x86_64)"
nextcloud.cron             | crond: USER nextcloud pid 656 cmd php -f /var/www/cron.php
nextcloud.postgres         | 2024-07-27 07:35:00.801 UTC [69] ERROR:  column "type" does not exist at character 45
nextcloud.postgres         | 2024-07-27 07:35:00.801 UTC [69] STATEMENT:  SELECT "appid", "configkey", "configvalue", "type" FROM "appconfig" WHERE "lazy" = $1
nextcloud.postgres         | 2024-07-27 07:35:03.220 UTC [70] ERROR:  column "type" does not exist at character 45
nextcloud.postgres         | 2024-07-27 07:35:03.220 UTC [70] STATEMENT:  SELECT "appid", "configkey", "configvalue", "type" FROM "appconfig" WHERE "lazy" = $1
nextcloud.52480            | 192.168.255.12 - - [27/Jul/2024:09:35:03 +0200] "GET / HTTP/1.1" 503 15998 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:128.0) Gecko/20100101 Firefox/128.0"
nextcloud.postgres         | 2024-07-27 07:35:04.225 UTC [71] ERROR:  column "type" does not exist at character 45
nextcloud.postgres         | 2024-07-27 07:35:04.225 UTC [71] STATEMENT:  SELECT "appid", "configkey", "configvalue", "type" FROM "appconfig" WHERE "lazy" = $1
nextcloud.52480            | 192.168.255.12 - - [27/Jul/2024:09:35:04 +0200] "GET /index.php/apps/files/preview-service-worker.js HTTP/1.1" 404 1536 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:128.0) Gecko/20100101 Firefox/128.0"
nextcloud.postgres         | 2024-07-27 07:35:16.126 UTC [73] ERROR:  column "type" does not exist at character 45
nextcloud.postgres         | 2024-07-27 07:35:16.126 UTC [73] STATEMENT:  SELECT "appid", "configkey", "configvalue", "type" FROM "appconfig" WHERE "

Additional info

No response

kesselb commented 2 months ago

cc @tobiaskaminsky you run into it as well?

tobiasKaminsky commented 1 month ago

Yes, on AIO. I wanted to upgrade 28.0.0 to 29.x via AIO.

Solution was to manually install 28.0.2 inside AIO container and then upgrade to 29.x worked