NextCloud : Erreur : « Unable to generate a URL for the named route \ »theming.Theming.getImage\ » as such route does not exist. »

136 x served & 20 x viewed

Suite à la mise à jours en NextCloud 21.0.4 sur Ubuntu j’ai eu plusieurs erreurs (via la mise à jours sur l’interface):

"Unable to generate a URL for the named route \"theming.Theming.getImage\" as such route does not exist."
"Unable to generate a URL for the named route \"calendar.view.index\" as such route does not exist."
"Unable to generate a URL for the named route \"dashboard.dashboard.index\" as such route does not exist."
"Unable to generate a URL for the named route \"duplicatefinder.page.index\" as such route does not exist."
"Unable to generate a URL for the named route \"notes.page.index\" as such route does not exist."
..

J’ai donc fait le process de mise à jours en ligne de commande :

# sudo -u www-data php /usr/share/nginx/nextcloud/updater/updater.phar
Nextcloud Updater - version: v20.0.0beta4-11-g68fa0d4

Current version is 21.0.4.

Update to Nextcloud 21.0.4 available. (channel: "stable")
Following file will be downloaded automatically: https://download.nextcloud.com/server/releases/nextcloud-21.0.4.zip
Open changelog ↗

Steps that will be executed:
[✔] Check for expected files
[✔] Check for write permissions
[✔] Create backup
[✔] Downloading
[✔] Verify integrity
[✔] Extracting
[✔] Enable maintenance mode
[✔] Replace entry points
[✔] Delete old files
[✔] Move new files in place
[✔] Done

Continue update? [y/N] y
Info: Pressing Ctrl-C will finish the currently running step and then stops the updater.

[✔] Check for expected files
[✔] Check for write permissions
[✔] Create backup
[✔] Downloading
[✔] Verify integrity
[✔] Extracting
[✔] Enable maintenance mode
[✔] Replace entry points
[✔] Delete old files
[✔] Move new files in place
[✔] Done

Update of code successful.

Should the "occ upgrade" command be executed? [Y/n] Y

...
# sudo -u www-data php /usr/share/nginx/nextcloud/occ upgrade
Nextcloud is already latest version

Je pense donc qu’il y avait un problème de mémoire … la version de php est la suivante :

# php --version
PHP 8.0.9 (cli) (built: Jul 30 2021 13:03:39) ( NTS )
Copyright (c) The PHP Group
Zend Engine v4.0.9, Copyright (c) Zend Technologies
    with Zend OPcache v8.0.9, Copyright (c), by Zend Technologies

Quand j’ai regardé les logs : /var/log/php7.3-fpm.log j’avais énormément d’erreur :

WARNING: [pool www] server reached pm.max_children setting (5), consider raising it

Donc NGINX qui utilise 7.3 est limité … j’ai donc changé la configuration et relancé NGINX :

# grep "^pm.max_children" /etc/php/7.3/fpm/pool.d/www.conf 
pm.max_children = 10
# systemctl restart nginx.service

A suivre ….

Nextcloud : Problème dans la rotation des fichiers nextcloud.log

115 x served & 3 x viewed

J’ai pas compris pourquoi cela ne fonctionnait pas, donc pour l’instant je fais manuellement …

# du -sh /usr/share/nginx/nextcloud/data/nextcloud.log 
3,5G	/usr/share/nginx/nextcloud/data/nextcloud.log
# du -sh /var/log/nextcloud.log
6,4G	/var/log/nextcloud.log
# sudo -u www-data truncate /usr/share/nginx/nextcloud/data/nextcloud.log --size 0
# sudo -u www-data truncate /var/log/nextcloud.log --size 0
# sudo systemctl restart php8.0-fpm 
# sudo systemctl restart ngnix

A suivre pour une vrai résolution.

NextCloud : APCu not available for local cache (Is the matching PHP module installed and enabled?)

422 x served & 358 x viewed

J’ai du eu l’erreur suivante sur NextCloud (sous Ubuntu):

# sudo -u www-data php8.0 -f /usr/share/nginx/nextcloud/occ maintenance:repair
An unhandled exception has been thrown:
OC\HintException: [0]: Memcache \OC\Memcache\APCu not available for local cache (Is the matching PHP module installed and enabled?)

Pour fixer l’erreur j’ai du faire :

# sudo ln -s /etc/php/8.0/mods-available/apcu.ini /etc/php/8.0/fpm/conf.d/30-apcu.ini
# sudo echo 'apc.enable_cli=1' >> /etc/php/8.0/mods-available/apcu.ini
# sudo systemctl restart php8.0-fpm

Maintenant c’est fixé.

NextCloud : Crash : Undefined class constant ‘MAJOR_VERSION’ in guzzlehttp

171 x served & 57 x viewed

Suite à l’update de NextCloud j’ai eu un crash :

Type : Error
Code : 0
Message : Undefined class constant 'MAJOR_VERSION'
Fichier : /usr/share/nginx/nextcloud/3rdparty/guzzlehttp/guzzle/src/Utils.php
Ligne : 118

Trace

#0 /usr/share/nginx/nextcloud/3rdparty/guzzlehttp/guzzle/src/functions.php(71): GuzzleHttp\Utils::defaultUserAgent()
#1 /usr/share/nginx/nextcloud/apps/files_external_gdrive/vendor/guzzlehttp/guzzle/src/Client.php(194): GuzzleHttp\default_user_agent()
#2 /usr/share/nginx/nextcloud/apps/files_external_gdrive/vendor/guzzlehttp/guzzle/src/Client.php(75): GuzzleHttp\Client->configureDefaults(Array)
#3 /usr/share/nginx/nextcloud/lib/private/Http/Client/ClientService.php(62): GuzzleHttp\Client->__construct()
#4 /usr/share/nginx/nextcloud/lib/private/OCS/DiscoveryService.php(55): OC\Http\Client\ClientService->newClient()
#5 /usr/share/nginx/nextcloud/lib/private/Server.php(1264): OC\OCS\DiscoveryService->__construct(Object(OC\Memcache\Factory), Object(OC\Http\Client\ClientService))
#6 /usr/share/nginx/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php(155): OC\Server->OC\{closure}(Object(OC\Server))
#7 /usr/share/nginx/nextcloud/3rdparty/pimple/pimple/src/Pimple/Container.php(118): OC\AppFramework\Utility\SimpleContainer->OC\AppFramework\Utility\{closure}(Object(Pimple\Container))
#8 /usr/share/nginx/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php(122): Pimple\Container->offsetGet('OCP\\OCS\\IDiscov...')
#9 /usr/share/nginx/nextcloud/lib/private/ServerContainer.php(137): OC\AppFramework\Utility\SimpleContainer->query('OCP\\OCS\\IDiscov...', false)
#10 /usr/share/nginx/nextcloud/lib/private/AppFramework/DependencyInjection/DIContainer.php(434): OC\ServerContainer->query('OCP\\OCS\\IDiscov...', true)
#11 /usr/share/nginx/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php(87): OC\AppFramework\DependencyInjection\DIContainer->query('OCP\\OCS\\IDiscov...', true)
#12 [internal function]: OC\AppFramework\Utility\SimpleContainer->OC\AppFramework\Utility\{closure}(Object(ReflectionParameter))
#13 /usr/share/nginx/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php(101): array_map(Object(Closure), Array)
#14 /usr/share/nginx/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php(109): OC\AppFramework\Utility\SimpleContainer->buildClass(Object(ReflectionClass))
#15 /usr/share/nginx/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php(126): OC\AppFramework\Utility\SimpleContainer->resolve('OCA\\FederatedFi...')
#16 /usr/share/nginx/nextcloud/lib/private/AppFramework/DependencyInjection/DIContainer.php(459): OC\AppFramework\Utility\SimpleContainer->query('OCA\\FederatedFi...')
#17 /usr/share/nginx/nextcloud/lib/private/AppFramework/DependencyInjection/DIContainer.php(431): OC\AppFramework\DependencyInjection\DIContainer->queryNoFallback('OCA\\FederatedFi...')
#18 /usr/share/nginx/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php(87): OC\AppFramework\DependencyInjection\DIContainer->query('OCA\\FederatedFi...', true)
#19 [internal function]: OC\AppFramework\Utility\SimpleContainer->OC\AppFramework\Utility\{closure}(Object(ReflectionParameter))
#20 /usr/share/nginx/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php(101): array_map(Object(Closure), Array)
#21 /usr/share/nginx/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php(109): OC\AppFramework\Utility\SimpleContainer->buildClass(Object(ReflectionClass))
#22 /usr/share/nginx/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php(126): OC\AppFramework\Utility\SimpleContainer->resolve('OCA\\FederatedFi...')
#23 /usr/share/nginx/nextcloud/lib/private/AppFramework/DependencyInjection/DIContainer.php(459): OC\AppFramework\Utility\SimpleContainer->query('OCA\\FederatedFi...')
#24 /usr/share/nginx/nextcloud/lib/private/ServerContainer.php(146): OC\AppFramework\DependencyInjection\DIContainer->queryNoFallback('OCA\\FederatedFi...')
#25 /usr/share/nginx/nextcloud/apps/provisioning_api/lib/Capabilities.php(50): OC\ServerContainer->query('OCA\\FederatedFi...')
#26 /usr/share/nginx/nextcloud/lib/private/CapabilitiesManager.php(72): OCA\Provisioning_API\Capabilities->getCapabilities()
#27 /usr/share/nginx/nextcloud/lib/private/Template/JSConfigHelper.php(183): OC\CapabilitiesManager->getCapabilities()
#28 /usr/share/nginx/nextcloud/lib/private/TemplateLayout.php(211): OC\Template\JSConfigHelper->getConfig()
#29 /usr/share/nginx/nextcloud/lib/private/legacy/OC_Template.php(183): OC\TemplateLayout->__construct('user', 'dashboard')
#30 /usr/share/nginx/nextcloud/lib/public/AppFramework/Http/TemplateResponse.php(210): OC_Template->fetchPage(Array)
#31 /usr/share/nginx/nextcloud/lib/private/AppFramework/Http/Dispatcher.php(172): OCP\AppFramework\Http\TemplateResponse->render()
#32 /usr/share/nginx/nextcloud/lib/private/AppFramework/App.php(157): OC\AppFramework\Http\Dispatcher->dispatch(Object(OCA\Dashboard\Controller\DashboardController), 'index')
#33 /usr/share/nginx/nextcloud/lib/private/Route/Router.php(302): OC\AppFramework\App::main('OCA\\Dashboard\\C...', 'index', Object(OC\AppFramework\DependencyInjection\DIContainer), Array)
#34 /usr/share/nginx/nextcloud/lib/base.php(993): OC\Route\Router->match('/apps/dashboard...')
#35 /usr/share/nginx/nextcloud/index.php(37): OC::handleRequest()
#36 {main}

Pour fixer le problème j’ai supprimé le plugins : files_external_gdrive
Le plugins utilisait une ancienne version : /usr/share/nginx/nextcloud/apps/files_external_gdrive/vendor/guzzlehttp/guzzle/src/ClientInterface.php alors qu’il fallait utiliser la nouvelle version : /usr/share/nginx/nextcloud/3rdparty/guzzlehttp/guzzle/src/ClientInterface.php

rm -rf /usr/share/nginx/nextcloud/apps/files_external_gdrive/

Le problème est donc fixé.

A suivre.