Node-red-contrib-gc - Exec format error on AMD EPYC Processor

Hy ,

somehow , i can't run the flows on the customers AMD EPYC Processor machine.
How to find the problem / cause ?
( there is no internet access on that machine, so we develop it inHouse and transfering it onto the customer site ).

So reload from the web is not an Option .. at least not an easy one ....

I looks , but there is no other node for the gc information , or ?

docker container startup Log:

24 Apr 11:31:21 - [info] Node.js  version: v22.14.0
24 Apr 11:31:21 - [info] Linux 6.8.0-58-generic x64 LE
24 Apr 11:31:21 - [info] Loading palette nodes
24 Apr 11:31:22 - [info] Dashboard version 3.6.5 started at /ui
24 Apr 11:31:22 - [warn] ------------------------------------------------------
24 Apr 11:31:22 - [warn] [node-red-contrib-gc/gc] Error: Error loading shared library /data/node_modules/gc-stats/build/Release/gcstats.node: Exec format error
24 Apr 11:31:22 - [warn] [node-red-contrib-heap-dump/heap-dump] Error: Error loading shared library /data/node_modules/heapdump/build/Release/addon.node: Exec format error
24 Apr 11:31:22 - [warn] [node-red-contrib-msg-queue/queue] Error: Error loading shared library /data/node_modules/sqlite3/lib/binding/node-v127-linux-x64/node_sqlite3.node: Exec format error
24 Apr 11:31:22 - [warn] [node-red-contrib-msg-queue/retry-queue] Error: Error loading shared library /data/node_modules/sqlite3/lib/binding/node-v127-linux-x64/node_sqlite3.node: Exec format error
24 Apr 11:31:22 - [warn] ------------------------------------------------------
24 Apr 11:31:22 - [info] Settings file  : /data/settings.js
24 Apr 11:31:22 - [info] Context store  : 'default' [module=memory]
24 Apr 11:31:22 - [info] User directory : /data
24 Apr 11:31:22 - [warn] Projects disabled : editorTheme.projects.enabled=false
24 Apr 11:31:22 - [info] Flows file     : /data/flows.json
24 Apr 11:31:22 - [info] Server now running at http://127.0.0.1:1880/
24 Apr 11:31:22 - [warn]

lscpu info :

Architecture:             x86_64
  CPU op-mode(s):         32-bit, 64-bit
  Address sizes:          45 bits physical, 48 bits virtual
  Byte Order:             Little Endian
CPU(s):                   4
  On-line CPU(s) list:    0-3
Vendor ID:                AuthenticAMD
  Model name:             AMD EPYC 9174F 16-Core Processor
    CPU family:           25
    Model:                17
    Thread(s) per core:   1
    Core(s) per socket:   4

I am not certain, but that sounds as if the nodes have been built for the wrong processor architecture. If this were not a Docker install I would say to go into the .node-red folder and run
npm rebuild
which will rebuild any nodes that need building.
I don't know what the equivalent is in a Docker environment.

1 Like

Yes but npm rebuild would need the machine to have internet access - which it doesn’t. So the rebuild will need to be done on a machine with the correct architecture that does has access and then transferred across.

Why does rebuild need internet access?

Most times nodes try to pull down a precompiled binary for the correct architecture - they don’t usually have them all predownloaded.

Yes, you are right. A rebuild on an already built system works, but if the architecture has changed, so that it actually needs to do something, then it fails if the network is not connected. I wondered whether it might fall back to re-compiling but apparently not.

@YEUAM I think you will have either have to provide internet access during the rebuild, or build it on another identical system that does have access, before moving it across to the target.

I am still on your first suggestion with local, on site npm rebuild.
but that leads into another build-dep spiral .

Like:

gyp ERR! stack FetchError: request to https://unofficial-builds.nodejs.org/download/release/v22.14.0/node-v22.14.0-headers.tar.gz failed, reason: connect ECONNREFUSED 45.55.98.129:443
solution >> npm rebuild --nodedir=/data/lib/node-v22.14.0/
verbose shrinkwrap failed to load node_modules/.package-lock.json out of date, updated: node_modules/gc-stats
verbose stack Error: `npm rebuild` only supports SemVer version/range specifiers

python py3-setuptools are missing , but pip is also missing.
local installation are depreciated, so python packages dont provide the setup.py script anymore.

Right now its a back and forth with the (now) customized nodered docker image.

I stop yesterday at that point:

24 Apr 20:25:45 - [warn] ------------------------------------------------------
24 Apr 20:25:45 - [warn] [node-red-contrib-msg-queue/queue] Error: Error loading shared library /data/node_modules/sqlite3/lib/binding/node-v127-linux-x64/node_sqlite3.node: Exec format error
24 Apr 20:25:45 - [warn] [node-red-contrib-msg-queue/retry-queue] Error: Error loading shared library /data/node_modules/sqlite3/lib/binding/node-v127-linux-x64/node_sqlite3.node: Exec format error
24 Apr 20:25:45 - [warn] ------------------------------------------------------

nextup:
i will provide all the packages for a local npm install of these packages as well .


You are Right, the easiest way would be a clone with the same Hardware,
but the AMD EPYC 9174F 16-Core Processor alone would cost around 2 - 2.5k Euro.

  • it will take time to get the Hardware up & running.

Beside the attempt to fix the urgent problem , would be Interesting,
why the compiler things that the INTEL x64 Libs/Moduls have to be recompiled
on the AMD x64 system at the first place ...

booth are x64 architecture .. but something else may bother the compiler