[Docker] Upgrade from 24.0.3.2 to 24.0.4.1 failed - Error: Class "OC\Http\IpUtils" not found

Nextcloud running in Docker env. on QNAP.
I got after upgrade following error:

root@nextcloud:/var/www/html# sudo -u www-data PHP_MEMORY_LIMIT=512M php occ upgrade
Nextcloud or one of the apps require upgrade - only a limited number of commands are available
You may use your browser or the occ upgrade command to do the upgrade
Setting log level to debug
Turned on maintenance mode
Updating database schema
Updated database
An unhandled exception has been thrown:
Error: Class "OC\Http\IpUtils" not found in /var/www/html/lib/private/Http/Client/LocalAddressChecker.php:48
Stack trace:
#0 /var/www/html/lib/private/Http/Client/DnsPinMiddleware.php(136): OC\Http\Client\LocalAddressChecker->ThrowIfLocalIp('176.9.217.53')
#1 /var/www/html/3rdparty/guzzlehttp/guzzle/src/PrepareBodyMiddleware.php(35): OC\Http\Client\DnsPinMiddleware->OC\Http\Client\{closure}(Object(GuzzleHttp\Psr7\Request), Array)
#2 /var/www/html/3rdparty/guzzlehttp/guzzle/src/Middleware.php(31): GuzzleHttp\PrepareBodyMiddleware->__invoke(Object(GuzzleHttp\Psr7\Request), Array)
#3 /var/www/html/3rdparty/guzzlehttp/guzzle/src/RedirectMiddleware.php(71): GuzzleHttp\Middleware::GuzzleHttp\{closure}(Object(GuzzleHttp\Psr7\Request), Array)
#4 /var/www/html/3rdparty/guzzlehttp/guzzle/src/Middleware.php(63): GuzzleHttp\RedirectMiddleware->__invoke(Object(GuzzleHttp\Psr7\Request), Array)
#5 /var/www/html/3rdparty/guzzlehttp/guzzle/src/HandlerStack.php(75): GuzzleHttp\Middleware::GuzzleHttp\{closure}(Object(GuzzleHttp\Psr7\Request), Array)
#6 /var/www/html/3rdparty/guzzlehttp/guzzle/src/Client.php(331): GuzzleHttp\HandlerStack->__invoke(Object(GuzzleHttp\Psr7\Request), Array)
#7 /var/www/html/3rdparty/guzzlehttp/guzzle/src/Client.php(168): GuzzleHttp\Client->transfer(Object(GuzzleHttp\Psr7\Request), Array)
#8 /var/www/html/3rdparty/guzzlehttp/guzzle/src/Client.php(187): GuzzleHttp\Client->requestAsync('get', Object(GuzzleHttp\Psr7\Uri), Array)
#9 /var/www/html/lib/private/Http/Client/Client.php(218): GuzzleHttp\Client->request('get', 'https://apps.ne...', Array)
#10 /var/www/html/lib/private/App/AppStore/Fetcher/Fetcher.php(120): OC\Http\Client\Client->get('https://apps.ne...', Array)
#11 /var/www/html/lib/private/App/AppStore/Fetcher/AppFetcher.php(87): OC\App\AppStore\Fetcher\Fetcher->fetch('', '')
#12 /var/www/html/lib/private/App/AppStore/Fetcher/Fetcher.php(192): OC\App\AppStore\Fetcher\AppFetcher->fetch('', '', false)
#13 /var/www/html/lib/private/App/AppStore/Fetcher/AppFetcher.php(188): OC\App\AppStore\Fetcher\Fetcher->get(false)
#14 /var/www/html/lib/private/Installer.php(422): OC\App\AppStore\Fetcher\AppFetcher->get(false)
#15 /var/www/html/lib/private/Updater.php(413): OC\Installer->isUpdateAvailable('accessibility')
#16 /var/www/html/lib/private/Updater.php(274): OC\Updater->upgradeAppStoreApps(Array)
#17 /var/www/html/lib/private/Updater.php(133): OC\Updater->doUpgrade('24.0.4.1', '24.0.3.2')
#18 /var/www/html/core/Command/Upgrade.php(235): OC\Updater->upgrade()
#19 /var/www/html/3rdparty/symfony/console/Command/Command.php(255): OC\Core\Command\Upgrade->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#20 /var/www/html/3rdparty/symfony/console/Application.php(1009): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#21 /var/www/html/3rdparty/symfony/console/Application.php(273): Symfony\Component\Console\Application->doRunCommand(Object(OC\Core\Command\Upgrade), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#22 /var/www/html/3rdparty/symfony/console/Application.php(149): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#23 /var/www/html/lib/private/Console/Application.php(211): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#24 /var/www/html/console.php(100): OC\Console\Application->run()
#25 /var/www/html/occ(11): require_once('/var/www/html/c...')

Tried also repair, still no success:

root@nextcloud:/var/www/html# sudo -u www-data PHP_MEMORY_LIMIT=512M php occ maintenance:repair
Nextcloud or one of the apps require upgrade - only a limited number of commands are available
You may use your browser or the occ upgrade command to do the upgrade
 - Repair MySQL collation
     - All tables already have the correct collation -> nothing to do
 - Repair mime types
 - Clean tags and favorites
     - 0 tags of deleted users have been removed.
     - 0 tags for delete files have been removed.
     - 0 tag entries for deleted tags have been removed.
     - 0 tags with no entries have been removed.
 - Repair invalid shares
 - Move .step file of updater to backup location
 - Add move avatar background job
     - Repair step already executed
 - Add preview cleanup background jobs
 - Migrate oauth2_clients table to nextcloud schema
     - Update the oauth2_access_tokens table schema.
     - Update the oauth2_clients table schema.
 - Fix potential broken mount points
     - No mounts updated
 - Repair language codes
 - Install new core bundle components
 - Add log rotate job
 - Clear frontend caches
     - Image cache cleared
     - SCSS cache cleared
     - JS cache cleared
 - Clear every generated avatar on major updates
 - Add preview background cleanup job
 - Queue a one-time job to cleanup old backups of the updater
 - Cleanup invalid photocache files for carddav
 - Add background job to cleanup login flow v2 tokens
 - Remove potentially over exposing share links
     - No need to remove link shares.
 - Clear access cache of projects
 - Reset generated avatar flag
 - Keep legacy encryption enabled
 - Check encryption key format
 - Remove old dashboard app config data
 - Add job to cleanup the bruteforce entries
 - Queue a one-time job to check for user uploaded certificates
 - Repair DAV shares
 - Add background job to set the lookup server share state for users
 - Update name of the stored view
 - Upgrading Circles App
 - Fix component of birthday calendars
     - 8 birthday calendars updated.
 - Regenerating birthday calendars to use new icons and fix old birthday events without year
     - Repair step already executed
 - Fix broken values of calendar objects
    0 [->--------------------------]
 - Registering building of calendar search index as background job
     - Repair step already executed
 - Register building of social profile search index as background job
 - Registering background jobs to update cache for webcal calendars
     - Added 0 background jobs to update webcal calendars
 - Registering building of calendar reminder index as background job
     - Repair step already executed
 - Clean up orphan event and contact data
     - 0 events without a calendar have been cleaned up
     - 0 properties without an events have been cleaned up
     - 0 changes without a calendar have been cleaned up
     - 0 cached events without a calendar subscription have been cleaned up
     - 0 changes without a calendar subscription have been cleaned up
     - 0 contacts without an addressbook have been cleaned up
     - 0 properties without a contact have been cleaned up
     - 0 changes without an addressbook have been cleaned up
 - Remove activity entries of private events
     - Removed 0 activity entries
 - Clean up old calendar subscriptions from deleted users that were not cleaned-up
    0 [----->----------------------]
     - 0 calendar subscriptions without an user have been cleaned up
 - Fix the share type of guest shares when migrating from ownCloud
 - Copy the share password into the dedicated column
 - Set existing shares as accepted
 - Clean up meta table
 - Update OAuth token expiration times
 - Switches from default updater server to the customer one if a valid subscription is available
     - Repair step already executed
 - Send an admin notification if monthly report is disabled
 - Add background job to check for backup codes
 - Populating added database structures for workflows
root@nextcloud:/var/www/html# sudo -u www-data PHP_MEMORY_LIMIT=512M php occ upgrade           
Nextcloud or one of the apps require upgrade - only a limited number of commands are available
You may use your browser or the occ upgrade command to do the upgrade
Setting log level to debug
Updating database schema
Updated database
An unhandled exception has been thrown:
Error: Class "OC\Http\IpUtils" not found in /var/www/html/lib/private/Http/Client/LocalAddressChecker.php:48
Stack trace:
#0 /var/www/html/lib/private/Http/Client/DnsPinMiddleware.php(136): OC\Http\Client\LocalAddressChecker->ThrowIfLocalIp('176.9.217.53')
#1 /var/www/html/3rdparty/guzzlehttp/guzzle/src/PrepareBodyMiddleware.php(35): OC\Http\Client\DnsPinMiddleware->OC\Http\Client\{closure}(Object(GuzzleHttp\Psr7\Request), Array)
#2 /var/www/html/3rdparty/guzzlehttp/guzzle/src/Middleware.php(31): GuzzleHttp\PrepareBodyMiddleware->__invoke(Object(GuzzleHttp\Psr7\Request), Array)
#3 /var/www/html/3rdparty/guzzlehttp/guzzle/src/RedirectMiddleware.php(71): GuzzleHttp\Middleware::GuzzleHttp\{closure}(Object(GuzzleHttp\Psr7\Request), Array)
#4 /var/www/html/3rdparty/guzzlehttp/guzzle/src/Middleware.php(63): GuzzleHttp\RedirectMiddleware->__invoke(Object(GuzzleHttp\Psr7\Request), Array)
#5 /var/www/html/3rdparty/guzzlehttp/guzzle/src/HandlerStack.php(75): GuzzleHttp\Middleware::GuzzleHttp\{closure}(Object(GuzzleHttp\Psr7\Request), Array)
#6 /var/www/html/3rdparty/guzzlehttp/guzzle/src/Client.php(331): GuzzleHttp\HandlerStack->__invoke(Object(GuzzleHttp\Psr7\Request), Array)
#7 /var/www/html/3rdparty/guzzlehttp/guzzle/src/Client.php(168): GuzzleHttp\Client->transfer(Object(GuzzleHttp\Psr7\Request), Array)
#8 /var/www/html/3rdparty/guzzlehttp/guzzle/src/Client.php(187): GuzzleHttp\Client->requestAsync('get', Object(GuzzleHttp\Psr7\Uri), Array)
#9 /var/www/html/lib/private/Http/Client/Client.php(218): GuzzleHttp\Client->request('get', 'https://apps.ne...', Array)
#10 /var/www/html/lib/private/App/AppStore/Fetcher/Fetcher.php(120): OC\Http\Client\Client->get('https://apps.ne...', Array)
#11 /var/www/html/lib/private/App/AppStore/Fetcher/AppFetcher.php(87): OC\App\AppStore\Fetcher\Fetcher->fetch('', '')
#12 /var/www/html/lib/private/App/AppStore/Fetcher/Fetcher.php(192): OC\App\AppStore\Fetcher\AppFetcher->fetch('', '', false)
#13 /var/www/html/lib/private/App/AppStore/Fetcher/AppFetcher.php(188): OC\App\AppStore\Fetcher\Fetcher->get(false)
#14 /var/www/html/lib/private/Installer.php(422): OC\App\AppStore\Fetcher\AppFetcher->get(false)
#15 /var/www/html/lib/private/Updater.php(413): OC\Installer->isUpdateAvailable('accessibility')
#16 /var/www/html/lib/private/Updater.php(274): OC\Updater->upgradeAppStoreApps(Array)
#17 /var/www/html/lib/private/Updater.php(133): OC\Updater->doUpgrade('24.0.4.1', '24.0.3.2')
#18 /var/www/html/core/Command/Upgrade.php(235): OC\Updater->upgrade()
#19 /var/www/html/3rdparty/symfony/console/Command/Command.php(255): OC\Core\Command\Upgrade->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#20 /var/www/html/3rdparty/symfony/console/Application.php(1009): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#21 /var/www/html/3rdparty/symfony/console/Application.php(273): Symfony\Component\Console\Application->doRunCommand(Object(OC\Core\Command\Upgrade), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#22 /var/www/html/3rdparty/symfony/console/Application.php(149): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#23 /var/www/html/lib/private/Console/Application.php(211): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#24 /var/www/html/console.php(100): OC\Console\Application->run()
#25 /var/www/html/occ(11): require_once('/var/www/html/c...')
#26 {main}root@nextcloud:/var/www/html#

Problem solved.

Nach dem Update des Containers waren die Berechtigungen auf dem Verzeichnis nicht mehr richtig.

Nach Änderung mit:

sudo chown -R www-data:www-data .

ist alles wieder ok.