Error upgrade Nextcloud on Docker-Compose to 24.0.1.1

Hello there,

after pulling the new Docker images with Docker-Compose I got an error while recreating my Nextcloud instance. I’m using the Compose-File based on this Github-Repo. My file looks like this:

version: '3'

services:
  db:
    image: mariadb:latest
    command: --transaction-isolation=READ-COMMITTED --binlog-format=ROW --skip-innodb-read-only-compressed
    restart: unless-stopped    
    volumes:
      - /raid/docker/nextcloud/db:/var/lib/mysql    
    environment:
      - MYSQL_ROOT_PASSWORD=<secret>
      - MYSQL_DATABASE=nextcloud
      - MYSQL_USER=nextcloud
      - MYSQL_PASSWORD=<secret>
      - TZ=Europe/Berlin
    env_file:
      - db.env

  redis:
    image: redis:alpine
    restart: unless-stopped

  app:
    image: nextcloud:fpm-alpine
    restart: unless-stopped
    volumes:
      - /raid/docker/nextcloud/data:/var/www/html
    environment:
      - MYSQL_HOST=db
      - REDIS_HOST=redis
      - TZ=Europe/Berlin
    env_file:
      - db.env
    depends_on:
      - db
      - redis

  web:
    build: ./web
    restart: unless-stopped
    ports:
      - 50100:80
    volumes:
      - /raid/docker/nextcloud/data:/var/www/html
    depends_on:
      - app

  cron:
    image: nextcloud:fpm-alpine
    restart: unless-stopped
    volumes:
      - /raid/docker/nextcloud/data:/var/www/html
    entrypoint: /cron.sh
    depends_on:
      - db
      - redis

After starting the instance the output will give me something like this over and over again:

...
cron_1   | Warning: include(/var/www/html/lib/composer/composer/../../../lib/private/AppFramework/Http/RequestId.php): Failed to open stream: No such file or directory in /var/www/html/lib/composer/composer/ClassLoader.php on line 571
cron_1   | 
cron_1   | Warning: include(): Failed opening '/var/www/html/lib/composer/composer/../../../lib/private/AppFramework/Http/RequestId.php' for inclusion (include_path='.:/usr/local/lib/php') in /var/www/html/lib/composer/composer/ClassLoader.php on line 571
cron_1   | 
cron_1   | Fatal error: Uncaught Error: Call to a member function getLogger() on null in /var/www/html/cron.php:189
cron_1   | Stack trace:
cron_1   | #0 {main}
cron_1   |   thrown in /var/www/html/cron.php on line 189
cron_1   | crond: wakeup dt=10
cron_1   | crond: wakeup dt=50
cron_1   | crond: file www-data:
cron_1   | crond:  line php -f /var/www/html/cron.php
cron_1   | crond: wakeup dt=60
...

All other containers of the stack are up and running, nextcloud_app is waiting for cron the be finished, which will not happen. The website itself has error 502 (Bad Gateway).

Some has an idea?
Thanks in advance! :slight_smile:

I see no reason why “app” should wait for “cron”… they are expected to run in parallel. and you don’t need cron to achieve basic functionality… most likely the issue is somewhere else. review the logs of “app” an “web” and maybe try starting the containers one by one so it’s easier to understand where the issue starts…

I remember redis requires password [from|for] some version - I’m not sure this is still true or not but could be a problem as well…

Hey, thanks for your fast answer!

I startet every container one by one (except cron, as you mentioned it’s not necessary atm.) and all containers started up successfully. App just gives me the following output:

app_1    | Configuring Redis as session handler
app_1    | Initializing nextcloud 24.0.1.1 ...
app_1    | Upgrading nextcloud from 24.0.0.12 ...
app_1    | Another process is initializing Nextcloud. Waiting 10 seconds...
app_1    | Another process is initializing Nextcloud. Waiting 20 seconds...
app_1    | Another process is initializing Nextcloud. Waiting 30 seconds...
app_1    | Another process is initializing Nextcloud. Waiting 40 seconds...
app_1    | Another process is initializing Nextcloud. Waiting 50 seconds...
app_1    | Another process is initializing Nextcloud. Waiting 60 seconds...
app_1    | Another process is initializing Nextcloud. Waiting 70 seconds...
app_1    | Another process is initializing Nextcloud. Waiting 80 seconds...
...

…what process?
Nothing happens… website is not reachable, web-container just says “connection failed”…

web_1    | 2022/05/29 19:36:01 [error] 24#24: *29 connect() failed (111: Connection refused) while connecting to upstream, client: 172.27.0.1, server: , request: "POST /index.php/apps/bookmarks/public/rest/v2/lock HTTP/1.1", upstream: "fastcgi://172.27.0.4:9000", host: "my.domain.com"

Looks like a known issue:

Thanks, this seemed to help a bit, at least the app containter is running again.

But every request to the website results in error 500

app_1    | 172.23.0.6 -  01/Jun/2022:16:33:51 +0000 "GET /index.php" 500

… and the website itself shows the following text:

Warning: include(/var/www/html/lib/composer/composer/../../../lib/private/AppFramework/Http/RequestId.php): Failed to open stream: No such file or directory in /var/www/html/lib/composer/composer/ClassLoader.php on line 571

Warning: include(): Failed opening '/var/www/html/lib/composer/composer/../../../lib/private/AppFramework/Http/RequestId.php' for inclusion (include_path='.:/usr/local/lib/php') in /var/www/html/lib/composer/composer/ClassLoader.php on line 571

Warning: Cannot modify header information - headers already sent by (output started at /var/www/html/lib/composer/composer/ClassLoader.php:571) in /var/www/html/index.php on line 80
Internal Server Error The server encountered an internal error and was unable to complete your request. Please contact the server administrator if this error reappears multiple times, please include the technical details below in your report. More details can be found in the webserver log.
Fatal error: Uncaught Error: Class "OC\AppFramework\Http\RequestId" not found in /var/www/html/lib/base.php:166 Stack trace: #0 /var/www/html/lib/base.php(583): OC::initPaths() #1 /var/www/html/lib/base.php(1104): OC::init() #2 /var/www/html/index.php(34): require_once('/var/www/html/l...') #3 {main} thrown in /var/www/html/lib/base.php on line 166