coolchip / node-red-contrib-enocean-esp2

Node-RED Node, that reads and parses the data from a enocean esp2 bus (f.ex. Eltako)
MIT License
3 stars 2 forks source link

Segmentation fault #5

Closed derbmann closed 1 year ago

derbmann commented 1 year ago

Hi,

I'm running NodeRed in Docker (with compose) on a Pi4. The Pi is connected to the Eltako bus via FGW14 - USB. Reading/Writing in the Bus via FGW14 works perfect in fhem but i want to get rid of fhem... The fhem docker did not run during testing.

I installed your Node (V0.0.6) but as soon as you config the connection NodeRed stops and won't start anymore. Log:

Welcome to Node-RED 13 Jan 10:04:21 - [info] Node-RED version: v3.0.2 13 Jan 10:04:21 - [info] Node.js version: v16.16.0 13 Jan 10:04:21 - [info] Linux 5.15.84-v8+ arm64 LE 13 Jan 10:04:23 - [info] Loading palette nodes 13 Jan 10:04:28 - [info] Settings file : /data/settings.js 13 Jan 10:04:28 - [info] Context store : 'default' [module=memory] 13 Jan 10:04:28 - [info] User directory : /data 13 Jan 10:04:28 - [warn] Projects disabled : editorTheme.projects.enabled=false 13 Jan 10:04:28 - [info] Flows file : /data/flows.json 13 Jan 10:04:28 - [warn] Your flow credentials file is encrypted using a system-generated key. If the system-generated key is lost for any reason, your credentials file will not be recoverable, you will have to delete it and re-enter your credentials. You should set your own key using the 'credentialSecret' option in your settings file. Node-RED will then re-encrypt your credentials file using your chosen key the next time you deploy a change. 13 Jan 10:04:28 - [warn] Encrypted credentials not found 13 Jan 10:04:28 - [info] Server now running at http://127.0.0.1:1880/ 13 Jan 10:04:28 - [info] Starting flows 13 Jan 10:04:28 - [info] Started flows ./entrypoint.sh: line 14: 7 Segmentation fault (core dumped) /usr/local/bin/node $NODEOPTIONS node_modules/node-red/red.js --userDir /data $FLOWS 13 Jan 10:04:36 - [info] Welcome to Node-RED 13 Jan 10:04:36 - [info] Node-RED version: v3.0.2 13 Jan 10:04:36 - [info] Node.js version: v16.16.0 13 Jan 10:04:36 - [info] Linux 5.15.84-v8+ arm64 LE ...

I removed node-red from the dialout group and it just resulted in a permission error but nodered kept working. (as expected but maybe this info will help you...)

I also installed V0.0.4 and this Version works ok, the connection works and i see Messages but it seems that i miss some msg's sometimes and I got some Error msg's sometimes:

"enocean-esp2 error: Error: Index Error! chunkLength: 28 syncBytes at: 14"

Maybe just a connection config problem?

My Settings are: Port: /dev/ttyUSB0 Baud: 57600 Data Bits: 8 Pairity: None Stop Bits: 1

thanks, derbmann

edit* had to remove the = and - from the log because of the formatting

Ekristoffe commented 1 year ago

Hello can you try this:

login in the PI with SSH then go to elevated user su - then use the command docker exec -ti --user root <containername> /bin/bash to open the container console. I you can't use su -, use sudo to start the command

(or if you have portainer use it to log in the container console in root) Then in the container, go to the node-red data folder cd /data/ and execute the command npm rebuild --build-from-source This will rebuild the serial node from source to the specific of the PI system.

derbmann commented 1 year ago

Hi,

After performing the rebuild the issue is gone and the node works as expected. (I did the Portainer method)

thank you very much

coolchip commented 1 year ago

Thank you very, very much, @Ekristoffe, for helping.

Ekristoffe commented 1 year ago

@coolchip no problem, i had the same bug with another node and it took me sometime (maybe 2 / 3 week) to understand what was the problem ...