Skip to content
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

Crashing on RPi3 armv7l after latest build #395

Closed
thalesmaoa opened this issue Nov 19, 2023 · 8 comments
Closed

Crashing on RPi3 armv7l after latest build #395

thalesmaoa opened this issue Nov 19, 2023 · 8 comments

Comments

@thalesmaoa
Copy link

What are the steps to reproduce?

Run latest image on a 32bit buster Raspberry Pi 3 armv7l.

What happens?

nodered-casa  | 18 Nov 22:35:16 - [info] 
nodered-casa  | 
nodered-casa  | Welcome to Node-RED
nodered-casa  | ===================
nodered-casa  | 
nodered-casa  | 18 Nov 22:35:16 - [info] Node-RED version: v3.1.0
nodered-casa  | 18 Nov 22:35:16 - [info] Node.js  version: v16.20.2
nodered-casa  | 18 Nov 22:35:16 - [info] Linux 5.10.103-v7+ arm LE
nodered-casa  | 18 Nov 22:35:18 - [info] Loading palette nodes
nodered-casa  | 
nodered-casa  | 
nodered-casa  | #
nodered-casa  | # Fatal error in , line 0
nodered-casa  | # unreachable code
nodered-casa  | #
nodered-casa  | #
nodered-casa  | #
nodered-casa  | #FailureMessage Object: 0x7555075c
nodered-casa  | ./entrypoint.sh: line 14:     7 Trace/breakpoint trap   (core dumped) /usr/local/bin/node $NODE_OPTIONS node_modules/node-red/red.js --userDir /data $FLOWS "${@}"
nodered-casa exited with code 133

Please tell us about your environment:

$ cat /etc/os-release 
PRETTY_NAME="Raspbian GNU/Linux 10 (buster)"
NAME="Raspbian GNU/Linux"
VERSION_ID="10"
VERSION="10 (buster)"
VERSION_CODENAME=buster
ID=raspbian
ID_LIKE=debian
HOME_URL="http://www.raspbian.org/"
SUPPORT_URL="http://www.raspbian.org/RaspbianForums"
BUG_REPORT_URL="http://www.raspbian.org/RaspbianBugs"
$ uname -a
Linux rasp 5.10.103-v7+ #1529 SMP Tue Mar 8 12:21:37 GMT 2022 armv7l GNU/Linux

The problem seems to emerged from the latest image (22 days ago). I wasn`t able to identify the before lastest to test. With some guidance, I can test.

Extra

If I add env variable, it crashes as well:

services:
  nodered-casa:
    image: nodered/node-red:latest
    container_name: nodered-casa
    restart: no
    #group_add: 
    #  - dialout
    #devices:
    #  - "/dev/ttyAMA0:/dev/ttyAMA0"
    ports:
      - '1881:1880'
    volumes:
      - ./data:/data
    environment:
      - TZ=America/Sao_Paulo
      - NODE_OPTIONS="--max_old_space_size=256"
    logging:
      options:
        max-size: "100m"
nodered-casa  | node:internal/modules/cjs/loader:1031
nodered-casa  |   throw err;
nodered-casa  |   ^
nodered-casa  | 
nodered-casa  | Error: Cannot find module '/usr/src/node-red/"--max_old_space_size=256"'
nodered-casa  |     at Function.Module._resolveFilename (node:internal/modules/cjs/loader:1028:15)
nodered-casa  |     at Function.Module._load (node:internal/modules/cjs/loader:873:27)
nodered-casa  |     at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:81:12)
nodered-casa  |     at node:internal/main/run_main_module:22:47 {
nodered-casa  |   code: 'MODULE_NOT_FOUND',
nodered-casa  |   requireStack: []
nodered-casa  | }
nodered-casa exited with code 1
@Paraphraser
Copy link

You could try either of the following

image: nodered/node-red:3.0.2
image: nodered/node-red:2.2

See also DockerHub - you need to go to the second page to find older images.

@thalesmaoa
Copy link
Author

thalesmaoa commented Nov 19, 2023

Thx @Paraphraser

I confirm that it does work for older version:

services:
  nodered-casa:
    #image: nodered/node-red:latest
    image: nodered/node-red:3.0.2
    container_name: nodered-casa
    restart: no
    ports:
      - '1881:1880'
    volumes:
      - ./data:/data
    environment:
      - TZ=America/Sao_Paulo
      - NODE_OPTIONS=--max_old_space_size=256
    logging:
      options:
        max-size: "100m"
        max-file: "3"

@Paraphraser
Copy link

And I can confirm that latest works on a Raspberry Pi 4B running Bullseye 64-bit.

I don't have a 3B so I can't test that hardware.

Although we'll have to wait for confirmation from the good folks who maintain this repo, I suspect your problem might turn out to be a Buster dependency. You might want to give some thought to upgrading to Bullseye or Bookworm.

@hardillb
Copy link
Member

As the first error is getting thrown while trying to load Node-RED nodes can you include the package.json from your mounted /data directory so we can see what nodes you have installed.

Also have you installed any new nodes or upgraded a node recently?

@hardillb
Copy link
Member

Also given the latest tag tracks Node-RED releases are you sure you had run this setup on Node-RED 3.1.0 before, especially as it runs with the 3.0.2 tag? When was the last time you pulled the container/

@hardillb
Copy link
Member

As for the separate problem with setting an environment variable, I can't reproduce that locally wit the latest container and it shouldn't be possible looking at the entrypoint.sh script as the order of the script and the NODE_OPTIONS env var are the wrong way round.

/usr/local/bin/node $NODE_OPTIONS node_modules/node-red/red.js --userDir /data $FLOWS "${@}" &

@hardillb
Copy link
Member

Also read #319

@thalesmaoa
Copy link
Author

Hi @hardillb , you gave me a lot of contributions. I really appreciate it.
You are correct. This is the only RPi running buster, others are all running bullseye. Your answer hit bullseye 😆.

Thx a lot!

I will upgrade, but the last post solve it for a while.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants