Skip to content

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

Closed

Description

@DanielWeigl

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

Activity

  1. DanielWeigl commented on Jul 15, 2022

    @DanielWeigl
    Author

    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
    
    > node-red-docker@2.2.2 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
    
  2. hardillb commented on Jul 15, 2022

    @hardillb
    Member

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

  3. hardillb commented on Jul 15, 2022

    @hardillb
    Member

    Probable duplicate of #296

  4. snkku commented on Jul 15, 2022

    @snkku

    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

  5. hardillb commented on Jul 15, 2022

    @hardillb
    Member

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

  6. snkku commented on Jul 15, 2022

    @snkku

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

    work! thanks!

  7. hardillb commented on Jul 15, 2022

    @hardillb
    Member

    @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

  8. Paraphraser commented on Jul 16, 2022

    @Paraphraser

    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

  9. DanielWeigl commented on Jul 18, 2022

    @DanielWeigl
    Author

    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
    
    > node-red-docker@3.0.0 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
    ...
    
  10. hardillb commented on Jul 18, 2022

    @hardillb
    Member

    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

  11. DanielWeigl commented on Jul 18, 2022

    @DanielWeigl
    Author

    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?

  12. edm00se commented on Sep 14, 2022

    @edm00se

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

  13. pinned this issue on Sep 14, 2022
  14. Dubz commented on Dec 7, 2024

    @Dubz

    Over two years and this is still broken. That's crazy.

    Well, at least I'm not the only one. I was ready to try jumping to a different OS, but I'm glad I didn't waste time with that.

  15. hardillb commented on Dec 7, 2024

    @hardillb
    Member

    @Dubz I don't know what you mean, if you are running a up to date (not end of life) version of Raspbian and latest Node-RED docker containers then everything works just fine.

    The route cause of this was Alpine Linux moving to a 64bit field for measuring time, the fix is to ensure you are running a supported version of Raspbian and the work around is to add --security-opt=seccomp=unconfined to the docker run command (as documented above)

  16. Dubz commented on Dec 8, 2024

    @Dubz

    @Dubz The route cause of this was Alpine Linux moving to a 64bit field for measuring time, the fix is to ensure you are running a supported version of Raspbian and the work around is to add --security-opt=seccomp=unconfined to the docker run command (as documented above)

    What about on 32-bit systems then?
    I do seem to have looked over a couple posts and misread them so maybe there is something else I need to do. I also tried going back to v2.2 and it failed with the same issue, so it's not updates made by node red that caused this, just implementations or something I guess.

  17. hardillb commented on Dec 8, 2024

    @hardillb
    Member

    @Dubz time can now be represented by a 64bit number even on 32bit OS systems (this is because the old 32bit version will overflow in 2038) and the Alpine base image for the NR containers requires this support.

    But to be honest, you probably should not be deploying anything new on NR 3.0.2 or versions of Raspberry Pi OS that don't support the 64bit format time for many reasons, but mainly because both are no longer receiving any security updates.

  18. Paraphraser commented on Dec 8, 2024

    @Paraphraser

    I agree with @hardillb about there being no barrier to running Node-RED 3 on Raspberry Pi. I am running Node-RED 3 on both 64-bit Bullseye and 64-bit Bookworm, and I am not using --security-opt=seccomp=unconfined to do it. It just works.

    To the best of my knowledge, you only need to patch libseccomp2 on Buster systems. I think you need to patch all Buster systems, whether they are full 32-bit, mixed mode (32-bit user mode, 64-bit kernel mode) or full 64-bit.

    My own Pi journey began with 32-bit Buster and, for a time, I ran mixed-mode Bullseye but it was somewhere around the end of 2021 (or maybe early 2022) when I committed to full 64-bit, first for Bullseye, now Bookworm. Neither 64-bit Bullseye nor 64-bit Bookworm have ever had any issues running Node-RED 3. Ditto other containers (eg Mosquitto) that chucked-up 64-bit date problems along the way.

    Perhaps try running your system in mixed-mode? Append "arm_64bit=1" to /boot/config.txt and reboot.

    More generally, I am not aware of any reason why you would want to run a Pi with a 32-bit OS. Granted, I only have Pi 4s and Zero2W; if your hardware isn't in the supported list, so be it. As far as I can see, 32-bit binaries run just fine in a 64-bit OS. Ditto armhf containers if an arm64 variant isn't available. But, if you are running some package in the belief that it will only work on a 32-bit OS, I'd advise re-confirming that.

    Basically, if you can't prove to your own satisfaction that you really must run a 32-bit OS, I'd suggest rebuilding on top of 64-bit Bookworm. I don't think you'll regret it.

  19. Dubz commented on Dec 13, 2024

    @Dubz

    You are correct, the OS is the main culprit and needing updated to a more appropriate, supported OS. My apologies.

    I'm glad to know I can finally get back into this once time allows.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions