node-red-contrib-ibm-cloud / node-red-contrib-ibm-db2

Node-RED nodes to work with a Db2 LUW database. Works with "Db2 on Cloud" and "Db2 Warehouse on Cloud" services as well as standalone installation of Db2 LUW.
2 stars 1 forks source link

node-red crashes with signal SIGSEGV #8

Open janvda opened 1 year ago

janvda commented 1 year ago

I have just created a simple flow

image

and node-red crashes when I deploy that flow with following in the log file:

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

21 Nov 19:27:28 - [info] Node-RED version: v2.2.3
21 Nov 19:27:28 - [info] Node.js  version: v16.13.1
21 Nov 19:27:28 - [info] Linux 5.10.93-0-virt x64 LE
21 Nov 19:27:29 - [info] Loading palette nodes
21 Nov 19:27:29 - [info] Settings file  : /data/settings.js
21 Nov 19:27:29 - [info] Context store  : 'default' [module=memory]
21 Nov 19:27:29 - [info] User directory : /data
21 Nov 19:27:29 - [info] Projects directory: /data/projects
21 Nov 19:27:29 - [warn] No active project : using default flows file
21 Nov 19:27:29 - [info] Flows file     : /data/flows.json
21 Nov 19:27:29 - [info] Server now running at http://127.0.0.1:1880/
21 Nov 19:27:29 - [warn] Using unencrypted credentials
21 Nov 19:27:29 - [info] Starting flows
npm ERR! path /usr/src/node-red
npm ERR! command failed
npm ERR! signal SIGSEGV
npm ERR! command sh -c node $NODE_OPTIONS node_modules/node-red/red.js $FLOWS "--userDir" "/data"

npm ERR! A complete log of this run can be found in:
npm ERR!     /data/.npm/_logs/2022-11-21T18_27_30_479Z-debug.log
janvda commented 1 year ago

maybe the problem is not with this repository but with the dependent module :

janvda commented 1 year ago

The problem is indeed with the dependent module

I couldn't get it working on alpine based docker images. It seems to work when using a debian based docker image (e.g. node:16-buster-slim)

janvda commented 1 year ago

FYI I have created myself a number of node-red docker images based on debian which you can find at following location:

I am using the following base image in my docker container

I also had to add the following lines to my dockerfile to get it working:

# fix missing libxml2 and libc.musl-x86_64.so.1 (see https://github.com/alexander-akhmetov/python-telegram/issues/3)  and
USER root
RUN apt-get update && apt-get install -y musl-dev libxml2
RUN ln -s /usr/lib/x86_64-linux-musl/libc.so /lib/libc.musl-x86_64.so.1
USER node-red
# end of fix