-
-
Notifications
You must be signed in to change notification settings - Fork 1k
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
[email protected] fails in docker container on rpi #2438
Comments
So alpine (musl) on arm... probably a cross compilation issue, are you able to build from source? |
I should add this also happens on aarch64 alpine/musl. Compiling the module myself and not using the prebuilts fixes the problem and makes everything work. |
Can you give a hint how to compile this on ARM? |
Maybe I'm misunderstanding the issue, but from what I'm reading it seems the compile went wonky? If so, could someone not just please recompile it? |
We've had a release of bindings-cpp since this opened. |
Still seeing this with 10.3.0 and 10.7.0 bindings-cpp. Running |
I am seeing the same issue. |
Did it run for you after rebuilding? |
@DesertFoxNV is that question really for me? The last line of the quote appears to answer what you are asking. |
@hardillb Sorry for the confusion. Ya, sorry it was. I was fighting yarn, but your solution worked thanks! |
I too can confirm that there is an issue with this version running on Docker + Raspberry Pi (Pi 3 in my case). It took me quite a while to find out why my flow in nodered would constantly crash the container when using node-red-serialport. Using trail & error found out that older version (< 0.15.0) of node-red-serialport still work but the newest (1.0.1) does not. Looking in the repo of node-red-serialport this relates to switching from "serialport" : "^9.2.5" to "serialport" : "^10.3.0". (this threads version). (copied from the commit) In my case the use of the serialport 10.3.0 (also when writing a small test node script) resulted in a segmentation fault crashing node. When using in node-red it crashes the entire container resulting in a non-starting container (until changing the device mapping in the stack). For now the workaround seems to be to manually go into the container and install [email protected]; then everything is ok and the flows work again in node-red. Just using latest (by using the palette) causes the problem/crash.
If there is anything I can do to help; I can easily reproduce the problem on my environment using a default node-red stack on my Pi and then just use node & serialport in a small testscript. update:
|
As this is still broken, can I suggest you remove the broken binaries? That would force them to be built on install which while adding to the install time does actually work, which has to be 100% better than shipping known broken binaries that will cause an application crash on first use? |
I discovered this problem on a raspberry pi 4 with node-red and node-red-node-serialport. This problem cost me a lot of time as node-red crashed without error. The error seems to originate from node-serialport and can be fixed by building the packages from source. |
@mlooise I want to extend a heartfelt thanks. Your post here (along with one other regarding npm package reversion) saved my project and my sanity. My dockerised Node-Red went into the aforementioned infinite boot loop after I made the mistake of updating the Serialport module. This after a whole afternoon trying to figure out what had hit me. I was able to get a stable platform to work with by adding the following entrypoint clause to my docker-compose.yml:
From there I exec'd into the container. I also got back the web interface in safe mode. Can't remember but I think uninstallation of the offending module was blocked by it's use in my flows. I located the module folder in the data directory (not the module folder in the install directory, as this is ephemeral). Manually deleted the module folder and re-installed the older version.
Removed my docker-compose entrypoint clause and was back to a working instance. |
hello all, I too had a problem with this particular node on a different hardware. it took me a week to understand and see what was the problem. |
Can we please get the broken binaries remove, it really is the right (temporary) solution to this problem. The bug has been open of over a year and there is a simple working solution available |
This issue still exists when using alpine:3.17.3 for Docker running on RPi4. Adding the packages with apk add (python3 py3-pip make gcc g++ linux-headers udev) allows the rebuild process to complete successfully for node-red-node-serialport 1.0.3 however, still crashes the Docker container when connecting to the device. It would be great to know if there is an actionable effort to have this problem fixed. Thanks |
Two problems to fix with this one - our rpi arm64 isn't working possibly because our libc is too new, so we'll target the lts of arm64, worked for [level](Level/classic-level#71) thankful for [their investigation](Level/classic-level#69) - our arm64 builds were just broken and wouldn't build so we're fixing that with a variable in our binding.gyp for `openssl_fips` When this is released it will hopefully fix serialport/node-serialport#2438
I've released |
OK, so how do we test this? The path to the failure is to install |
You can use |
I'm unable to purchase a raspberry pi as they are hard to find. So I can't verify anything myself unfortunately. |
|
Hi @hardillb did you manage to update to V11 and confirm if this fixed the issue for you? |
@GazHank node-red-node-serialport has been updated with serialport v11 which appear to work |
thanks @hardillb |
I've managed to make
(thanks to node-red/node-red-nodes#1027 (comment)) |
SerialPort Version
10.3.0
Node Version
v14.19.0
Electron Version
No response
Platform
Linux raspberrypi 5.10.92-v7+ #1514 SMP Mon Jan 17 17:36:39 GMT 2022 armv7l GNU/Linux
Architecture
ARM
Hardware or chipset of serialport
QinHeng Electronics CH340
What steps will reproduce the bug?
I've created a repository at https://github.com/avakarev/serialport-docker-rpi to reproduce the issue.
Clone it and then:
make run-v9 # v9.2.8 on rpi
make docker-run-v9 # v9.2.8 on rpi in docker container
make run-v10 # v10.3.0 on rpi
make docker-run-v10 # v10.3.0 on rpi in docker container
What happens?
serialport
exits with 139 and have no stacktrace despiteDEBUG=serialport*
What should have happened?
serialport
should successfully open given portAdditional information
The alpine base image v12 used in demo repo is kinda outdated, but same behavior is met with alpine v14 and v15
Original discussion started at Koenkk/zigbee2mqtt#11545
The text was updated successfully, but these errors were encountered: