New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Node-RED (Docker) crashes when /dev/ttyACM0 is configured in flow - Raspberry Pi 4 #3461
Comments
Anything in the host os logs (run |
Everything since I plugged in the device and deployed the flow @hardillb |
As a test, what happens if you add the |
The --privileged flag is already added. But it doesn't matter. It happens with and without it.
|
@hardillb I am seeing this as well. I just upgraded node-red-node-serialport from 0.8.8 to 1.0.1 and now it just crashes on startup IF there's a device connected to the serial device referenced from the config node. It is not specific to /dev/ttyACM0 - I changed the device and the flow to use /dev/ttyACM9 as an experiment and that crashes as well. If I try to use a port with no device, lets say /dev/ttyACM8, then everything starts up but of course the serial port doesn't work. If I then change the config to use the actual port, it crashes. |
To downgrade you will need to do it manually with npm in the If you have mounted a host directory then you may be able to just run If it's a docker volume then you will need to start the container with node-red in safe mode (add the env var |
Thanks @hardillb . Unfortunately I couldn't get either version to install with npm within the container - both give C++ compilation errors. In the end I had to restore a backup which is using version 0.15.0 of node-red-node-serialport. That's working fine for me, and I just have to remember not to update it. |
Hi @hardillb I am in the same position as @csmale, and I already filed an issue in node-red/node-red-nodes#894 |
It would be useful to see the C++ errors then we have a chance to work out what's going wrong. |
OK, I've just managed to reproduce this and tested downgrading the node-red-node-serialport appears to work as expected Downgrading does depend on you having a volume mounted on the
cd /data
npm install node-red-node-serialport@0.15.0
exit
The node-red-node-serialport install does output a bunch of warnings, this is somewhat expected and it does finish cleanly. I'll try and look at why it's crashing with v1.0.1 , but there is very little information to work with. I will also get this moved to the node-red-docker project where it belongs (@knolleary can you do the move please) |
This looks relevant serialport/node-serialport#2438 |
OK, better fix that works with v1.0.1 Follow the same process as earlier but swap step 4 for cd /data
npm rebuild --build-from-source
exit This looks to be a problem with the pre-complied binaries from the upstream serialport node. |
I confirm this fixes the issue in my RPi4 setup using /dev/ttyUSB0 device. Thanks! |
Next steps are with the serialport node maintainers, nothing we (node-red) can do at the moment. |
Closing here as not a core node - see node-red/node-red-nodes#894 (comment) |
thanks so much for this thread and the fix @hardillb - I've spent too long trying to figure this out and was just posting a long boring thread hoping to get help with this but I've not got it working! |
Current Behavior
Node-RED crashes during startup and/or deployment with no details or log (log level trace)
Here it just stops.
It starts normally when I disconnect my device which is plugged in at /dev/ttyACM0 (Adruino)
This also happens when I disconnect my device, delete the flow, connect the device again and create and deploy the flow.
Expected Behavior
Node-RED not crashing and receiving data from /dev/ttyACM0
Steps To Reproduce
Raspberry Pi 4
Docker.io installed via apt and using nodered/node-red image.
Mounted the device either with -v /dev:/dev or --device /dev/ttyACM0:/dev/ttyACM0
Added /etc/udev/rules.d/99-serial.rules on host machine
KERNEL=="ttyACM[0-9]*",MODE="0666"
so the node-red user can read
Example flow
No response
Environment
The text was updated successfully, but these errors were encountered: