Some usage issues with Node-Red1.3.3

Recently I had a problem. My interface was always disconnected. I don't know what caused this phenomenon, and I don't know if anyone else had similar problems.

I use PM2 to control Node-red on a centos7 system. I see in the list that Node-red is online, but the page (IP :port) cannot be opened. To be exact, it cannot be opened after a period of time, not at the beginning.I need to execute "PM2 start" before the node-red page can open again. My program flow on the other machine is version 1.0.2 and it works without any exceptions.

Sounds like node-red is crashing.

Check the PM2 logs.

[TAILING] Tailing last 15 lines for [node-red] process (change the value with --lines option)
/root/.pm2/logs/node-red-error.log last 15 lines:
0|node-red | (node:10879) ExperimentalWarning: queueMicrotask() is experimental.
0|node-red | (node:10898) ExperimentalWarning: queueMicrotask() is experimental.

Thank you very much for your reply: I saw a post on the Internet saying that I need to upgrade Node. I upgraded Node from 11 to 12, but the problem is still there. Do I need to upgrade to 14.17.1 (the latest version of Node.js) and Node-red to the latest version?Or if you have other solutions, please give us some guidance. Thank you very much.

There must be more logs than that? I would expect to see a crash log somewhere.

what does pm2 log --lines 1000 give you?

Also, PM2 error logs are saved to $HOME/.pm2/logs/XXX-error.log or ~/.pm2/logs/XXX-error.log

and PM2 out logs are saved to $HOME/.pm2/logs/XXX-out.log or ~/.pm2/logs/XXX-access.log .

Where XXX is the name of your app.

Thank you again for your reply. In the "node-red-error.log" file, it is all "(node: XXXX) experimentalWarning: queueCricroTask () is experimental."

After I upgraded Node.js, there was no crash on 23rd. I don't know whether the problem has been solved or not. It seems to be normal for the moment

在 “node-red-error.log”文件中:
Welcome to Node-RED

===================

22 Jun 18:01:11 - [info] Node-RED version: v1.3.3

22 Jun 18:01:11 - [info] Node.js version: v11.0.0

22 Jun 18:01:11 - [info] Linux 3.10.0-1160.21.1.el7.x86_64 x64 LE

22 Jun 18:01:12 - [info] Loading palette nodes

22 Jun 18:01:16 - [info] +-----------------------------------------------------

22 Jun 18:01:16 - [info] | uibuilder initialised:

22 Jun 18:01:16 - [info] | root folder: /root/.node-red/uibuilder

22 Jun 18:01:16 - [info] | version . .: 3.2.1

22 Jun 18:01:16 - [info] | packages . : socket.io

22 Jun 18:01:16 - [info] +-----------------------------------------------------

22 Jun 18:01:16 - [info] Settings file : /root/.node-red/settings.js

22 Jun 18:01:16 - [info] Context store : 'default' [module=localfilesystem]

22 Jun 18:01:16 - [info] User directory : /root/.node-red

22 Jun 18:01:16 - [warn] Projects disabled : editorTheme.projects.enabled=false

22 Jun 18:01:16 - [info] Flows file : /root/.node-red/flows_iZm5eh99wjptdpgrj7deknZ.json

22 Jun 18:01:16 - [info] Server now running at http://127.0.0.1:2345/

22 Jun 18:01:16 - [warn]


Your flow credentials file is encrypted using a system-generated key.

If the system-generated key is lost for any reason, your credentials

file will not be recoverable, you will have to delete it and re-enter

your credentials.

You should set your own key using the 'credentialSecret' option in

your settings file. Node-RED will then re-encrypt your credentials

file using your chosen key the next time you deploy a change.


22 Jun 18:01:16 - [info] Starting flows

22 Jun 18:01:17 - [info] Started flows

23 Jun 00:00:00 - [error] [function:20e45c08.bb60e4] TypeError: Cannot read property 'MeterWater' of null

23 Jun 08:52:03 - [info] Stopping modified flows

23 Jun 08:52:03 - [info] Stopped modified flows

23 Jun 08:52:03 - [info] Starting modified flows

23 Jun 08:52:03 - [info] Started modified flows

23 Jun 08:52:03 - [info] [tcp in:cb41eeda.90954] listening on port 8028

23 Jun 08:52:03 - [info] [mqtt-broker:6645678.6cbae98] Connected to broker: mqtt://47.105.87.234:1883

23 Jun 08:52:08 - [error] [function:生成校验码(去除风速)] TypeError: Cannot read property 'length' of undefined

23 Jun 08:52:18 - [warn]


Sorry, I can't upload my file due to insufficient permissions, so I can only copy part of it.I have tried to close the Node-red running in PM2 and directly command to run Node-red, which runs normally and redeployments the stream, but once the page crashes, there is no output, and the page can not be opened by reloading, so I need to close the program and execute Node-red again.

Are you sure you actually updated node-js?

The next post shows...

I would try to get onto nodejs 14 LTS

I'm sorry for not replying to your message in time.
Yes, I updated Node.js. I just didn't update it to the latest version. Here is the updated version

''[root@iZm5eh99wjptdpgrj7deknZ ~]# node -v

v12.22.1

[root@iZm5eh99wjptdpgrj7deknZ ~]# ''

The log information at around 10 o 'clock on 23rd:

Welcome to Node-RED

= = = = = = = = = = = = = = = = = = =

23 Jun 09:58:04 - [info] node-red version: v1.3.3

23 Jun 09:58:04 - [info] Node.js version: v11.0.0

This is from 11.41 on the 23rd and has been upgraded to 12

Welcome to Node-RED

= = = = = = = = = = = = = = = = = = =

23 Jun 11:41:48 - [info] node-red version: v1.3.3

23 Jun 11:41:48 - [info] node.js version: v12.22.1

I also have a question for you. What command should Node-red use to upgrade to the specified version?

I used "sudo NPM install -g --unsafe-perm node-red" to upgrade to the latest version every time, however, it wasn't what I wanted, I wanted to use the specified version, but when I used something like:"Sudo NPM install -g --unsafe-perm node-red v1.2.8",I found the order to be wrong.I remember trying to write something like this, or "npm install node-red vx.x.x". I can't remember what it was, but it didn't work.

sudo npm install -g --unsafe-perm node-red@1.2.8

1 Like

Thank you very much

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.