J’ai constaté un message d’erreur à l’arrêt du daemon.
Voici un extrait du log. C’est à la 3eme ligne
1423|[2024-03-17 11:53:22] INFO : Arrêt du démon jMQTT
1424|[2024-03-17 11:53:22] DEBUG : Envoi du signal SIGTERM au Démon
1425|[2024-03-17 11:53:22] ERROR : Erreur sur la fonction deamon_stop du plugin : fgets(): Argument #1 ($stream) must be of type resource, bool given
1426|[2024-03-17 11:53:23] INFO : Info sur le démon : {"launchable":"ok","log":"jMQTT","state":"nok","launchable_message":"Gestion automatique d\u00e9sactiv\u00e9e","auto":"0","last_launch":"2024-03-17 11:51:01"}
1427|[2024-03-17 11:53:23] DEBUG : Lancement de : /var/www/html/core/class/../../core/php/jeePlugin.php plugin_id=jMQTT function=update callInstallFunction=1
1428|[2024-03-17 11:53:23] DEBUG : install.php: jMQTT_update()
1
Oui, c’est bien de cette ligne que je parle.
Dans http.error, j’ai ceci. Mais vu l’heure ces deux messages viennent du démarrage de Jeedom
0028|[Sun Mar 17 11:50:05.611589 2024] [mpm_prefork:notice] [pid 1032] AH00163: Apache/2.4.57 (Debian) configured -- resuming normal operations
0029|[Sun Mar 17 11:50:05.621683 2024] [core:notice] [pid 1032] AH00094: Command line: '/usr/sbin/apache2'
J’ai fait un nouveau test. J’ai mis le niveau des logs par défaut sur Debug et j’ai à nouveau stoppé le daemon.
Dans http.error, j’ai maintenant:
0000|[Sun Mar 17 14:16:37.985659 2024] [php:warn] [pid 1086] [client 192.168.11.53:55081] PHP Warning: fopen(/tmp/jeedom/cache/da/5b6a4d5154543a3a6461656d6f6e5569645d5b315d.doctrinecache.data): Failed to open stream: No such file or directory in /var/www/html/vendor/doctrine/cache/lib/Doctrine/Common/Cache/FilesystemCache.php on line 45
et dans jMQTT
0000|[2024-03-17 14:16:32]WARNING : Le démarrage automatique du Démon est maintenant Désactivé
0001|[2024-03-17 14:16:37] INFO : Arrêt du démon jMQTT
0002|[2024-03-17 14:16:37] DEBUG : Envoi du signal SIGTERM au Démon
0003|[2024-03-17 14:16:37] ERROR : Erreur sur la fonction deamon_stop du plugin : fgets(): Argument #1 ($stream) must be of type resource, bool given
Donc c’est bien dans le core/cache que ca se vautre,
Peux-tu éditer le fichier /var/www/html/plugins/jMQTT/core/class/jMQTT.class.php
à la ligne 1473, il faudrait remplacer :
0000|[2024-03-17 15:42:23] INFO : Démarrage du démon jMQTT
0001|[2024-03-17 15:42:23] DEBUG : Nettoyage du Démon
0002|[2024-03-17 15:42:23] DEBUG : Dépendances installées.
0003|[2024-03-17 15:42:23] INFO : Lancement du démon jMQTT, commande shell: 'LOGLEVEL=debug CALLBACK="http://127.0.0.1:80/plugins/jMQTT/core/php/callback.php" APIKEY=JDm9De3WYl1x3zBYajXeD6gac7aJp6Ues3xssuMl6oLp3KNaWEKWPTtolbzlwo9s PIDFILE=/tmp/jeedom/jMQTT/jmqttd.py.pid /var/www/html/plugins/jMQTT/resources/jmqttd/venv/bin/python3 /var/www/html/plugins/jMQTT/resources/jmqttd/jmqttd.py >> /var/www/html/core/class/../../log/jMQTTd 2>&1 &'
0004|[2024-03-17 15:42:24] INFO : Démon démarré
0005|[2024-03-17 15:43:01] INFO : Arrêt du démon jMQTT
0006|[2024-03-17 15:43:01] DEBUG : Envoi du signal SIGTERM au Démon
0007|[2024-03-17 15:43:01] ERROR : ---> stop() Exception: fgets(): Argument #1 ($stream) must be of type resource, bool given, @Stack: #0 /var/www/html/vendor/doctrine/cache/lib/Doctrine/Common/Cache/FilesystemCache.php(46): fgets() #1 /var/www/html/vendor/doctrine/cache/lib/Doctrine/Common/Cache/CacheProvider.php(59): Doctrine\Common\Cache\FilesystemCache->doFetch() #2 /var/www/html/core/class/cache.class.php(151): Doctrine\Common\Cache\CacheProvider->fetch() #3 /var/www/html/plugins/jMQTT/core/class/jMQTTDaemon.class.php(177): cache::byKey() #4 /var/www/html/plugins/jMQTT/core/class/jMQTTDaemon.class.php(289): jMQTTDaemon::state() #5 /var/www/html/plugins/jMQTT/core/class/jMQTT.class.php(1475): jMQTTDaemon::stop() #6 /var/www/html/core/class/plugin.class.php(920): jMQTT::deamon_stop() #7 /var/www/html/core/ajax/plugin.ajax.php(138): plugin->deamon_stop() #8 {main}
http.error
0000|[Sun Mar 17 15:43:01.704193 2024] [php:warn] [pid 1677] [client 192.168.11.53:55947] PHP Warning: fopen(/tmp/jeedom/cache/da/5b6a4d5154543a3a6461656d6f6e5569645d5b315d.doctrinecache.data): Failed to open stream: No such file or directory in /var/www/html/vendor/doctrine/cache/lib/Doctrine/Common/Cache/FilesystemCache.php on line 45
Je regarde juste les implications, car il n’y a pas de fgets() à la ligne 46 de FilesystemCache.php dans la repo Alpha. Je pense que la lib a été updaté au passage à PHP8.
Please note that doctrine/cache is deprecated and no longer maintained. The last version to include cache drivers is 1.11. The 2.x major release series only provides the interfaces for libraries that need to maintain backward compatibility. For all cache uses, we suggest relying on PSR-6 or PSR-16 instead and using a cache library that supports those interfaces.
Le Core Alpha 4.4 fige Doctrine\Cache en v1.13, et dans cette version, il y a bien un fgets() ligne 46.
La version de Doctrine\Cache dans le repo du Core est la 1.2