Internal server error after upgrade to 24.0.4.1

Hello all. I’ve faced a problem after upgrade to 24.0.4

nextcloud:production from hub.docker.com, mariadb 10.5

Docker compose:

services:
    image: nextcloud:production
    container_name: nextcloud
    hostname: nas
    restart: always
    ports:
      - "50082:80"
    links:
      - db
    volumes:
      - /mnt/media/docker/containers/nextcloud/:/var/www/html
      - /mnt/media/docker/containers/nextcloud/apps:/var/www/html/custom_apps
      - /mnt/media/docker/containers/nextcloud/config:/var/www/html/config
      - /mnt/media/docker/containers/nextcloud/data:/var/www/html/data
    environment:
      - MYSQL_PASSWORD=
      - MYSQL_DATABASE=nextcloud
      - MYSQL_USER=nextcloud
      - MYSQL_HOST=db
      - NEXTCLOUD_ADMIN_USER=admin
      - NEXTCLOUD_ADMIN_PASSWORD=
  db:
    image: mariadb:10.5
    container_name: nextcloud-db
    hostname: nas
    restart: always
    command: --transaction-isolation=READ-COMMITTED --binlog-format=ROW 
    volumes:
      - /mnt/media/docker/containers/nextcloud/db:/var/lib/mysql
    environment:
      - MYSQL_ROOT_PASSWORD=
      - MYSQL_PASSWORD=
      - MYSQL_DATABASE=nextcloud
      - MYSQL_USER=nextcloud

After upgrade I see this

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 server log.

Nextcloud log - https://0x0.st/oppO.log

Seems like I even have no option to downgrade…

nextcloud     | Can't start Nextcloud because the version of the data (24.0.4.1) is higher than the docker image version (24.0.3.2) and downgrading is not supported. Are you sure you have pulled the newest image version?

How to restore nextcloud? TBO it’s not the first time I see this error. It follows me almost every upgrade of docker image. Earlier I just gave up and recreated whole nextcloud container from scratch. But I’m done now. Is there any way to restore it and make fully functional? Thanks.

This message indicates the problem. Somehow your docker image version has been rolled back. Make sure you are running the latest version.

Typically all you need to do with Docker compose is run:

docker compose pull
docker compose up -d

Hello, KarlF12.

No, it was me trying to roll back image to older version. I took my backup tarball (docker image) with nextcloud 24.0.3.2 and load it. Seems like in some configs NC version remains the same it was set when creating first container (AFAIU because of persistent volumes with configs). I fixed NC version in version.php and config.php. Now it works, but as 24.0.3.2 which in fact it is. I still unable to upgrade to 24.0.4 without “Internal server error”. I’m not much of an expert in php and db stuff, so I can’t get what goes wrong. Log tells me nothing. No, I see, that curl was unable to fetch something, but why? If I go to container (docker exec -it nextcloud bash), I see that network is fine. I’m able to curl, apt update, dig, ping, including other containers by ip and container names.

As the previous error mentioned, downgrading is not supported, so that was a pretty risky move. Especially since you will just have to upgrade again to troubleshoot it.

That log link you posted won’t load for me.

It was OK for me cause I always have backup of my data, configs and images.

Reuploaded log to patebin.

Part 1 - "time": "2022-08-31T10:58:06+00:00", "remoteAddr": "192.168.77.28", "use - Pastebin.com
Part 2 - ] }, { "file": "/var/www/html/3rdparty/guzzlehttp - Pastebin.com
Part 3 - "line": 63, "function": "__invoke", "class": "GuzzleHt - Pastebin.com

There is a lot more that goes on during the upgrade than changing version numbers, thus rolling back version numbers does not fully undo the upgrade. I have no idea if the upgrade will work or not now that it’s in an inconsistent state.

When you run the upgrade, look for errors in the docker container log. Maybe something there will indicate the problem.

docker compose logs -f