Open patrickelectric opened 1 year ago
yes, but why did you pick nodered/node-red:3.0.2-14
rather than latest
or 3.0.2
you appeared to make a specific choice to use NodeJS 14 which went totally out of support in April this year. https://endoflife.date/nodejs
You will need to run npm rebuild
in the /data
directory to have the rebuild be picked up and persisted across a restart (changes made in the /usr/local/src
will not be persisted across restarts of the container.)
Also share the docker run
command you are using to start this container.
3.0.2-14 looks to be the newer version on the hub.docker, is 3.0.2 newer that 3.0.2-14 ? latest is problematic since I'll not have control over the node-red version.
Here is the output from /data:
f73ecd7542c2:/data# npm rebuild
> @serialport/bindings-cpp@11.0.3 install /data/node_modules/@serialport/bindings-cpp
> node-gyp-build
node-red-contrib-web-worldmap@2.42.2 /data/node_modules/node-red-contrib-web-worldmap
@turf/bezier-spline@6.5.0 /data/node_modules/node-red-contrib-web-worldmap/node_modules/@turf/bezier-spline
@turf/helpers@6.5.0 /data/node_modules/node-red-contrib-web-worldmap/node_modules/@turf/helpers
@turf/invariant@6.5.0 /data/node_modules/node-red-contrib-web-worldmap/node_modules/@turf/invariant
cgi@0.3.1 /data/node_modules/node-red-contrib-web-worldmap/node_modules/cgi
debug@2.6.9 /data/node_modules/node-red-contrib-web-worldmap/node_modules/debug
ms@2.0.0 /data/node_modules/node-red-contrib-web-worldmap/node_modules/ms
extend@2.0.2 /data/node_modules/node-red-contrib-web-worldmap/node_modules/extend
header-stack@0.0.2 /data/node_modules/node-red-contrib-web-worldmap/node_modules/header-stack
bufferjs@3.0.1 /data/node_modules/node-red-contrib-web-worldmap/node_modules/bufferjs
bufferlist@0.1.0 /data/node_modules/node-red-contrib-web-worldmap/node_modules/bufferlist
stream-stack@1.1.4 /data/node_modules/node-red-contrib-web-worldmap/node_modules/stream-stack
compression@1.7.4 /data/node_modules/node-red-contrib-web-worldmap/node_modules/compression
accepts@1.3.8 /data/node_modules/node-red-contrib-web-worldmap/node_modules/accepts
mime-types@2.1.35 /data/node_modules/node-red-contrib-web-worldmap/node_modules/mime-types
mime-db@1.52.0 /data/node_modules/node-red-contrib-web-worldmap/node_modules/mime-db
negotiator@0.6.3 /data/node_modules/node-red-contrib-web-worldmap/node_modules/negotiator
bytes@3.0.0 /data/node_modules/node-red-contrib-web-worldmap/node_modules/compression/node_modules/bytes
compressible@2.0.18 /data/node_modules/node-red-contrib-web-worldmap/node_modules/compressible
on-headers@1.0.2 /data/node_modules/node-red-contrib-web-worldmap/node_modules/on-headers
safe-buffer@5.1.2 /data/node_modules/node-red-contrib-web-worldmap/node_modules/safe-buffer
vary@1.1.2 /data/node_modules/node-red-contrib-web-worldmap/node_modules/vary
express@4.18.2 /data/node_modules/node-red-contrib-web-worldmap/node_modules/express
array-flatten@1.1.1 /data/node_modules/node-red-contrib-web-worldmap/node_modules/array-flatten
body-parser@1.20.1 /data/node_modules/node-red-contrib-web-worldmap/node_modules/body-parser
bytes@3.1.2 /data/node_modules/node-red-contrib-web-worldmap/node_modules/body-parser/node_modules/bytes
content-type@1.0.4 /data/node_modules/node-red-contrib-web-worldmap/node_modules/content-type
depd@2.0.0 /data/node_modules/node-red-contrib-web-worldmap/node_modules/depd
destroy@1.2.0 /data/node_modules/node-red-contrib-web-worldmap/node_modules/destroy
http-errors@2.0.0 /data/node_modules/node-red-contrib-web-worldmap/node_modules/http-errors
inherits@2.0.4 /data/node_modules/node-red-contrib-web-worldmap/node_modules/inherits
setprototypeof@1.2.0 /data/node_modules/node-red-contrib-web-worldmap/node_modules/setprototypeof
statuses@2.0.1 /data/node_modules/node-red-contrib-web-worldmap/node_modules/statuses
toidentifier@1.0.1 /data/node_modules/node-red-contrib-web-worldmap/node_modules/toidentifier
iconv-lite@0.4.24 /data/node_modules/node-red-contrib-web-worldmap/node_modules/iconv-lite
safer-buffer@2.1.2 /data/node_modules/node-red-contrib-web-worldmap/node_modules/safer-buffer
on-finished@2.4.1 /data/node_modules/node-red-contrib-web-worldmap/node_modules/on-finished
ee-first@1.1.1 /data/node_modules/node-red-contrib-web-worldmap/node_modules/ee-first
qs@6.11.0 /data/node_modules/node-red-contrib-web-worldmap/node_modules/qs
side-channel@1.0.4 /data/node_modules/node-red-contrib-web-worldmap/node_modules/side-channel
call-bind@1.0.2 /data/node_modules/node-red-contrib-web-worldmap/node_modules/call-bind
function-bind@1.1.1 /data/node_modules/node-red-contrib-web-worldmap/node_modules/function-bind
get-intrinsic@1.1.3 /data/node_modules/node-red-contrib-web-worldmap/node_modules/get-intrinsic
has@1.0.3 /data/node_modules/node-red-contrib-web-worldmap/node_modules/has
has-symbols@1.0.3 /data/node_modules/node-red-contrib-web-worldmap/node_modules/has-symbols
object-inspect@1.12.2 /data/node_modules/node-red-contrib-web-worldmap/node_modules/object-inspect
raw-body@2.5.1 /data/node_modules/node-red-contrib-web-worldmap/node_modules/raw-body
bytes@3.1.2 /data/node_modules/node-red-contrib-web-worldmap/node_modules/raw-body/node_modules/bytes
unpipe@1.0.0 /data/node_modules/node-red-contrib-web-worldmap/node_modules/unpipe
type-is@1.6.18 /data/node_modules/node-red-contrib-web-worldmap/node_modules/type-is
media-typer@0.3.0 /data/node_modules/node-red-contrib-web-worldmap/node_modules/media-typer
content-disposition@0.5.4 /data/node_modules/node-red-contrib-web-worldmap/node_modules/content-disposition
safe-buffer@5.2.1 /data/node_modules/node-red-contrib-web-worldmap/node_modules/content-disposition/node_modules/safe-buffer
cookie@0.5.0 /data/node_modules/node-red-contrib-web-worldmap/node_modules/cookie
cookie-signature@1.0.6 /data/node_modules/node-red-contrib-web-worldmap/node_modules/cookie-signature
encodeurl@1.0.2 /data/node_modules/node-red-contrib-web-worldmap/node_modules/encodeurl
escape-html@1.0.3 /data/node_modules/node-red-contrib-web-worldmap/node_modules/escape-html
etag@1.8.1 /data/node_modules/node-red-contrib-web-worldmap/node_modules/etag
finalhandler@1.2.0 /data/node_modules/node-red-contrib-web-worldmap/node_modules/finalhandler
parseurl@1.3.3 /data/node_modules/node-red-contrib-web-worldmap/node_modules/parseurl
fresh@0.5.2 /data/node_modules/node-red-contrib-web-worldmap/node_modules/fresh
merge-descriptors@1.0.1 /data/node_modules/node-red-contrib-web-worldmap/node_modules/merge-descriptors
methods@1.1.2 /data/node_modules/node-red-contrib-web-worldmap/node_modules/methods
path-to-regexp@0.1.7 /data/node_modules/node-red-contrib-web-worldmap/node_modules/path-to-regexp
proxy-addr@2.0.7 /data/node_modules/node-red-contrib-web-worldmap/node_modules/proxy-addr
forwarded@0.2.0 /data/node_modules/node-red-contrib-web-worldmap/node_modules/forwarded
ipaddr.js@1.9.1 /data/node_modules/node-red-contrib-web-worldmap/node_modules/ipaddr.js
range-parser@1.2.1 /data/node_modules/node-red-contrib-web-worldmap/node_modules/range-parser
safe-buffer@5.2.1 /data/node_modules/node-red-contrib-web-worldmap/node_modules/express/node_modules/safe-buffer
send@0.18.0 /data/node_modules/node-red-contrib-web-worldmap/node_modules/send
mime@1.6.0 /data/node_modules/node-red-contrib-web-worldmap/node_modules/mime
ms@2.1.3 /data/node_modules/node-red-contrib-web-worldmap/node_modules/send/node_modules/ms
serve-static@1.15.0 /data/node_modules/node-red-contrib-web-worldmap/node_modules/serve-static
utils-merge@1.0.1 /data/node_modules/node-red-contrib-web-worldmap/node_modules/utils-merge
sockjs@0.3.24 /data/node_modules/node-red-contrib-web-worldmap/node_modules/sockjs
faye-websocket@0.11.4 /data/node_modules/node-red-contrib-web-worldmap/node_modules/faye-websocket
websocket-driver@0.7.4 /data/node_modules/node-red-contrib-web-worldmap/node_modules/websocket-driver
http-parser-js@0.5.2 /data/node_modules/node-red-contrib-web-worldmap/node_modules/websocket-driver/node_modules/http-parser-js
websocket-extensions@0.1.4 /data/node_modules/node-red-contrib-web-worldmap/node_modules/websocket-extensions
uuid@8.3.2 /data/node_modules/node-red-contrib-web-worldmap/node_modules/uuid
node-red-dashboard@3.5.0 /data/node_modules/node-red-dashboard
compression@1.7.4 /data/node_modules/compression
accepts@1.3.8 /data/node_modules/accepts
mime-types@2.1.35 /data/node_modules/mime-types
mime-db@1.52.0 /data/node_modules/mime-db
negotiator@0.6.3 /data/node_modules/negotiator
bytes@3.0.0 /data/node_modules/bytes
compressible@2.0.18 /data/node_modules/compressible
debug@2.6.9 /data/node_modules/debug
ms@2.0.0 /data/node_modules/ms
on-headers@1.0.2 /data/node_modules/on-headers
safe-buffer@5.1.2 /data/node_modules/safe-buffer
vary@1.1.2 /data/node_modules/vary
gridstack@0.6.4 /data/node_modules/gridstack
jquery@3.7.1 /data/node_modules/jquery
serve-static@1.15.0 /data/node_modules/serve-static
encodeurl@1.0.2 /data/node_modules/encodeurl
escape-html@1.0.3 /data/node_modules/escape-html
parseurl@1.3.3 /data/node_modules/parseurl
send@0.18.0 /data/node_modules/send
depd@2.0.0 /data/node_modules/depd
destroy@1.2.0 /data/node_modules/destroy
etag@1.8.1 /data/node_modules/etag
fresh@0.5.2 /data/node_modules/fresh
http-errors@2.0.0 /data/node_modules/http-errors
inherits@2.0.4 /data/node_modules/inherits
setprototypeof@1.2.0 /data/node_modules/setprototypeof
statuses@2.0.1 /data/node_modules/statuses
toidentifier@1.0.1 /data/node_modules/toidentifier
mime@1.6.0 /data/node_modules/mime
ms@2.1.3 /data/node_modules/send/node_modules/ms
on-finished@2.4.1 /data/node_modules/on-finished
ee-first@1.1.1 /data/node_modules/ee-first
range-parser@1.2.1 /data/node_modules/range-parser
socket.io@4.7.2 /data/node_modules/socket.io
base64id@2.0.0 /data/node_modules/base64id
cors@2.8.5 /data/node_modules/cors
object-assign@4.1.1 /data/node_modules/object-assign
debug@4.3.4 /data/node_modules/socket.io/node_modules/debug
ms@2.1.2 /data/node_modules/socket.io/node_modules/ms
engine.io@6.5.2 /data/node_modules/engine.io
@types/cookie@0.4.1 /data/node_modules/@types/cookie
@types/cors@2.8.13 /data/node_modules/@types/cors
@types/node@20.5.7 /data/node_modules/@types/node
cookie@0.4.2 /data/node_modules/cookie
debug@4.3.4 /data/node_modules/engine.io/node_modules/debug
ms@2.1.2 /data/node_modules/engine.io/node_modules/ms
engine.io-parser@5.2.1 /data/node_modules/engine.io-parser
ws@8.11.0 /data/node_modules/ws
socket.io-adapter@2.5.2 /data/node_modules/socket.io-adapter
socket.io-parser@4.2.4 /data/node_modules/socket.io-parser
@socket.io/component-emitter@3.1.0 /data/node_modules/@socket.io/component-emitter
debug@4.3.4 /data/node_modules/socket.io-parser/node_modules/debug
ms@2.1.2 /data/node_modules/socket.io-parser/node_modules/ms
node-red-node-serialport@1.0.4 /data/node_modules/node-red-node-serialport
serialport@11.0.1 /data/node_modules/serialport
@serialport/binding-mock@10.2.2 /data/node_modules/@serialport/binding-mock
@serialport/bindings-interface@1.2.2 /data/node_modules/@serialport/bindings-interface
debug@4.3.4 /data/node_modules/@serialport/binding-mock/node_modules/debug
ms@2.1.2 /data/node_modules/@serialport/binding-mock/node_modules/ms
@serialport/bindings-cpp@11.0.3 /data/node_modules/@serialport/bindings-cpp
@serialport/parser-readline@11.0.0 /data/node_modules/@serialport/bindings-cpp/node_modules/@serialport/parser-readline
@serialport/parser-delimiter@11.0.0 /data/node_modules/@serialport/bindings-cpp/node_modules/@serialport/parser-delimiter
debug@4.3.4 /data/node_modules/@serialport/bindings-cpp/node_modules/debug
ms@2.1.2 /data/node_modules/@serialport/bindings-cpp/node_modules/ms
node-addon-api@6.1.0 /data/node_modules/node-addon-api
node-gyp-build@4.6.0 /data/node_modules/node-gyp-build
@serialport/parser-byte-length@11.0.1 /data/node_modules/@serialport/parser-byte-length
@serialport/parser-cctalk@11.0.1 /data/node_modules/@serialport/parser-cctalk
@serialport/parser-delimiter@11.0.1 /data/node_modules/@serialport/parser-delimiter
@serialport/parser-inter-byte-timeout@11.0.1 /data/node_modules/@serialport/parser-inter-byte-timeout
@serialport/parser-packet-length@11.0.1 /data/node_modules/@serialport/parser-packet-length
@serialport/parser-readline@11.0.1 /data/node_modules/@serialport/parser-readline
@serialport/parser-ready@11.0.1 /data/node_modules/@serialport/parser-ready
@serialport/parser-regex@11.0.1 /data/node_modules/@serialport/parser-regex
@serialport/parser-slip-encoder@11.0.1 /data/node_modules/@serialport/parser-slip-encoder
@serialport/parser-spacepacket@11.0.1 /data/node_modules/@serialport/parser-spacepacket
@serialport/stream@11.0.1 /data/node_modules/@serialport/stream
debug@4.3.4 /data/node_modules/@serialport/stream/node_modules/debug
ms@2.1.2 /data/node_modules/@serialport/stream/node_modules/ms
debug@4.3.4 /data/node_modules/serialport/node_modules/debug
ms@2.1.2 /data/node_modules/serialport/node_modules/ms
I'm just performing this binds:
"Binds": [
"/usr/blueos/userdata/node-red:/data:rw",
"/etc/hostname:/etc/hostname:ro",
"/dev:/dev:rw",
"/:/home/workspace/host:rw"
]
All the 3.0.2 builds were done at the same time, latest
is just the current alias for 3.0.2
which is also 3.0.2-16
you should NOT be doing anything "new" with anything NodeJS 14 based.
Does the container run after doing the npm rebuild
?
Same problem.. I'll change the docker image to see if 3.0.2 has the same issue.
Make sure you empty the volume mounted on /data
when you change the container version before starting it.
I did delete everything in /data
.
Started the docker, installed the extension and got the same problem.
Welcome to Node-RED
===================
30 Aug 21:28:53 - [info] Node-RED version: v3.0.2
30 Aug 21:28:53 - [info] Node.js version: v16.20.1
30 Aug 21:28:53 - [info] Linux 5.10.92-v7l+ arm LE
30 Aug 21:28:55 - [info] Loading palette nodes
30 Aug 21:28:57 - [info] Settings file : /data/settings.js
30 Aug 21:28:57 - [info] Context store : 'default' [module=memory]
30 Aug 21:28:57 - [info] User directory : /data
30 Aug 21:28:57 - [warn] Projects disabled : editorTheme.projects.enabled=false
30 Aug 21:28:57 - [info] Flows file : /data/flows.json
30 Aug 21:28:57 - [info] Server now running at http://127.0.0.1:1880/
30 Aug 21:28:57 - [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.
---------------------------------------------------------------------
30 Aug 21:28:57 - [info] Starting flows
./entrypoint.sh: line 14: 9 Segmentation fault (core dumped) /usr/local/bin/node $NODE_OPTIONS node_modules/node-red/red.js --userDir /data $FLOWS "${@}"
Just to be extra clear here, this is still after you installed the serial port node, because I don't see the Node-RED log entries for installing the node in what you've posted.
npm rebuild
in /data
again?Also what is the host OS here? I see it's ARMv7 so is it a Raspberry Pi, if so what version of the OS are you using?
How did you do the install?
I installed the extension via the web interface.
Did you restart after doing the install to get that log output?
The docker just rebooted once it crashed and I lost the initial log of the installation. I started again to get the output.
And have you tried running npm rebuild in /data again?
1726e7155647:/data# npm rebuild rebuilt dependencies successfully
Crashed again.
Also what is the host OS here? I see it's ARMv7 so is it a Raspberry Pi, if so what version of the OS are you using?
Yes, I'm running in a Raspberry Pi, using Raspbian buster.
Workaround for now, while we raise this with the upstream project.
In /data/node_modules/@serialport/bindings-cpp
run npm run rebuild
/data/node_modules/@serialport/bindings-cpp
Thanks, that did work!
serailport node now bumped to v2.0.0 using latest underlying serialport v12 library.
btw this issue is still happening when installing from scratch using node-red 3.1.9 and node-red with node-red-node-serialport 2.0.2
Workaround for now, while we raise this with the upstream project.
In
/data/node_modules/@serialport/bindings-cpp
runnpm run rebuild
~This is not working anymore~
We probably need to see the output of the rebuild command, but you really should add these comments to the node-serial issue linked above, as it's the only easy they are going to get the message that it's broken
Hi @hardillb, I just run npm run rebuild
and it fixed the problem!
Do you know why is this still necessary ?
6e27a50136db:/usr/src/node-red# cd /data/node_modules/@serialport/bindings-cpp
6e27a50136db:/data/node_modules/@serialport/bindings-cpp# npm run rebuild
> @serialport/bindings-cpp@12.0.1 rebuild
> node-gyp rebuild
gyp info it worked if it ends with ok
gyp info using node-gyp@9.1.0
gyp info using node@16.20.2 | linux | arm
gyp info find Python using Python version 3.11.8 found at "/usr/bin/python3"
gyp http GET https://nodejs.org/download/release/v16.20.2/node-v16.20.2-headers.tar.gz
gyp http 200 https://nodejs.org/download/release/v16.20.2/node-v16.20.2-headers.tar.gz
gyp http GET https://nodejs.org/download/release/v16.20.2/SHASUMS256.txt
gyp http 200 https://nodejs.org/download/release/v16.20.2/SHASUMS256.txt
gyp info spawn /usr/bin/python3
gyp info spawn args [
gyp info spawn args '/usr/local/lib/node_modules/npm/node_modules/node-gyp/gyp/gyp_main.py',
gyp info spawn args 'binding.gyp',
gyp info spawn args '-f',
gyp info spawn args 'make',
gyp info spawn args '-I',
gyp info spawn args '/data/node_modules/@serialport/bindings-cpp/build/config.gypi',
gyp info spawn args '-I',
gyp info spawn args '/usr/local/lib/node_modules/npm/node_modules/node-gyp/addon.gypi',
gyp info spawn args '-I',
gyp info spawn args '/root/.cache/node-gyp/16.20.2/include/node/common.gypi',
gyp info spawn args '-Dlibrary=shared_library',
gyp info spawn args '-Dvisibility=default',
gyp info spawn args '-Dnode_root_dir=/root/.cache/node-gyp/16.20.2',
gyp info spawn args '-Dnode_gyp_dir=/usr/local/lib/node_modules/npm/node_modules/node-gyp',
gyp info spawn args '-Dnode_lib_file=/root/.cache/node-gyp/16.20.2/<(target_arch)/node.lib',
gyp info spawn args '-Dmodule_root_dir=/data/node_modules/@serialport/bindings-cpp',
gyp info spawn args '-Dnode_engine=v8',
gyp info spawn args '--depth=.',
gyp info spawn args '--no-parallel',
gyp info spawn args '--generator-output',
gyp info spawn args 'build',
gyp info spawn args '-Goutput_dir=.'
gyp info spawn args ]
gyp info spawn make
gyp info spawn args [ 'BUILDTYPE=Release', '-C', 'build' ]
make: Entering directory '/data/node_modules/@serialport/bindings-cpp/build'
CXX(target) Release/obj.target/bindings/src/serialport.o
CXX(target) Release/obj.target/bindings/src/serialport_unix.o
CXX(target) Release/obj.target/bindings/src/poller.o
CXX(target) Release/obj.target/bindings/src/serialport_linux.o
SOLINK_MODULE(target) Release/obj.target/bindings.node
COPY Release/bindings.node
make: Leaving directory '/data/node_modules/@serialport/bindings-cpp/build'
gyp info ok
6e27a50136db:/data/node_modules/@serialport/bindings-cpp#
@patrickelectric the problem is that the default pre-built binaries for node-serial don't support the musl libc library that is used instead of glibc in the Alpine based containers.
I have asked the node-serial maintainers to build Alpine based binaries, but they have not provided them yet.
The rebuild command builds the binary against musl library so it then works properly.
Thanks for the explanation! That makes total sense! Can you link the issue here where you contacted the developer to make it easier for us to track the status ? https://github.com/serialport/bindings-cpp/issues/139
On Wed, Apr 17, 2024, 11:53 Ben Hardill @.***> wrote:
@patrickelectric https://github.com/patrickelectric the problem is that the default pre-built binaries for node-serial don't support the musl libc library that is used instead of glibc in the Alpine based containers.
I have asked the node-serial maintainers to build Alpine based binaries, but they have not provided them yet.
The rebuild command builds the binary against musl library so it then works properly.
— Reply to this email directly, view it on GitHub https://github.com/node-red/node-red-nodes/issues/1027#issuecomment-2061453370, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAJIYCN5ZVT36OVAAK2HPGLY52EHVAVCNFSM6AAAAAA4FCIIW6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDANRRGQ2TGMZXGA . You are receiving this because you were mentioned.Message ID: @.***>
It's in the scrollback just about DCJ's December 6th comment.
Install log:
node-red:
Flow:
Originally posted by @patrickelectric in https://github.com/node-red/node-red-nodes/issues/894#issuecomment-1699778378