[Node-Red] mise à jour de la palette “node-red-node-serialport 1.0.1” fait planter le docker Node-red

Si vous avez installé la palette “node-red-node-serialport” pour pouvoir utiliser Rflink par exemple et que vous mettez à jour celui-ci vers “node-red-node-serialport 1.0.1” cela fait planter le Docker Node-Red qui se relance toutes les 15 secondes.

La discussion est ici

Pour corriger cela la solution consiste à réinstaller une ancienne version de “node-red-node-serialport” qui ne fait pas planter le Docker.

Comme j’avais la version 0.15.0 qui fonctionnait très bien j’ai choisi de réinstaller celle-ci.

1 Like

Pré-requis: avoir supprimé la palette “node-red-node-serialport 1.0.1”

Pour info la version “node-red-node-serialport 0.15.0” est ici

  1. Se connecter en ssh à Gladys avec l’adresse IP de Gladys
ssh pi@192.xxx.x.xx
  1. Ouvrir un Shell dans docker
$ docker exec -it node_red /bin/bash

cela me renvoie

bash-5.0#

  1. Copier la commande suivante au bout
npm i node-red-node-serialport@0.15.0

Cela mouline et à la fin renvoie ceci

 notice created a lockfile as package-lock.json. You should commit this file.
+ node-red-node-serialport@0.15.0
added 48 packages from 37 contributors and audited 338 packages in 60.866s

45 packages are looking for funding
  run `npm fund` for details

found 4 critical severity vulnerabilities
  run `npm audit fix` to fix them, or `npm audit` for details
  1. Comme il y a 4 vulnérabilités critiques faire
npm audit fix

Comme proposé

  1. Fermer le Shell et relancer Node-Red
exit

et

docker restart node_red

node-red-node-serialport version 0.15.0 est installé

2 Likes

Bonjour @bjm,
Est ce tout fonctionne chez toi?
Moi je n’arrive plus a revenir a une situation stable . Je pense que mon ancien flow perturbe le fonctionnement de Node red node serialport. Je suis en 0.15.0, quand je mets un nouveau node serial il se connecte , mais si j’ importe ma BD, même après avoir remis le données dans le node Serial , j’ai une perte de connexion serveur? je ne sais plus quoi faire. Je suis repassé sur un 2eme Rpi avec une ancienne version de Gladys , mais apparemment a l’installation il repasse sur la dernière image 64 bit de Gladys. Même ma passerelle Xiaomi provoque des pertes de connexion alors, que quand j’ai suivi ton tuto tout était revenu normalement. Je n’y comprends plus rien.

Pour moi tout fonctionne.
J’ai eu une grosse frayeur en activant Telegram qui m’a fait perdre l’accès à la page web Gladys pendant 20 minutes, javais posé la question Quel temps fait-il ? pour tester et au bout de 20 minutes j’ai eu la réponse et j’ai retrouvé l’accès à la page web.

Concernant mon flow Rflink:
J’ai supprimé le “serial in node” et “serial out node” avant de faire mon exportation.
une fois importé, je les ai recréés sur le nouveau Gladys 64 bit.
j’oubliais, j’ai un Raspberry pi 3

Super , :+1:
Pour moi aussi c’est reparti mais j’ai que deux nodes un « serial in » et un « gateway xiaomi » et ils sont connectés. j’ai tenté dix fois de recharger ma BD et a force de bidouilles je me suis planté dans l’adresse TTYUSB0, j’ai mis USB1 (l’Usb de la clé zigbee) la BD l’a enregistrer et a chaque fois ça plantait forcement. Mais même en faisant ce que tu as fait de supprimés les nodes serials ça plantait toujours ( peut être aussi, pas assez patient, je dis ça car je travaillais sur autres choses et quand j’ai ré-affiché Node red mes nœuds étaient connectés) Quoi qu’il en soit je vais rentrer tous les nodes a la main, j’ai ai marre de relancer à chaque fois. :cold_sweat:
Merci pour ton aide , bonne continuation
:wink:

Tu n’as pas oublié de configurer le Node mqtt car moi j’avais oublié de le faire.

Enfin de compte aujourd’hui c’est un jour avec :smiley:, J’ai récuperer mes flows. J’ai supprimé les nodes Serial et le node Xiaomi, j’ai supprimé aussi tous les liens avec le broker Mqtt , avec les port tty USB0 du Rflink et de la Gateway Xiaomi, puis je recréé tous mes liens et paramétré les node s Serial et Xiaomi. Et enfin j’ai pu redémarrer tout le monde, mais il a fallut assigner le brocker Mqtt à tous les nodes Mqtt un par un. Mais enfin tout refonctionne comme avant.
Encore merci pour ton aide :wink:

super :+1:

Salut,

je rebondi sur le topic car je suis confronté au même problème mais la manip n’a pas résolu le problème.
Impossible d’accéder à NodeRed et le conteneur passe sans cesse en “Redémarrage”.

Quasiment le même jour ou presque, Zigbee 2 Mqtt HS et Node Red inaccessible.
J’ai réussi à remonter Zigbee2Mqtt avec le tuto mais je n’y arrive pas avec NodeRed.
Faut-il le désinstaller totalement puis le réinstaller ? Si oui, quelle est la manip svp ?

NB : J’arrive parfois à afficher sur mon navigateur une page indiquant Node-RED en onglet mais page blanche.

Si tu as une sauvegarde de tes flows , Tu peux supprimé le fichier flows.json
Dans le terminal

cd /var/lib/node-red
ls
sudo rm flows.json
docker restart node_red

Après tu ré-importe ton flow

Super merci @bjm .
Je peux à nouveau accéder à Node-Red.
J’avais conservé mon flow sur un Node-Red en local pour effectuer mes tests.
:+1:

1 Like

Hi, I’m bumping the thread because I’m encountering an issue with Node-RED again.
The container starts correctly but it’s impossible to access it using the IP address on port 1880. Page not found!
The connection on port 8080 to Zigbee works fine.
I tried removing the flow but nothing changes ..
With a docker ps, it shows me:
(health: starting)
Any idea?

Hi!
The reason is the latest Node-RED update.
Solution here

Hello everyone !

Sorry but I need a bit of help because I didn’t figure out how to reinstall to version 0.15

thanks in advance

Good evening @jerome,
I made this list to reinstall Node-RED from scratch

Installation of Node-RED

1 - run @VonOx’s command

docker run -d \

--log-opt max-size=10m \

--restart=always \

--network=host \

--name node_red \

-u node-red:dialout \

--device=/dev/ttyUSB0 \

--device=/dev/ttyUSB1 \

--label com.centurylinklabs.watchtower.enable=false \

-v /var/lib/node-red:/data \

nodered/node-red

2 - then this one

sudo chown -R 1000:1000 /var/lib/node-red

3 - Generate a hash: For more accuracy watch Pierre-Gilles’ video: Intégrer Node-RED avec Gladys Assistant en MQTT | Gladys Assistant

Generate a hash

docker exec -it node_red node-red admin hash-pw

4 - Edit the file with nano: Don’t forget sudo (I need it in front)

sudo nano /var/lib/node-red/settings.js

Remove the double // between « adminAuth: » and the matching closing brace } corresponding to adminAuth: {

5 - Paste the generated hash

6 - Then restart Node-RED

docker restart node_red

Downgrading the Serialport version

we will use version 0.15.0 instead of version 1.0.1

thanks to @Bjm

So you need to keep the node-red-node-serialport version 0.15.0. To get this version, follow @Bjm’s tutorial, which I paste below

I installed node-red-node-serialport version 0.15.0 which worked on my 32-bit
https://www.npmjs.com/package/node-red-node-serialport/v/0.15.0

1 - In the terminal to open a shell in docker

docker exec -it node_red /bin/bash

this returns me
bash-5.0#

2 - I append the following command

npm i node-red-node-serialport@0.15.0

it churns and at the end returns this to me:

notice created a lockfile as package-lock.json. You should commit this file.

node-red-node-serialport@ 0.15.0

added 48 packages from 37 contributors and audited 338 packages in 60 .866s

45 packages are looking for funding

run npm fund for details

found 4 critical severity vulnerabilities
run npm audit fix to fix them, or npm audit for details

3 - Since there are 4 critical vulnerabilities I run

npm audit fix

As suggested

4 - Then

exit

5 – restart Node-RED

docker  restart node_red

after that you reinstall your Serial palette, Node-RED still offers you the higher version, you click on it and when it installs it becomes 0.15.0
good luck
:wink:

@jerome

It may be necessary to adapt these lines. They correspond, for me, to my USB ports. One for my Zigbee dongle and the other for my Rflink

cool thanks @Psoy

Thanks to you I finally took the time to restart Node-

Well, another crash after updating to 1.0.1

But I think I’ve found the solution
Supprimer le Flow
Update node-red-node-serialport to 1.0.1
then

docker exec -it node_red /bin/bash
cd /data
npm rebuild --build-from-source
exit
docker restart node_red

Found here

Node-RED (Docker) crashes when /dev/ttyACM0 is configured in flow - Raspberry Pi 4 · Issue #3461 · node-red/node-red · GitHub

EDIT: It’s been a day running with node-red-node-serialport at 1.0.1 and no crashes.