Node Red Troubleshooting Postgresql Multitech AEP

Hello There !

I've been working for a couple of days on Node red on a Multitech Conduit AEP.

I really like this app, it's well designed and offers a lot of possibilities.

However, I've got some issues.

I tried to install node-red-contrib-postgres-multi and node-red-contrib-postgres-variable.

Second one was working fine but I didn't manage to get the first one to work properly.

I decided to remove them manually using npm on a ssh terminal.

Since then, those two nodes remains listed in my node palette and I can't find a way to get rid of them.

When launching the app on ssh term, here what I got :

npm bugs node-red
npm ERR! Linux 3.12.70
npm ERR! argv "node" "/usr/bin/npm" "bugs" "node-red"
npm ERR! node v0.10.48
npm ERR! npm  v2.15.1
npm ERR! code ENOENT
npm ERR! errno ENOENT
npm ERR! syscall spawn

npm ERR! enoent spawn ENOENT
npm ERR! enoent This is most likely not a problem with npm itself
npm ERR! enoent and is related to npm not being able to find a file.
npm ERR! enoent

npm ERR! Please include the following file with any support request:
npm ERR!     /opt/node-red/npm-debug.log

And the content of my npm-debug.log :

0 info it worked if it ends with ok
1 verbose cli [ 'node', '/usr/bin/npm', 'bugs', 'node-red' ]
2 info using npm@2.15.1
3 info using node@v0.10.48
4 silly mapToRegistry name node-red
5 silly mapToRegistry using default registry
6 silly mapToRegistry registry https://registry.npmjs.org/
7 silly mapToRegistry data { raw: 'node-red',
7 silly mapToRegistry   scope: null,
7 silly mapToRegistry   name: 'node-red',
7 silly mapToRegistry   rawSpec: '',
7 silly mapToRegistry   spec: 'latest',
7 silly mapToRegistry   type: 'tag' }
8 silly mapToRegistry uri https://registry.npmjs.org/node-red
9 verbose request uri https://registry.npmjs.org/node-red/latest
10 verbose request no auth needed
11 info attempt registry request try #1 at 18:25:26
12 verbose request id 8d2227759010db10
13 http request GET https://registry.npmjs.org/node-red/latest
14 http 200 https://registry.npmjs.org/node-red/latest
15 verbose headers { date: 'Wed, 29 May 2019 14:24:26 GMT',
15 verbose headers   'content-type': 'application/json',
15 verbose headers   'transfer-encoding': 'chunked',
15 verbose headers   connection: 'keep-alive',
15 verbose headers   'set-cookie': [ '__cfduid=d35a5857bd154c2bfd5c921b3ce06c2f81559139865; expires=Thu, 28-May-20 14:24:25 GMT; path=/; domain=.registry.npmjs.org; HttpOnly' ],
15 verbose headers   'content-encoding': 'gzip',
15 verbose headers   'cf-ray': '4de921c118d76966-CDG',
15 verbose headers   'expect-ct': 'max-age=604800, report-uri="https://report-uri.cloudflare.com/cdn-cgi/beacon/expect-ct"',
15 verbose headers   vary: 'Accept-Encoding',
15 verbose headers   server: 'cloudflare' }
16 silly get cb [ 200,
16 silly get   { date: 'Wed, 29 May 2019 14:24:26 GMT',
16 silly get     'content-type': 'application/json',
16 silly get     'transfer-encoding': 'chunked',
16 silly get     connection: 'keep-alive',
16 silly get     'set-cookie': [ '__cfduid=d35a5857bd154c2bfd5c921b3ce06c2f81559139865; expires=Thu, 28-May-20 14:24:25 GMT; path=/; domain=.registry.npmjs.org; HttpOnly' ],
16 silly get     'content-encoding': 'gzip',
16 silly get     'cf-ray': '4de921c118d76966-CDG',
16 silly get     'expect-ct': 'max-age=604800, report-uri="https://report-uri.cloudflare.com/cdn-cgi/beacon/expect-ct"',
16 silly get     vary: 'Accept-Encoding',
16 silly get     server: 'cloudflare' } ]
17 verbose get saving node-red to /home/root/.npm/registry.npmjs.org/node-red/latest/.cache.json
18 verbose correctMkdir /home/root/.npm correctMkdir not in flight; initializing
19 silly bugs url https://github.com/node-red/node-red/issues
20 verbose stack Error: spawn ENOENT
20 verbose stack     at errnoException (child_process.js:1011:11)
20 verbose stack     at Process.ChildProcess._handle.onexit (child_process.js:802:34)
21 verbose cwd /opt/node-red
22 error Linux 3.12.70
23 error argv "node" "/usr/bin/npm" "bugs" "node-red"
24 error node v0.10.48
25 error npm  v2.15.1
26 error code ENOENT
27 error errno ENOENT
28 error syscall spawn
29 error enoent spawn ENOENT
29 error enoent This is most likely not a problem with npm itself
29 error enoent and is related to npm not being able to find a file.
30 verbose exit [ 1, true ]

I'm using a Multitech Conduit AEP, firmware 1.6.4, node-red v0.15.3

I'll modify my post if I missed anything.

Cheers :slight_smile:

Your multitech device comes with a very old version of nodejs, which will restrict what version of Node-RED you can run and also what contrib nodes will function.

My suggestion would be to look at the multitech support site and upgrade to the latest version of nodejs that they support (and then the latest node-red version that works with the version of nodejs)

After deleting nodes from the command line assuming you have run the command in your .node-red directory you need to restart node-red.

If they are still there after a restart check that you have run the command in the correct directory

They do ship a version 1.7.4 (that comes with Node-RED built in) - but I'm not sure how far that has moved on - due to the very slow processor and limited space. So you may find you are stuck with what you have (or maybe one version more recent). In which case some of the newer nodes may not work with the device. It is after all a comms gateway type device so really you should process the data there and then shift it off as soon as possible - any local logging would need to be minimal to save space.

Thanks guys :slight_smile:

I'll check my node js version and will upgrade it. Then I'll check wether it works.

Hello again !

I upgraded to 1.7.4 firmware version, fix the problem for the moment.

Do you know what's the default directory to install new nodes ?

It seems there are two directories for node : /var/config/app/current/ and /opt/node-red/node_modules.

The first one seems to be the right one...

In fact I can't succeed to install node-red-dashboard from the node-red webui, so I want to do it manually.

edit : according to the settings.js in /opt/node-red/ it seems that the nodes are scanned from the /opt/node-red/nodes so I just have to run npm -i "node" to do it.

edit 2 : node-red-dashboard 2.15.4 is not compatible with Conduit AEP MTCAP-868-001A. "Just" have to find the right version now...

Find the node-red startup log.

It will tell you the correct directory as well as confirming which version of nodejs and node-red you have installed.

Followed your advice. Just in case others wonder where they are :

Start-up log is in /var/volatile/log/app

User Directory is : /var/config/app/install/development

Will try to install dashboard first version (2.0) to see if it works.

edit : node-red-dashboard 2.0.0 works with this model :grinning: