Nextcloud unavailable « internal server error « since Nginx upgrade

Mon serveur YunoHost

Matériel: olimex lime 2
Version de YunoHost: 4.0.6.1
J’ai accès à mon serveur : tout…
Êtes-vous dans un contexte particulier ou avez-vous effectué des modificiations particulières sur votre instance ? : non
Si oui, expliquer:

Description du problème

Bonjour :wave: les gens,
Depuis la mise à jour d’aujourd’hui de nginx 1.14.2 et autres dépendances, il m’est impossible d’accéder à nextcloud.
Une erreur interne du serveur.
Qu’est-on supposé faire dans ces cas là ?

Genre c’est vraiment que sur nextcloud ?

Eventuellement j’essayerais d’aller voir dans Services > php7.3-fpm ou nginx pour voir si il y a un truc particulier dans les logs … Ou sinon il faut trouver le log de nextcloud …

Je suis en train de regarder mais je trouve rien pour le moment. La je cherche le log de nextcloud mais je vois pas des trucs particuliers.

Pas d erreur nginx en tout cas comme ça.

Les autres apps ont l air de fonctionner correctement mais j ai des doutes. Un plugin qui pourrait m empêcher de me log ? L internal server error c est l écran bleu de nextcloud je présume ?

@Aleks tu vois quelque chose la dedans

 {"reqId":"4My2je7fItzOixhGgprx","level":3,"time":"2020-09-02T13:12:23+00:00","remoteAddr":"109.132.x.x","user":"x","app":"PHP","method":"GET","url":"/nextcloud/apps/files/","message":"Undefined index: scheme at /var/www/nextcloud/apps/bbb/appinfo/app.php#12","userAgent":"Mozilla/5.0 (Windows NT 6.3; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.132 Safari/537.36","version":"18.0.7.1"}
{"reqId":"4My2je7fItzOixhGgprx","level":3,"time":"2020-09-02T13:12:23+00:00","remoteAddr":"109.132.x.x","user":"x","app":"PHP","method":"GET","url":"/nextcloud/apps/files/","message":"Undefined index: host at /var/www/nextcloud/apps/bbb/appinfo/app.php#12","userAgent":"Mozilla/5.0 (Windows NT 6.3; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.132 Safari/537.36","version":"18.0.7.1"}
{"reqId":"4My2je7fItzOixhGgprx","level":3,"time":"2020-09-02T13:12:27+00:00","remoteAddr":"109.132.x.x","user":"x","app":"index","method":"GET","url":"/nextcloud/apps/files/","message":{"Exception":"Exception","Message":"Argument 1 passed to \"Symfony\\Component\\EventDispatcher\\EventDispatcherInterface::dispatch()\" must be an object, string given.","Code":0,"Trace":[{"file":"/var/www/nextcloud/lib/private/AppFramework/App.php","line":125,"function":"dispatch","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->","args":[{"__class__":"OCA\\Files\\Controller\\ViewController"},"index"]},{"file":"/var/www/nextcloud/lib/private/AppFramework/Routing/RouteActionHandler.php","line":47,"function":"main","class":"OC\\AppFramework\\App","type":"::","args":["OCA\\Files\\Controller\\ViewController","index",{"__class__":"OC\\AppFramework\\DependencyInjection\\DIContainer"},{"_route":"files.view.index"}]},{"function":"__invoke","class":"OC\\AppFramework\\Routing\\RouteActionHandler","type":"->","args":[{"_route":"files.view.index"}]},{"file":"/var/www/nextcloud/lib/private/Route/Router.php","line":299,"function":"call_user_func","args":[{"__class__":"OC\\AppFramework\\Routing\\RouteActionHandler"},{"_route":"files.view.index"}]},{"file":"/var/www/nextcloud/lib/base.php","line":1008,"function":"match","class":"OC\\Route\\Router","type":"->","args":["/apps/files/"]},{"file":"/var/www/nextcloud/index.php","line":38,"function":"handleRequest","class":"OC","type":"::","args":[]}],"File":"/var/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php","Line":109,"Previous":{"Exception":"TypeError","Message":"Argument 1 passed to \"Symfony\\Component\\EventDispatcher\\EventDispatcherInterface::dispatch()\" must be an object, string given.","Code":0,"Trace":[{"file":"/var/www/nextcloud/lib/private/EventDispatcher/SymfonyAdapter.php","line":70,"function":"dispatch","class":"Symfony\\Component\\EventDispatcher\\EventDispatcher","type":"->","args":["OCA\\Files::loadAdditionalScripts",{"__class__":"Symfony\\Component\\EventDispatcher\\GenericEvent"}]},{"file":"/var/www/nextcloud/apps/files/lib/Listener/LegacyLoadAdditionalScriptsAdapter.php","line":51,"function":"dispatch","class":"OC\\EventDispatcher\\SymfonyAdapter","type":"->","args":["OCA\\Files::loadAdditionalScripts",{"__class__":"Symfony\\Component\\EventDispatcher\\GenericEvent"}]},{"file":"/var/www/nextcloud/lib/private/EventDispatcher/ServiceEventListener.php","line":76,"function":"handle","class":"OCA\\Files\\Listener\\LegacyLoadAdditionalScriptsAdapter","type":"->","args":[{"__class__":"OCA\\Files\\Event\\LoadAdditionalScriptsEvent"}]},{"file":"/var/www/nextcloud/3rdparty/symfony/event-dispatcher/EventDispatcher.php","line":247,"function":"__invoke","class":"OC\\EventDispatcher\\ServiceEventListener","type":"->","args":[{"__class__":"OCA\\Files\\Event\\LoadAdditionalScriptsEvent"},"OCA\\Files\\Event\\LoadAdditionalScriptsEvent",{"__class__":"Symfony\\Component\\EventDispatcher\\EventDispatcher"}]},{"file":"/var/www/nextcloud/3rdparty/symfony/event-dispatcher/EventDispatcher.php","line":73,"function":"callListeners","class":"Symfony\\Component\\EventDispatcher\\EventDispatcher","type":"->","args":[[{"__class__":"Closure"},{"__class__":"Closure"},{"__class__":"Closure"},{"__class__":"Closure"},{"__class__":"Closure"}],"OCA\\Files\\Event\\LoadAdditionalScriptsEvent",{"__class__":"OCA\\Files\\Event\\LoadAdditionalScriptsEvent"}]},{"file":"/var/www/nextcloud/lib/private/EventDispatcher/EventDispatcher.php","line":80,"function":"dispatch","class":"Symfony\\Component\\EventDispatcher\\EventDispatcher","type":"->","args":[{"__class__":"OCA\\Files\\Event\\LoadAdditionalScriptsEvent"},"OCA\\Files\\Event\\LoadAdditionalScriptsEvent"]},{"file":"/var/www/nextcloud/lib/private/EventDispatcher/SymfonyAdapter.php","line":63,"function":"dispatch","class":"OC\\EventDispatcher\\EventDispatcher","type":"->","args":["OCA\\Files\\Event\\LoadAdditionalScriptsEvent",{"__class__":"OCA\\Files\\Event\\LoadAdditionalScriptsEvent"}]},{"file":"/var/www/nextcloud/apps/files_sharing/list.php","line":45,"function":"dispatch","class":"OC\\EventDispatcher\\SymfonyAdapter","type":"->","args":["OCA\\Files\\Event\\LoadAdditionalScriptsEvent",{"__class__":"OCA\\Files\\Event\\LoadAdditionalScriptsEvent"}]},{"file":"/var/www/nextcloud/apps/files/lib/Controller/ViewController.php","line":122,"args":["/var/www/nextcloud/apps/files_sharing/list.php"],"function":"include"},{"file":"/var/www/nextcloud/apps/files/lib/Controller/ViewController.php","line":260,"function":"renderScript","class":"OCA\\Files\\Controller\\ViewController","type":"->","args":["files_sharing","list.php"]},{"file":"/var/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php","line":170,"function":"index","class":"OCA\\Files\\Controller\\ViewController","type":"->","args":["","",null,false]},{"file":"/var/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php","line":99,"function":"executeController","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->","args":[{"__class__":"OCA\\Files\\Controller\\ViewController"},"index"]},{"file":"/var/www/nextcloud/lib/private/AppFramework/App.php","line":125,"function":"dispatch","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->","args":[{"__class__":"OCA\\Files\\Controller\\ViewController"},"index"]},{"file":"/var/www/nextcloud/lib/private/AppFramework/Routing/RouteActionHandler.php","line":47,"function":"main","class":"OC\\AppFramework\\App","type":"::","args":["OCA\\Files\\Controller\\ViewController","index",{"__class__":"OC\\AppFramework\\DependencyInjection\\DIContainer"},{"_route":"files.view.index"}]},{"function":"__invoke","class":"OC\\AppFramework\\Routing\\RouteActionHandler","type":"->","args":[{"_route":"files.view.index"}]},{"file":"/var/www/nextcloud/lib/private/Route/Router.php","line":299,"function":"call_user_func","args":[{"__class__":"OC\\AppFramework\\Routing\\RouteActionHandler"},{"_route":"files.view.index"}]},{"file":"/var/www/nextcloud/lib/base.php","line":1008,"function":"match","class":"OC\\Route\\Router","type":"->","args":["/apps/files/"]},{"file":"/var/www/nextcloud/index.php","line":38,"function":"handleRequest","class":"OC","type":"::","args":[]}],"File":"/var/www/nextcloud/3rdparty/symfony/event-dispatcher/EventDispatcher.php","Line":63},"CustomMessage":"--"},"userAgent":"Mozilla/5.0 (Windows NT 6.3; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.132 Safari/537.36","version":"18.0.7.1"}

Hmbennn, il semble y’avoir un rapport avec bbb (j’imagine que c’est Big Blue Button, installé dans Nextcloud ?)

Mais c’est pas 100% clair car il y a 3 messages et la grosse erreur semble être le dernier truc, qui ne semble pas avoir de rapport direct avec les 2 premiers messages sur BBB … (et se produit 4 secondes après)

Le message avec symphony ?
Ça peut être lié à quel plugin ca ?

Je peux dès installer et désactiver des plugin nextcloud via le CLI?

donc en me basant sur ça pour obtenir la lsite des plugin.
J’ai malheureusement ceci:
This version of Nextcloud requires at least PHP 7.2<br/>You are currently running 7.0.33-30+0~20200807.37+debian10~1.gbp047872.

donc je suis un peu screwed du coup…

je teisns à signaler que le webdav et donc le transfert de photos et accsès aux fichiers via les app ou joplin etc fonctionnent

@Aleks
php -v
PHP 7.0.33-30+0~20200807.37+debian10~1.gbp047872 (cli) (built: Aug 7 2020 15:04:50) ( NTS )
Copyright © 1997-2017 The PHP Group
Zend Engine v3.0.0, Copyright © 1998-2017 Zend Technologies
with Zend OPcache v7.0.33-30+0~20200807.37+debian10~1.gbp047872, Copyright © 1999-2017, by Zend Technologies
pourtant nextcloud se lançais sur php-fpm7.3 avant et là je le vois en php-fpm seulement donc je comprends pas mais ça doit être à cause nginx

Qui est le maintainer de nextcloud pour yunohost ? Parce qu il n a pas l air de répondre sur les issues du GitHub

Il n’y a pas vraiment de mainteneur précis, c’est un peu tout le monde qui s’en occupe … Pas la peine de râler parce que personne ne réponds sur l’issue, tous les gens sont bénévoles, et pour peu que la description du problème soit pas super claire, ça donne pas forcément envie de chercher pendant des heures pour répondre …

Bref, comme tu l’auras trouvé, pour ton histoire de php 7.0 vs. 7.3, il faut spécifier explicitement php7.3 dans ta commande.

De ce que je peux voir dans le log que tu as mis sur l’issue, je vois que le soucis se produit dans un fichier source de l’app “richdocuments” … Peut-être que cette app est incompatible avec la nouvelle version, ou un truc du genre.

Ne t’en fais pas je ne ralais pas. Mais comme pour Lufi, lstu, lutim et OwnTracks c’était un maintainer en particulier donc je me disais que ce pouvait l’être aussi pour nextcloud. Simplement ça.
Et ce problème m’inquiète puisqu il n’y a pas de raison que ça se produise uniquement sur une install arm standard. Ce qui me pose question le plus c’est que comme il me semble l avoir signalé ici ou dans l issue sur GitHub la webapp est passée de php-fpm7.3 à php-fpm sans que je fasse quoi que ce soit à part mettre à jour… donc problème et j’aurais voulu des retours pour savoir si les autres qui ont des install arm avaient eu le même phénomène. (Pas sur x86-64 fatalement)

Et j’ai fait déjà depuis quelques jours comme signalé sur l’issue ce que tu as dit de faire maintenant mais ça plante donc je remets l erreur ici qui se trouve également dans l’issue.

sudo -u nextcloud php7.3 occ app:list
An unhandled exception has been thrown:
TypeError: Argument 1 passed to "Symfony\Component\EventDispatcher\EventDispatcherInterface::dispatch()" must be an object, string given. in /var/www/nextcloud/3rdparty/symfony/event-dispatcher/EventDispatcher.php:63
Stack trace:
#0 /var/www/nextcloud/lib/private/EventDispatcher/SymfonyAdapter.php(70): Symfony\Component\EventDispatcher\EventDispatcher->dispatch('\\OCP\\Files::pre...', Object(Symfony\Component\EventDispatcher\GenericEvent))
#1 /var/www/nextcloud/lib/private/Files/Node/Node.php(117): OC\EventDispatcher\SymfonyAdapter->dispatch('\\OCP\\Files::pre...', Object(Symfony\Component\EventDispatcher\GenericEvent))
#2 /var/www/nextcloud/lib/private/Files/Node/Folder.php(162): OC\Files\Node\Node->sendHooks(Array, Array)
#3 /var/www/nextcloud/lib/private/Files/AppData/AppData.php(158): OC\Files\Node\Folder->newFolder('templates')
#4 /var/www/nextcloud/apps/richdocuments/lib/TemplateManager.php(148): OC\Files\AppData\AppData->newFolder('templates')
#5 /var/www/nextcloud/apps/richdocuments/lib/TemplateManager.php(134): OCA\Richdocuments\TemplateManager->createAppDataFolders()
#6 [internal function]: OCA\Richdocuments\TemplateManager->__construct('richdocuments', NULL, Object(OC\AllConfig), Object(OC\Files\AppData\AppData), Object(OC\URLGenerator), Object(OC\Files\Node\LazyRoot), Object(OC\L10N\LazyL10N))
#7 /var/www/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php(83): ReflectionClass->newInstanceArgs(Array)
#8 /var/www/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php(100): OC\AppFramework\Utility\SimpleContainer->buildClass(Object(ReflectionClass))
#9 /var/www/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php(115): OC\AppFramework\Utility\SimpleContainer->resolve('OCA\\Richdocumen...')
#10 /var/www/nextcloud/lib/private/AppFramework/DependencyInjection/DIContainer.php(415): OC\AppFramework\Utility\SimpleContainer->query('OCA\\Richdocumen...')
#11 /var/www/nextcloud/lib/private/AppFramework/DependencyInjection/DIContainer.php(386): OC\AppFramework\DependencyInjection\DIContainer->queryNoFallback('OCA\\Richdocumen...')
#12 /var/www/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php(70): OC\AppFramework\DependencyInjection\DIContainer->query('OCA\\Richdocumen...', true)
#13 /var/www/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php(100): OC\AppFramework\Utility\SimpleContainer->buildClass(Object(ReflectionClass))
#14 /var/www/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php(115): OC\AppFramework\Utility\SimpleContainer->resolve('OCA\\Richdocumen...')
#15 /var/www/nextcloud/lib/private/AppFramework/DependencyInjection/DIContainer.php(415): OC\AppFramework\Utility\SimpleContainer->query('OCA\\Richdocumen...')
#16 /var/www/nextcloud/lib/private/ServerContainer.php(134): OC\AppFramework\DependencyInjection\DIContainer->queryNoFallback('OCA\\Richdocumen...')
#17 /var/www/nextcloud/lib/private/Console/Application.php(220): OC\ServerContainer->query('OCA\\Richdocumen...')
#18 /var/www/nextcloud/lib/private/Console/Application.php(135): OC\Console\Application->loadCommandsFromInfoXml(Array)
#19 /var/www/nextcloud/console.php(98): OC\Console\Application->loadCommands(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#20 /var/www/nextcloud/occ(11): require_once('/var/www/nextcl...')
root@dev:/var/www/nextcloud#

Pas compris le rapport avec la webapp alors qu’on parle de Nextcloud :confused:

Aussi je ne comprends pas ta remarque sur “php-fpm7.3” et “php-fpm” … php-fpm (le service) est forcément dans une version donné, c’est pas juste “php-fpm” sans version. Soit c’est 7.0, 7.1, 7.2, 7.3 ou 7.4 …

Oui, et donc comme dit dans le message précédent, ça semble lié à l’app “richdocuments” mais je ne connais pas Nextcloud + que ça et je ne sais pas si c’est normal ou spécifique à ton install…

Nextcloud est une webapp.
Je te rappelle la définition d une webapp


(Et non je suis pas énervé ou méchant en disant ça)
Stricto sensu nextcloud est inédit webapp.

Donc je ne parle pas du programme client ou quoi que ce soit. Je te parle bien de l application web.
Et donc je te dis, l application web nextcloud est, chez moi, passée, sous arm, de l’utilisation de php-fpm7.3 à php-fpm .
Je te rappelle qu’on a du le spécifier tous les deux dans un autre thread.

L’application web yunohost ou lutim par exemple utilise elle php-fpm. Nextcloud normalement c’était php-fpm7.3
Et tu peux le voir très clairement avec htop. Tu verras que les running process sont différents en terme de version rien que dans leur nom.

Et en ce qui concerne l’erreur dont j’ai copié le stack trace, me dire que c’est lié à un plugin c’est chouette mais l’erreur a l’air plus profonde que ça puisque :

  • J ai pas accès à l’interface web
  • j ai pas donc accès non plus au backend en ligne de commande grâce à occ puisque ça plante.

Je rappelle que le seul autre moyen de désactiver un plugin sur nextcloud en dehors de l’interface web c’est le backend occ et c’est ce que je voulais faire. Mais si ça aussi ça plante…

EDIT:

I forgot to update the thread before the closing, so I will do this edit in English so it could help someone.
You can retrieve the necessary exchange on the github of the web app in the yunohost repository.
I had to move

richdocuments

folder in the nextcloud folder so that the system doesn’t see it anymore.
Then occ was working again and I could disable some extension.
The 5 possible plug-in which could have caused this was the geoblocker, suspicious login, riot chat, qownotesapi, ocr. After that I’ve been able to access nextcloud again.
Thanks for all the help of course. And my mistake to have believed that it was the change of version in php fpm

1 Like

Ma Francais est tres ‘basic’, excusement. J’ecris en Anglais, peut-etre c’est plus facile de comprend :wink:

I had the problem with PHP 7.3 as well. I did via SSH:

sudo update-alternatives --config php

I choose PHP 7.4, after that I could get Nextcloud out of maintenance mode.

@Aleks, does this apply in this case? If it does, would you mind translating the necessary bit to French?

1 Like

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