Multiple instance problem Node-RED

Hi everyone,
I installed recently several Node-RED in my computer, however the first instance intalled some time ago is working different than the previous ones. The dashboard is not working well for instances installed after the initial one, I described the problem in this post:

Someone can check if the way that I used to install the multiple instances are properly or not?

So, I show the steps that I followed to install the different versions.

  1. I installed the first one executing the command below as global (I followed the steps described in nodered.org):
npm install -g --unsafe-perm node-red

It was installed automatically in port 1880. This is the Node-Red which works properly with node node-red-contrib-led.

To add the second instance in port 1881, I read some tutorials about how to install multiple instance of Node-Red in Windows 10. I created a new folder in C: directory under the name "c:\node-red-1881", after that I executed the command below:

node-red -p 1881 -u c:/node-red-1881

All of them are using the same Node-RED version, the same node.js and the same dashboard version.

Thanks for your help!!

You haven't installed node-red multiple times, you have installed it only once. You are running multiple instances of it.

I have just tested what you have done, using Ubuntu and node-red 2.1.0-beta.1 and nodejs 14.18. It works fine for me.
I can't test in Windows as I don't use Windows.

Perhaps someone else can check it in Windows.

Please post the websocket error that you got in the previous thread in the browser console. That may help identify the problem.

Here it is the websocket problem for instance running in 1881:

JQMIGRATE: Migrate is installed, version 3.3.0
DevTools failed to load source map: Could not load content for http://localhost:1881/vendor/purify.min.js.map: HTTP error: status code 404, net::ERR_HTTP_RESPONSE_CODE_FAILURE
red.min.js:16 Node-RED: 1.2.6
red.min.js:16 Versions
red.min.js:16 Projects disabled
2DevTools failed to load source map: Could not load content for http://localhost:1881/gridstack.min.map: HTTP error: status code 404, net::ERR_HTTP_RESPONSE_CODE_FAILURE

the websocket of the dashboard:

DevTools failed to load source map: Could not load content for http://localhost:1881/ui/js/angular-chart.min.js.map: HTTP error: status code 404, net::ERR_HTTP_RESPONSE_CODE_FAILURE
app.min.js:530 Rendered http://localhost:1881/ui/css/app.min.less successfully.
app.min.js:530 CSS for http://localhost:1881/ui/css/app.min.less generated in 544ms
app.min.js:530 Less has finished. CSS generated in 546ms
app.min.js:150 You are using the ngTouch module. 
AngularJS Material already has mobile click, tap, and swipe support... 
ngTouch is not supported with AngularJS Material!
(anonymous) @ app.min.js:150
e @ app.min.js:470
invoke @ app.min.js:66
(anonymous) @ app.min.js:68
r @ app.min.js:29
fb @ app.min.js:68
c @ app.min.js:43
Wc @ app.min.js:43
Ee @ app.min.js:42
(anonymous) @ app.min.js:372
e @ app.min.js:20
t @ app.min.js:20
setTimeout (async)
(anonymous) @ app.min.js:20
c @ app.min.js:20
fireWith @ app.min.js:20
fire @ app.min.js:20
c @ app.min.js:20
fireWith @ app.min.js:20
ready @ app.min.js:20
B @ app.min.js:20
app.min.js:135 GET http://localhost:1881/ui/loading.html 404 (Not Found)
(anonymous) @ app.min.js:135
s @ app.min.js:130
(anonymous) @ app.min.js:128
(anonymous) @ app.min.js:162
$digest @ app.min.js:174
$apply @ app.min.js:177
(anonymous) @ app.min.js:43
invoke @ app.min.js:66
c @ app.min.js:43
Wc @ app.min.js:43
Ee @ app.min.js:42
(anonymous) @ app.min.js:372
e @ app.min.js:20
t @ app.min.js:20
setTimeout (async)
(anonymous) @ app.min.js:20
c @ app.min.js:20
fireWith @ app.min.js:20
fire @ app.min.js:20
c @ app.min.js:20
fireWith @ app.min.js:20
ready @ app.min.js:20
B @ app.min.js:20
websocket.js:88 WebSocket connection to 'ws://localhost:1881/ui/socket.io/?EIO=4&transport=websocket&sid=C9MSPQJTyRrvEpTfAAAC' failed: 
doOpen @ websocket.js:88
open @ transport.js:46
probe @ socket.js:335
onOpen @ socket.js:361
onHandshake @ socket.js:425
onPacket @ socket.js:386
./node_modules/component-emitter/index.js.Emitter.emit @ index.js:145
onPacket @ transport.js:107
callback @ polling.js:98
onData @ polling.js:102
./node_modules/component-emitter/index.js.Emitter.emit @ index.js:145
onData @ polling-xhr.js:232
onLoad @ polling-xhr.js:283
xhr.onreadystatechange @ polling-xhr.js:187

Here my conclusion and solution, although I do not know the reason.

I have created a new instance in port 1882, however in this case I created the new folder directly inside users folder as follows: C:\Users\usuario\node-red-1882 instead of C:\node-red-1881

After that change I solved my problem. But I do not know why, sure someone can explain the main reason.

Thanks Colin!!

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