node-red-docker icon indicating copy to clipboard operation
node-red-docker copied to clipboard

nodered/node-red:3.0.0 does not run on raspberry pi / Raspbian

Open DanielWeigl opened this issue 2 years ago • 11 comments

I updated my nodered on my RaspberryPi to latest and now it doe not does not run anymore:

Steps to reproduce:

docker run -it --rm --name mynodered nodered/node-red:3.0.0
#
# Fatal error in , line 0
# unreachable code
#
#
#
#FailureMessage Object: 0xbeab354c

Image info:

root@pi:~# docker inspect nodered/node-red:3.0.0
[
    {
        "Id": "sha256:1d1d06c13a3e74ab07b877fe64ce3206cc77f6f48511d353ab32456bd502a51e",
        "RepoTags": [
            "nodered/node-red:3.0.0",
            "nodered/node-red:latest"
        ],
        "RepoDigests": [
            "nodered/node-red@sha256:d3637803bcaeb8c53a3976c0db766f784ce1c9cb6eef759cf1d44f8b4ccf26a0"
        ],
        "Parent": "",
        "Comment": "buildkit.dockerfile.v0",
        "Created": "2022-07-14T09:42:12.65790837Z",
        "Container": "",
        "ContainerConfig": {
            "Hostname": "",
            "Domainname": "",
            "User": "",
            "AttachStdin": false,
            "AttachStdout": false,
            "AttachStderr": false,
            "Tty": false,
            "OpenStdin": false,
            "StdinOnce": false,
            "Env": null,
            "Cmd": null,
            "Image": "",
            "Volumes": null,
            "WorkingDir": "",
            "Entrypoint": null,
            "OnBuild": null,
            "Labels": null
        },
        "DockerVersion": "",
        "Author": "",
        "Config": {
            "Hostname": "",
            "Domainname": "",
            "User": "node-red",
            "AttachStdin": false,
            "AttachStdout": false,
            "AttachStderr": false,
            "ExposedPorts": {
                "1880/tcp": {}
            },
            "Tty": false,
            "OpenStdin": false,
            "StdinOnce": false,
            "Env": [
                "PATH=/usr/src/node-red/node_modules/.bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin",
                "NODE_VERSION=16.16.0",
                "YARN_VERSION=1.22.19",
                "NODE_RED_VERSION=v3.0.0",
                "NODE_PATH=/usr/src/node-red/node_modules:/data/node_modules",
                "FLOWS=flows.json"
            ],
            "Cmd": null,
            "Healthcheck": {
                "Test": [
                    "CMD-SHELL",
                    "node /healthcheck.js"
                ]
            },
            "Image": "",
            "Volumes": null,
            "WorkingDir": "/usr/src/node-red",
            "Entrypoint": [
                "npm",
                "--no-update-notifier",
                "--no-fund",
                "start",
                "--cache",
                "/data/.npm",
                "--",
                "--userDir",
                "/data"
            ],
            "OnBuild": null,
            "Labels": {
                "authors": "Dave Conway-Jones, Nick O'Leary, James Thomas, Raymond Mouthaan",
                "org.label-schema.arch": "",
                "org.label-schema.build-date": "2022-07-14T09:32:47Z",
                "org.label-schema.description": "Low-code programming for event-driven applications.",
                "org.label-schema.docker.dockerfile": ".docker/Dockerfile.alpine",
                "org.label-schema.license": "Apache-2.0",
                "org.label-schema.name": "Node-RED",
                "org.label-schema.url": "https://nodered.org",
                "org.label-schema.vcs-ref": "",
                "org.label-schema.vcs-type": "Git",
                "org.label-schema.vcs-url": "https://github.com/node-red/node-red-docker",
                "org.label-schema.version": "3.0.0"
            }
        },
        "Architecture": "arm",
        "Variant": "v7",
        "Os": "linux",
        "Size": 407064728,
        "VirtualSize": 407064728,
        "GraphDriver": {
            "Data": {
                "LowerDir": "/var/lib/docker/overlay2/8ef58d13cc1afc3e57faa78332351607463af122b76f8f239080dfbd9578f489/diff:/var/lib/docker/overlay2/3b1d035a802cab261fef8293e9f2a931314467798736c78f58ec67409636fa6e/diff:/var/lib/docker/overlay2/c00a623ae87be7931a0a09e4b6936efa1dfd0ed7c81cd968c99e01935b034f3e/diff:/var/lib/docker/overlay2/26692a34d638a3f70e915f356e9430fb64e3a5fce491a8f9f84eac1b91b90ea9/diff:/var/lib/docker/overlay2/8c191064bdba31d91df88974ebeb0ff308d716dc1236a1a972f4ac5e33c39510/diff:/var/lib/docker/overlay2/81cbf3878b486738f3d4601c4d0c9115e180a01d9fc51acf9dad8bd23bda99cb/diff:/var/lib/docker/overlay2/8807b165b0d917cee7361a50d1af00f9b20fd5c894bae01de76c2ac5cbcfa9b3/diff:/var/lib/docker/overlay2/b3a8092fed0381c89960c9fe30191b48d582c30734645375298a36f98b4ea520/diff:/var/lib/docker/overlay2/5185b71d052934dd4ba0ebba65f3dc970f8a58e71f0b36efa723fe9890c2247f/diff:/var/lib/docker/overlay2/93c52fc7c94f619dba3a6ba54ef03c3533124a815d1a412262de21d3ed1a98f5/diff:/var/lib/docker/overlay2/170dd0f12715d472b62c16a4e57fcc36352ba21e7c29d001c526f49c70bd3c7d/diff:/var/lib/docker/overlay2/ee7438e6ce721a073090713a78e3c4153497a9dd030b12a870f385369e0b97f8/diff:/var/lib/docker/overlay2/026c9f5f05a5e9a931c2192ffe4eb5d05ac5fba65b60490403391885d44433ac/diff",
                "MergedDir": "/var/lib/docker/overlay2/054e33284e2ed7b3eba053084c072fe6d89617ea80cbca19ceb07159edebb315/merged",
                "UpperDir": "/var/lib/docker/overlay2/054e33284e2ed7b3eba053084c072fe6d89617ea80cbca19ceb07159edebb315/diff",
                "WorkDir": "/var/lib/docker/overlay2/054e33284e2ed7b3eba053084c072fe6d89617ea80cbca19ceb07159edebb315/work"
            },
            "Name": "overlay2"
        },
        "RootFS": {
            "Type": "layers",
            "Layers": [
                "sha256:37ac00f8cd049c57320efaf3b854cad516368475d1ebf3a497756a8a4200b849",
                "sha256:c52a3ff0907fd4edcd0a5fb5f2b41fcf83e8a1ccf00da5351adb82823fc10bd9",
                "sha256:db1d352044d8937afd9f250b2a6f1f03f788c3fa7d9d9472bf5f14804c9448ed",
                "sha256:dfe9050bb28ad8eb22dd1be9b159b0876ee2ed25629a0ccf22f60d237bbf1fee",
                "sha256:ad2df8251a98db98440bde5a3d6e797141ccb3d1917148639503b620749624bb",
                "sha256:8e108dc112c183728cf813780fab0aa39a90f2aa872a5c61eab1592600b269a5",
                "sha256:72f61ed8a1850b668ebc0a9f5aae0f064a8d9cde1f93a89922d891b2eab98b23",
                "sha256:5f70bf18a086007016e948b04aed3b82103a36bea41755b6cddfaf10ace3c6ef",
                "sha256:98b0ba369e1d67db91153a78ad96f52007672a6790061c8f99ad0f150ea753ab",
                "sha256:c8acb145bca8f6f152e6bc5c2f857fc015f13b00c1527b2d583cfeacef072ba7",
                "sha256:72fc824842bf42bd18d4b6fc806d285267fd381a2693f947cb5cb1743334c336",
                "sha256:2d0c20f9e50f7b2e97fd033a24870d27895d9681f13d13db428606670273d816",
                "sha256:8472fb094bdb7c97391734f675610336bbd10a5a37ffb414449ddae212dc67cf",
                "sha256:51782ba673f5c9a6fbf0d93919775c0314617a864cc3438feeb288ec093ca453"
            ]
        },
        "Metadata": {
            "LastTagTime": "0001-01-01T00:00:00Z"
        }
    }
]

System info:

root@pi:~# lsb_release -a
No LSB modules are available.
Distributor ID: Raspbian
Description:    Raspbian GNU/Linux 10 (buster)
Release:        10
Codename:       buster

root@pi:~# cat /proc/cpuinfo
processor       : 0
model name      : ARMv7 Processor rev 3 (v7l)
BogoMIPS        : 126.00
Features        : half thumb fastmult vfp edsp neon vfpv3 tls vfpv4 idiva idivt vfpd32 lpae evtstrm crc32 
CPU implementer : 0x41
CPU architecture: 7
CPU variant     : 0x0
CPU part        : 0xd08
CPU revision    : 3

processor       : 1
model name      : ARMv7 Processor rev 3 (v7l)
BogoMIPS        : 126.00
Features        : half thumb fastmult vfp edsp neon vfpv3 tls vfpv4 idiva idivt vfpd32 lpae evtstrm crc32 
CPU implementer : 0x41
CPU architecture: 7
CPU variant     : 0x0
CPU part        : 0xd08
CPU revision    : 3

processor       : 2
model name      : ARMv7 Processor rev 3 (v7l)
BogoMIPS        : 126.00
Features        : half thumb fastmult vfp edsp neon vfpv3 tls vfpv4 idiva idivt vfpd32 lpae evtstrm crc32 
CPU implementer : 0x41
CPU architecture: 7
CPU variant     : 0x0
CPU part        : 0xd08
CPU revision    : 3

processor       : 3
model name      : ARMv7 Processor rev 3 (v7l)
BogoMIPS        : 126.00
Features        : half thumb fastmult vfp edsp neon vfpv3 tls vfpv4 idiva idivt vfpd32 lpae evtstrm crc32 
CPU implementer : 0x41
CPU architecture: 7
CPU variant     : 0x0
CPU part        : 0xd08
CPU revision    : 3

Hardware        : BCM2711
Revision        : c03112
Serial          : xxx
Model           : Raspberry Pi 4 Model B Rev 1.2

DanielWeigl avatar Jul 15 '22 12:07 DanielWeigl

Same happens for node-red:3.0.0-18

root@pi:~# docker run -it --rm --name mynodered nodered/node-red:3.0.0-18
Unable to find image 'nodered/node-red:3.0.0-18' locally
3.0.0-18: Pulling from nodered/node-red
6366ba92f08e: Already exists 
480d0242e804: Pull complete 
e54759dcfc01: Pull complete 
1d417e2e963f: Pull complete 
06a5294c6966: Pull complete 
a1c1895c725c: Pull complete 
a829bea8b741: Pull complete 
4f4fb700ef54: Pull complete 
1b190ab5b65b: Pull complete 
346e545bd5a0: Pull complete 
4b43fe8f1963: Pull complete 
c467b9746df9: Pull complete 
f850124c1415: Pull complete 
8461b42bb579: Pull complete 
Digest: sha256:3ed2da1f95bb3fa1c9b69afd5b34297862bda50471750f13d447adb5104d8eb8
Status: Downloaded newer image for nodered/node-red:3.0.0-18

#
# Fatal error in , line 0
# unreachable code
#
#
#
#FailureMessage Object: 0xbe9b047c

But node-red:2.2.2 is still working:

root@pi:~# docker run -it --rm --name mynodered nodered/node-red:2.2.2
Unable to find image 'nodered/node-red:2.2.2' locally
2.2.2: Pulling from nodered/node-red
Digest: sha256:e131dcadfe9297fa8f24233d7ab65b9f116439c868b01cee4c18adef9d9db0a5
Status: Downloaded newer image for nodered/node-red:2.2.2

> [email protected] start /usr/src/node-red
> node $NODE_OPTIONS node_modules/node-red/red.js $FLOWS "--userDir" "/data"

15 Jul 12:50:45 - [info] 

Welcome to Node-RED
===================

15 Jul 12:50:45 - [info] Node-RED version: v2.2.2
15 Jul 12:50:45 - [info] Node.js  version: v14.18.2
15 Jul 12:50:45 - [info] Linux 5.10.103-v7l+ arm LE
15 Jul 12:50:46 - [info] Loading palette nodes
15 Jul 12:50:47 - [info] Settings file  : /data/settings.js
15 Jul 12:50:47 - [info] Context store  : 'default' [module=memory]
15 Jul 12:50:47 - [info] User directory : /data
15 Jul 12:50:47 - [warn] Projects disabled : editorTheme.projects.enabled=false
15 Jul 12:50:47 - [info] Flows file     : /data/flows.json
15 Jul 12:50:47 - [warn] 
...
15 Jul 12:50:47 - [info] Server now running at http://127.0.0.1:1880/
15 Jul 12:50:47 - [info] Starting flows
15 Jul 12:50:47 - [info] Started flows

DanielWeigl avatar Jul 15 '22 12:07 DanielWeigl

What version of docker are you running? also can you confirm you are running a 32bit version of the Raspberry Pi OS?

hardillb avatar Jul 15 '22 12:07 hardillb

Probable duplicate of https://github.com/node-red/node-red-docker/issues/296

hardillb avatar Jul 15 '22 12:07 hardillb

same problem after update... Distributor ID: Raspbian Description: Raspbian GNU/Linux 10 (buster) Release: 10 Codename: buster Linux raspberrypi 5.10.103-v7l+ #1529 SMP Tue Mar 8 12:24:00 GMT 2022 armv7l GNU/Linux Docker version 20.10.17, build 100c701

snkku avatar Jul 15 '22 13:07 snkku

Does adding --security-opt=seccomp=unconfined to the docker run command work?

hardillb avatar Jul 15 '22 13:07 hardillb

Does adding --security-opt=seccomp=unconfined to the docker run command work?

work! thanks!

snkku avatar Jul 15 '22 13:07 snkku

@DanielWeigl & @snkku Can you run the following please:

scmp_sys_resolver -a arm clock_gettime64

And update with the output and also see if you can work out what version of libseccomp you have installed

Also check for any OS updates

hardillb avatar Jul 15 '22 14:07 hardillb

I don't know if this will be useful but the screen shot is from a Pi4 running Buster with libseccomp2 patched. Shows 3.0.0-14 starting up OK (via docker-compose).

See libseccomp2 patch for Buster.

601B0083-78CC-4487-8740-C3E614FAF356

Paraphraser avatar Jul 16 '22 00:07 Paraphraser

What version of docker are you running?

pi@pi:~ $ docker --version
Docker version 20.10.17, build 100c701

also can you confirm you are running a 32bit version of the Raspberry Pi OS?

yes, its 32bit:

pi@pi:~ $ getconf LONG_BIT
32
pi@pi:~ $ uname -a
Linux pi 5.10.103-v7l+ #1529 SMP Tue Mar 8 12:24:00 GMT 2022 armv7l GNU/Linux

It still fails after installing seccompt and setting clock_gettime64

pi@pi:~ $ sudo apt install seccomp
Reading package lists... Done
Suggested packages:
  libseccomp-dev
The following NEW packages will be installed:
  seccomp
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
Need to get 31.5 kB of archives.
After this operation, 114 kB of additional disk space will be used.
Get:1 http://debian.anexia.at/raspbian/raspbian buster/main armhf seccomp armhf 2.3.3-4 [31.5 kB]
Fetched 31.5 kB in 1s (48.0 kB/s)
Selecting previously unselected package seccomp.
Preparing to unpack .../seccomp_2.3.3-4_armhf.deb ...
Unpacking seccomp (2.3.3-4) ...
Setting up seccomp (2.3.3-4) ...
Processing triggers for man-db (2.8.5-2) ...

pi@pi:~ $ sudo scmp_sys_resolver -a arm clock_gettime64
-1

pi@pi:~ $ docker run -it --rm --name mynodered nodered/node-red:latest
#
# Fatal error in , line 0
# unreachable code
#
#
#
#FailureMessage Object: 0xbe87754c

But this works, as already noted by others:

pi@pi:~ $ docker run -it --rm --name mynodered --security-opt=seccomp=unconfined nodered/node-red:latest

> [email protected] start
> node $NODE_OPTIONS node_modules/node-red/red.js $FLOWS "--userDir" "/data"

18 Jul 11:22:48 - [info] 

Welcome to Node-RED
===================

18 Jul 11:22:48 - [info] Node-RED version: v3.0.0
18 Jul 11:22:48 - [info] Node.js  version: v16.16.0
18 Jul 11:22:48 - [info] Linux 5.10.103-v7l+ arm LE
18 Jul 11:22:49 - [info] Loading palette nodes
18 Jul 11:22:52 - [info] Settings file  : /data/settings.js
18 Jul 11:22:52 - [info] Context store  : 'default' [module=memory]
18 Jul 11:22:52 - [info] User directory : /data
18 Jul 11:22:52 - [warn] Projects disabled : editorTheme.projects.enabled=false
18 Jul 11:22:52 - [info] Flows file     : /data/flows.json
...
18 Jul 11:22:52 - [info] Server now running at http://127.0.0.1:1880/
18 Jul 11:22:52 - [warn] Encrypted credentials not found
18 Jul 11:22:52 - [info] Starting flows
18 Jul 11:22:52 - [info] Started flows
...

DanielWeigl avatar Jul 18 '22 11:07 DanielWeigl

sudo scmp_sys_resolver -a arm clock_gettime64 is not meant to be a fix, it is a test to see if seccomp supports 64bit time.

The correct solution is upgrade to Bullseye, install the back port mentioned above or run with --security-opt=seccomp=unconfined

hardillb avatar Jul 18 '22 11:07 hardillb

Ah, thx - i see.

After installing seccomp2 via

sudo apt-key adv --keyserver hkps://keyserver.ubuntu.com:443 --recv-keys 04EE7237B7D453EC 648ACFD622F3D138

echo "deb http://httpredir.debian.org/debian buster-backports main contrib non-free" | sudo tee -a "/etc/apt/sources.list.d/debian-backports.list"

sudo apt update

sudo apt install libseccomp2 -t buster-backports

it works - so i guess its nothing you can fix on your side, or? If so, we can close this issue.

Or maybe at least a hint in the main readme so its easier to find?

DanielWeigl avatar Jul 18 '22 11:07 DanielWeigl

@hardillb it may be worth pinning this issue in GitHub to hopefully speed up any others finding the fix.

edm00se avatar Sep 14 '22 13:09 edm00se