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

75 x served & 0 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?)

62 x served & 8 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

96 x served & 7 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.

NexCloud : Mise à jours en version 20.0.10

102 x served & 12 x viewed

Avant la mise à jours j’ai du lancer une commande :

#  sudo -u www-data php7.3 /usr/share/nginx/nextcloud/occ db:convert-filecache-bigint
[sudo] password for XXXXX:
Following columns will be updated:

* federated_reshares.share_id
* filecache_extended.fileid
* files_trash.auto_id
* share_external.id
* share_external.parent

This can take up to hours, depending on the number of files in your instance!
Continue with the conversion (y/n)? [n] An unhandled exception has been thrown:
Error: Call to undefined method Symfony\Component\Console\Question\ConfirmationQuestion::getAutocompleterCallback() in /usr/share/nginx/nextcloud/3rdparty/symfony/console/Helper/QuestionHelper.php:108
Stack trace:
#0 /usr/share/nginx/nextcloud/3rdparty/symfony/console/Helper/QuestionHelper.php(61): Symfony\Component\Console\Helper\QuestionHelper->doAsk(Object(Symfony\Component\Console\Output\StreamOutput), Object(Symfony\Component\Console\Question\ConfirmationQuestion))
#1 /usr/share/nginx/nextcloud/core/Command/Db/ConvertFilecacheBigInt.php(121): Symfony\Component\Console\Helper\QuestionHelper->ask(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\StreamOutput), Object(Symfony\Component\Console\Question\ConfirmationQuestion))
#2 /usr/share/nginx/nextcloud/3rdparty/symfony/console/Command/Command.php(255): OC\Core\Command\Db\ConvertFilecacheBigInt->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#3 /usr/share/nginx/nextcloud/3rdparty/symfony/console/Application.php(1000): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#4 /usr/share/nginx/nextcloud/3rdparty/symfony/console/Application.php(271): Symfony\Component\Console\Application->doRunCommand(Object(OC\Core\Command\Db\ConvertFilecacheBigInt), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#5 /usr/share/nginx/nextcloud/3rdparty/symfony/console/Application.php(147): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#6 /usr/share/nginx/nextcloud/lib/private/Console/Application.php(215): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#7 /usr/share/nginx/nextcloud/console.php(100): OC\Console\Application->run()
#8 /usr/share/nginx/nextcloud/occ(11): require_once('/usr/share/ngin...')
#9 {main}

Mais cela plantait à chaque fois … j’ai donc vu qu’il fallait mettre :

# sudo -u www-data php7.3 /usr/share/nginx/nextcloud/occ  db:convert-filecache-bigint  --no-interaction

A noter que par moment les droits sur les logs sont modifiés … et il faut les remettre en place :

# sudo chown www-data.www-data   /var/log/nextcloud.log

A part cela rien d’anormal …