Nextcloud died after Ubuntu upgrade from 22.04 to 24.04

The Basics

  • Nextcloud Server version (e.g., 29.x.x):
    • 28.0.14.1
  • Operating system and version (e.g., Ubuntu 24.04):
    • Ubuntu 24.04
  • Web server and version (e.g, Apache 2.4.25):
    • Nginx 1.24.0
  • Reverse proxy and version _(e.g. nginx 1.27.2)
    • Cloudflare
  • PHP version (e.g, 8.3):
    • 8.3
  • Is this the first time you’ve seen this error? (Yes / No):
    • yes
  • When did this problem seem to first start?
    • after the upgrade is complete to 24.04 from 22.04
  • Installation method (e.g. AlO, NCP, Bare Metal/Archive, etc.)
    • bare metal
  • Are you using CloudfIare, mod_security, or similar? (Yes / No)
    • Cloudflare yes

I’m not able to access my nextcloud after the OS upgrade. Here’s the error I got.

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.

First I found out that the upgrade also upgraded my PHP from 8.1 to 8.3 which I fixed. Everything is up and running. I checked Cloudflare, and it said the web is running. Check on my PHP checker that I created and it’s working. Check the nextcloud.log and I’m not seeing any error. Checking the nginx log and it’s cleared after I fixed the sock issue by changing it from 8.1 to 8.3.

Nextcloud log:

10.1.10.113 - - [13/Mar/2025:19:23:50 -0400] "GET /index.php/204 HTTP/1.1" 500 301 "-" "Mozilla/5.0 (Android) Nextcloud-android/3.31.0"
10.1.10.113 - - [13/Mar/2025:19:25:26 -0400] "GET / HTTP/1.1" 500 301 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/134.0.0.0 Safari/537.36"
10.1.10.113 - - [13/Mar/2025:19:25:26 -0400] "GET /favicon.ico HTTP/1.1" 500 301 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/134.0.0.0 Safari/537.36"
10.1.10.113 - - [13/Mar/2025:19:25:28 -0400] "GET /index.php/apps/files/preview-service-worker.js HTTP/1.1" 500 301 "https://my.web.net/index.php/apps/files/preview-service-worker.js" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/134.0.0.0 Safari/537.36"
10.1.10.113 - - [13/Mar/2025:19:25:38 -0400] "GET / HTTP/1.1" 500 301 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/134.0.0.0 Safari/537.36"
10.1.10.113 - - [13/Mar/2025:19:25:38 -0400] "GET /favicon.ico HTTP/1.1" 500 301 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/134.0.0.0 Safari/537.36"
10.1.10.113 - - [13/Mar/2025:19:25:39 -0400] "GET / HTTP/1.1" 500 301 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/134.0.0.0 Safari/537.36"
10.1.10.113 - - [13/Mar/2025:19:25:39 -0400] "GET /favicon.ico HTTP/1.1" 500 301 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/134.0.0.0 Safari/537.36"
10.1.10.113 - - [13/Mar/2025:19:25:41 -0400] "GET /index.php/apps/files/preview-service-worker.js HTTP/1.1" 500 301 "https://my.web.net/index.php/apps/files/preview-service-worker.js" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/134.0.0.0 Safari/537.36"
10.1.10.113 - - [13/Mar/2025:19:26:10 -0400] "GET /index.php/apps/files/preview-service-worker.js HTTP/1.1" 500 301 "https://my.web.net/index.php/apps/files/preview-service-worker.js" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/134.0.0.0 Safari/537.36"
10.1.10.113 - - [13/Mar/2025:19:28:36 -0400] "GET / HTTP/1.1" 500 301 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/134.0.0.0 Safari/537.36"
10.1.10.113 - - [13/Mar/2025:19:28:37 -0400] "GET /favicon.ico HTTP/1.1" 500 301 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/134.0.0.0 Safari/537.36"
10.1.10.113 - - [13/Mar/2025:19:28:39 -0400] "GET /index.php/apps/files/preview-service-worker.js HTTP/1.1" 500 301 "https://my.web.net/index.php/apps/files/preview-service-worker.js" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/134.0.0.0 Safari/537.36"
10.1.10.113 - - [13/Mar/2025:19:29:10 -0400] "GET /index.php/apps/files/preview-service-worker.js HTTP/1.1" 500 301 "https://my.web.net/index.php/apps/files/preview-service-worker.js" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/134.0.0.0 Safari/537.36"
10.1.10.113 - - [13/Mar/2025:19:55:31 -0400] "GET /index.php/204 HTTP/1.1" 500 301 "-" "Mozilla/5.0 (Android) Nextcloud-android/3.31.0"
10.1.10.113 - - [13/Mar/2025:19:55:31 -0400] "GET /index.php/204 HTTP/1.1" 500 301 "-" "Mozilla/5.0 (Android) Nextcloud-android/3.31.0"
10.1.10.113 - - [13/Mar/2025:19:55:31 -0400] "GET /index.php/204 HTTP/1.1" 500 301 "-" "Mozilla/5.0 (Android) Nextcloud-android/3.31.0"
10.1.10.113 - rb [13/Mar/2025:19:55:31 -0400] "PROPFIND /remote.php/dav/files/rb/ HTTP/1.1" 500 301 "-" "Mozilla/5.0 (Android) Nextcloud-android/3.31.0"
10.1.10.113 - - [13/Mar/2025:20:10:40 -0400] "GET /index.php/204 HTTP/1.1" 500 301 "-" "Mozilla/5.0 (Android) Nextcloud-android/3.31.0"
10.1.10.113 - rb [13/Mar/2025:20:10:40 -0400] "PROPFIND /remote.php/dav/files/rb/ HTTP/1.1" 500 301 "-" "Mozilla/5.0 (Android) Nextcloud-android/3.31.0"
10.1.10.113 - - [13/Mar/2025:20:10:40 -0400] "GET /index.php/204 HTTP/1.1" 500 301 "-" "Mozilla/5.0 (Android) Nextcloud-android/3.31.0"
10.1.10.113 - - [13/Mar/2025:20:10:40 -0400] "GET /index.php/204 HTTP/1.1" 500 301 "-" "Mozilla/5.0 (Android) Nextcloud-android/3.31.0"
10.1.10.113 - - [13/Mar/2025:20:25:41 -0400] "GET /index.php/204 HTTP/1.1" 500 301 "-" "Mozilla/5.0 (Android) Nextcloud-android/3.31.0"
10.1.10.113 - - [13/Mar/2025:20:40:42 -0400] "GET /index.php/204 HTTP/1.1" 500 301 "-" "Mozilla/5.0 (Android) Nextcloud-android/3.31.0"
10.1.10.113 - - [13/Mar/2025:20:40:43 -0400] "GET /index.php/204 HTTP/1.1" 500 301 "-" "Mozilla/5.0 (Android) Nextcloud-android/3.31.0"
10.1.10.113 - - [13/Mar/2025:20:44:17 -0400] "GET / HTTP/1.1" 500 301 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/134.0.0.0 Safari/537.36"
10.1.10.113 - - [13/Mar/2025:20:44:17 -0400] "GET /favicon.ico HTTP/1.1" 500 301 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/134.0.0.0 Safari/537.36"
10.1.10.113 - - [13/Mar/2025:20:44:19 -0400] "GET /index.php/apps/files/preview-service-worker.js HTTP/1.1" 500 301 "https://my.web.net/index.php/apps/files/preview-service-worker.js" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/134.0.0.0 Safari/537.36"
10.1.10.113 - - [13/Mar/2025:20:44:49 -0400] "GET /index.php/apps/files/preview-service-worker.js HTTP/1.1" 500 301 "https://my.web.net/index.php/apps/files/preview-service-worker.js" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/134.0.0.0 Safari/537.36"

I’m not sure where to go to start debugging it. Please advise.

First check for correct PHP version. You need PHP 8.3. Because of here you can use PHP 8.3 also for Nextcloud 28. Please upgrade to newer Nextcloud versions look here.

Check for your php versions:
dpkg -l |grep php

Maybe somethink is missing:
php8.3-{gd,intl,zip,bz2,curl,mbstring,xml,imagick,redis}

Check also nginx in you nginx configuration files:

upstream php-handler {
    server unix:/run/php/php8.3-fpm.sock;
}

On change execute
sudo systemctl restart nginx

This can also be triggered by an app that is no longer supported. If this is the case, you must deactivate the app with the occ command.

Thanks @devnull. As part of the upgrade, it upgraded the PHP from 8.1 to 8.3 which I fixed when I found out that my php-fpm won’t start because the config was still pointing to the php8.1-fpm.sock. Nginx and Php-FPM are up and running and there’s no missing piece error. This is why I’m very puzzled.

Thanks @Sanook. Is there a log or something I can check to see which app that’s no longer supported? I know one of the app is always causing the problem which I disabled it prior upgrade but it still crap on me.

tail -F nextcloud.log | jq

You can have a look at the App Store and compare if your app is still supported.

You should remove the apps-install-overwrite array from config/config.php before updating.

Then run the → nc-apps ← script with this command:

nc-apps not_shipped --unsupported --nopager

you must be patient to let it scan. That can be a little bit time consuming but the scan result it delivers is absolute acurate.

Then you can deactivate the not supported apps to see if that solves your internal server error.


Additionally, you can run the → php-updater ← script, which will find most configuration errors that have crept into the php configuration after an update like the one you did and can fix them.

h.t.h


Much and good luck,
ernolf

1 Like

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.