Erreur daemon: throw er; // Unhandled 'error' event

Bonjour,
Après installation et teste du plugin Signal, j’ai une petite erreur avec deamon qui se relance plusieurs centaines de fois par jour.
Les logs me donnent cette erreur :

[2023-01-13 18:50:03]ERROR : Attention je pense qu'il y a un soucis avec le démon que j'ai relancé plus de 3 fois consécutivement
[2023-01-13 18:50:03]DEBUG : state courant: running
[2023-01-13 18:50:03]INFO : Lancement démon signal : sudo  /usr/bin/node /var/www/html/plugins/signal/resources/demond/signald.js --loglevel debug --socketport 55099 --signal_server 127.0.0.1:8099/v1/receive/+MON_NUMERO_DE_TEL --callback http://127.0.0.1:80/plugins/signal/core/php/jeeSignal.php --apikey SECRET --cycle 0.3 --pid /tmp/jeedom/signal/deamon.pid
[2023-01-13 17:50:03]INFO : Start signal
[2023-01-13 17:50:03]INFO : Log level on  : debug
[2023-01-13 17:50:03]INFO : Socket port : 55099
[2023-01-13 17:50:03]INFO : Docker server : 127.0.0.1:8099/v1/receive/+MON_NUMERO_DE_TEL
[2023-01-13 17:50:03]INFO : PID file : /tmp/jeedom/signal/deamon.pid
[2023-01-13 17:50:03]INFO : Apikey : SECRET
[2023-01-13 17:50:03]INFO : Callback : http://127.0.0.1:80/plugins/signal/core/php/jeeSignal.php
[2023-01-13 17:50:03]INFO : Cycle : 0.3
[2023-01-13 17:50:03]INFO : Connect to signal server : ws://127.0.0.1:8099/v1/receive/+MON_NUMERO_DE_TEL
[2023-01-13 17:50:03]DEBUG : HTTP listen on 127.0.0.1 port : 55099 started

node:events:491
throw er; // Unhandled 'error' event
^
Error: Unexpected server response: 200
at ClientRequest. (/var/www/html/plugins/signal/resources/demond/node_modules/ws/lib/websocket.js:888:7)
at ClientRequest.emit (node:events:513:28)
at HTTPParser.parserOnIncomingClient [as onIncoming] (node:_http_client:693:27)
at HTTPParser.parserOnHeadersComplete (node:_http_common:128:17)
at Socket.socketOnData (node:_http_client:534:22)
at Socket.emit (node:events:513:28)
at addChunk (node:internal/streams/readable:315:12)
at readableAddChunk (node:internal/streams/readable:289:9)
at Socket.Readable.push (node:internal/streams/readable:228:10)
at TCP.onStreamRead (node:internal/stream_base_commons:190:23)
Emitted 'error' event on WebSocket instance at:
at emitErrorAndClose (/var/www/html/plugins/signal/resources/demond/node_modules/ws/lib/websocket.js:1004:13)
at processTicksAndRejections (node:internal/process/task_queues:83:21)

Pour autant l’envois de SMS fonctionne…

Bonsoir

Inutile de mettre le nom du plugin dans le sujet mais utilise un tag qui a l’avantage d’avertir de développeur.

Antoine

Effectivement, le tag suffit je serais alerté directement :wink:

Il me faudrait plusieurs éléments pour commencer à chercher:

  • votre type d’installation (VM/docker/raspberry, box jeedom ou autre …)
  • une capture d’écran de la page santé de votre jeedom
  • version de votre jeedom

Merci

C’est noté, merci au modérateur pour la modification.
Concernant les élements demandés :

  • VM sous proxmox

  • Info détaillées :

  • Jeedom en version 4.3.14 (je viens de faire la MAJ, version 4.3.12 même problème).

Si besoin les logs côté dépendance :

+ echo '*******************Begin of package installation******************'
*******************Begin of package installation******************
+ touch /tmp/jeedom_install_in_progress_signal
+ echo 1
+ echo 2
+ sudo apt update
WARNING: apt does not have a stable CLI interface. Use with caution in scripts.
Hit:1 http://security.debian.org/debian-security buster/updates InRelease
Hit:2 http://deb.debian.org/debian buster InRelease
Hit:3 http://deb.debian.org/debian buster-updates InRelease
Hit:4 https://deb.nodesource.com/node_16.x buster InRelease
Hit:5 https://download.docker.com/linux/debian buster InRelease
Reading package lists...
Building dependency tree...
Reading state information...
26 packages can be upgraded. Run 'apt list --upgradable' to see them.
+ echo 3
+ sudo chmod +x /var/www/html/core/class/../../resources/install_nodejs.sh
+ sudo /var/www/html/core/class/../../resources/install_nodejs.sh
Hit:1 http://deb.debian.org/debian buster InRelease
Hit:2 http://security.debian.org/debian-security buster/updates InRelease
Hit:3 http://deb.debian.org/debian buster-updates InRelease
Hit:4 https://deb.nodesource.com/node_16.x buster InRelease
Hit:5 https://download.docker.com/linux/debian buster InRelease
Reading package lists...
Reading package lists...
Building dependency tree...
Reading state information...
apt-utils is already the newest version (1.8.2.3).
build-essential is already the newest version (12.6).
lsb-release is already the newest version (10.2019051400).
lsb-release set to manually installed.
Suggested packages:
git-daemon-run | git-daemon-sysvinit git-doc git-el git-email git-gui gitk
gitweb git-cvs git-mediawiki git-svn
The following packages will be upgraded:
git
1 upgraded, 0 newly installed, 0 to remove and 25 not upgraded.
Need to get 5634 kB of archives.
After this operation, 25.6 kB of additional disk space will be used.
Get:1 http://security.debian.org/debian-security buster/updates/main amd64 git amd64 1:2.20.1-2+deb10u6 [5634 kB]
apt-listchanges: Reading changelogs...
Fetched 5634 kB in 2s (2337 kB/s)
(Reading database ... 
(Reading database ... 5%
(Reading database ... 10%
(Reading database ... 15%
(Reading database ... 20%
(Reading database ... 25%
(Reading database ... 30%
(Reading database ... 35%
(Reading database ... 40%
(Reading database ... 45%
(Reading database ... 50%
(Reading database ... 55%
(Reading database ... 60%
(Reading database ... 65%
(Reading database ... 70%
(Reading database ... 75%
(Reading database ... 80%
(Reading database ... 85%
(Reading database ... 90%
(Reading database ... 95%
(Reading database ... 100%
(Reading database ... 66397 files and directories currently installed.)
Preparing to unpack .../git_1%3a2.20.1-2+deb10u6_amd64.deb ...
Unpacking git (1:2.20.1-2+deb10u6) over (1:2.20.1-2+deb10u4) ...
Setting up git (1:2.20.1-2+deb10u6) ...
[Check Version NodeJS actuelle : Aucune : [  KO  ]
Installation de NodeJS 16
Utilisation du dépot officiel
## Installing the NodeSource Node.js 16.x repo...
## Populating apt-get cache...
+ apt-get update
Hit:1 http://security.debian.org/debian-security buster/updates InRelease
Hit:2 http://deb.debian.org/debian buster InRelease
Hit:3 http://deb.debian.org/debian buster-updates InRelease
Hit:4 https://deb.nodesource.com/node_16.x buster InRelease
Hit:5 https://download.docker.com/linux/debian buster InRelease
Reading package lists...
## Confirming "buster" is supported...
+ curl -sLf -o /dev/null 'https://deb.nodesource.com/node_16.x/dists/buster/Release'
## Adding the NodeSource signing key to your keyring...
+ curl -s https://deb.nodesource.com/gpgkey/nodesource.gpg.key | gpg --dearmor | tee /usr/share/keyrings/nodesource.gpg >/dev/null
## Creating apt sources list file for the NodeSource Node.js 16.x repo...
+ echo 'deb [signed-by=/usr/share/keyrings/nodesource.gpg] https://deb.nodesource.com/node_16.x buster main' > /etc/apt/sources.list.d/nodesource.list
+ echo 'deb-src [signed-by=/usr/share/keyrings/nodesource.gpg] https://deb.nodesource.com/node_16.x buster main' >> /etc/apt/sources.list.d/nodesource.list
## Running `apt-get update` for you...
+ apt-get update
Hit:1 http://deb.debian.org/debian buster InRelease
Hit:2 http://security.debian.org/debian-security buster/updates InRelease
Hit:3 http://deb.debian.org/debian buster-updates InRelease
Hit:4 https://deb.nodesource.com/node_16.x buster InRelease
Hit:5 https://download.docker.com/linux/debian buster InRelease
Reading package lists...
## Run `sudo apt-get install -y nodejs` to install Node.js 16.x and npm
## You may also need development tools to build native addons:
sudo apt-get install gcc g++ make
## To install the Yarn package manager, run:
curl -sL https://dl.yarnpkg.com/debian/pubkey.gpg | gpg --dearmor | sudo tee /usr/share/keyrings/yarnkey.gpg >/dev/null
echo "deb [signed-by=/usr/share/keyrings/yarnkey.gpg] https://dl.yarnpkg.com/debian stable main" | sudo tee /etc/apt/sources.list.d/yarn.list
sudo apt-get update && sudo apt-get install yarn
Reading package lists...
Building dependency tree...
Reading state information...
The following NEW packages will be installed:
nodejs
0 upgraded, 1 newly installed, 0 to remove and 25 not upgraded.
Need to get 27.2 MB of archives.
After this operation, 128 MB of additional disk space will be used.
Get:1 https://deb.nodesource.com/node_16.x buster/main amd64 nodejs amd64 16.19.0-deb-1nodesource1 [27.2 MB]
Fetched 27.2 MB in 12s (2322 kB/s)
Selecting previously unselected package nodejs.
(Reading database ... 
(Reading database ... 5%
(Reading database ... 10%
(Reading database ... 15%
(Reading database ... 20%
(Reading database ... 25%
(Reading database ... 30%
(Reading database ... 35%
(Reading database ... 40%
(Reading database ... 45%
(Reading database ... 50%
(Reading database ... 55%
(Reading database ... 60%
(Reading database ... 65%
(Reading database ... 70%
(Reading database ... 75%
(Reading database ... 80%
(Reading database ... 85%
(Reading database ... 90%
(Reading database ... 95%
(Reading database ... 100%
(Reading database ... 66397 files and directories currently installed.)
Preparing to unpack .../nodejs_16.19.0-deb-1nodesource1_amd64.deb ...
Unpacking nodejs (16.19.0-deb-1nodesource1) ...
Setting up nodejs (16.19.0-deb-1nodesource1) ...
Processing triggers for man-db (2.8.5-2) ...
[Check Version NodeJS après install : v16.19.0 : [  OK  ]
[Check Prefix : /usr and sudo prefix : /usr and www-data prefix : /usr : [  OK  ]
+ echo 4
+ sudo chmod +x /var/www/html/core/class/../../resources/install_nodejs.sh
+ sudo /var/www/html/core/class/../../resources/install_nodejs.sh
Hit:1 http://security.debian.org/debian-security buster/updates InRelease
Hit:2 http://deb.debian.org/debian buster InRelease
Hit:3 https://deb.nodesource.com/node_16.x buster InRelease
Hit:4 https://download.docker.com/linux/debian buster InRelease
Hit:5 http://deb.debian.org/debian buster-updates InRelease
Reading package lists...
Reading package lists...
Building dependency tree...
Reading state information...
apt-utils is already the newest version (1.8.2.3).
build-essential is already the newest version (12.6).
lsb-release is already the newest version (10.2019051400).
git is already the newest version (1:2.20.1-2+deb10u6).
0 upgraded, 0 newly installed, 0 to remove and 25 not upgraded.
[Check Version NodeJS actuelle : v16.19.0 : [  OK  ]
[Check Prefix : /usr and sudo prefix : /usr and www-data prefix : /usr : [  OK  ]
+ echo 5
+ sudo chmod +x /var/www/html/core/class/../../resources/install_nodejs.sh
+ sudo /var/www/html/core/class/../../resources/install_nodejs.sh
Hit:1 http://security.debian.org/debian-security buster/updates InRelease
Hit:2 http://deb.debian.org/debian buster InRelease
Hit:3 http://deb.debian.org/debian buster-updates InRelease
Hit:4 https://deb.nodesource.com/node_16.x buster InRelease
Hit:5 https://download.docker.com/linux/debian buster InRelease
Reading package lists...
Reading package lists...
Building dependency tree...
Reading state information...
apt-utils is already the newest version (1.8.2.3).
build-essential is already the newest version (12.6).
lsb-release is already the newest version (10.2019051400).
git is already the newest version (1:2.20.1-2+deb10u6).
0 upgraded, 0 newly installed, 0 to remove and 25 not upgraded.
[Check Version NodeJS actuelle : v16.19.0 : [  OK  ]
[Check Prefix : /usr and sudo prefix : /usr and www-data prefix : /usr : [  OK  ]
+ echo 6
+ cd /var/www/html/core/class/../../plugins/signal/resources/demond
+ rm -rf node_modules
+ sudo npm install
npm WARN deprecated uuid@3.4.0: Please upgrade  to version 7 or higher.  Older versions may use Math.random() in certain circumstances, which is known to be problematic.  See https://v8.dev/blog/math-random for details.
npm WARN deprecated har-validator@5.1.5: this library is no longer supported
npm WARN deprecated request@2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142
added 116 packages, and audited 117 packages in 9s
8 packages are looking for funding
run `npm fund` for details
found 0 vulnerabilities
npm notice
npm notice New major version of npm available! 8.19.3 -> 9.2.0
npm notice Changelog: 
npm notice Run `npm install -g npm@9.2.0` to update!
npm notice
+ chown -R www-data:www-data demond.py jeedom node_modules package-lock.json package.json signald.js
+ echo 7
+ php /var/www/html/core/class/../php/jeecli.php plugin dependancy_end signal
+ rm /tmp/jeedom_install_in_progress_signal
+ echo '*******************End of package installation******************'
*******************End of package installation******************

Merci pour l’aide.

Merci pour les infos.

Dans l’ordre:

  • Aller dans la configuration du plugin
  • décocher réception des messages
  • Sauvegarder
  • cliquer sur le bouton orange pour relancer le service.
  • Attendre 5/10minutes.
  • Recocher réception des messages
  • Sauvegarder
  • cliquer sur le bouton orange pour relancer le service.

A partir de là, le démon devrait se relancer seul (parfois il se loupe quand le service n’a pas fini de s’initialiser, mais ça se stabilise ensuite)

Si le problème n’est pas résolu, il faudrait aller dans le plugin « Docker Management » et regarder l’équipement « signal », il y a la date de création dans la colonne de droite. (et me donner « logs conteneur » un petit bouton au dessus)

merci

Ola,
Je confirme que la manip proposée à bien corrigé le problème et côté Docker Management dans les logs pas d’erreur particulière.
Il y a eu probablement un soucis entre le deamon et le démarage du service comme tu le sugères.
Merci pour le coup de main et pour l’édition de mon message initial.
Amicalement,

Ce sujet a été automatiquement fermé après 24 heures suivant le dernier commentaire. Aucune réponse n’est permise dorénavant.