Failed to run Node-Red App on 5.0.1-AEP
Home › Forums › Conduit: AEP Model › Failed to run Node-Red App on 5.0.1-AEP
Tagged: node-red DeviceHQ
- This topic has 1 reply, 1 voice, and was last updated 5 years, 4 months ago by
o.romain@bouygues-es.com.
-
AuthorPosts
-
January 4, 2020 at 6:44 am #30155
o.romain@bouygues-es.com
ParticipantHi Guys,
I have developped a node-red application on a MTCDT-LEU1-246A running firmware 1.7.2.
The application proved to be running fine, so I uploaded it to DeviceHQ.
Then I uploaded it to a new MTCDT-L4E1-246A we just procured.
The application did install automatically as expected, and is supposed to be running, as per Multitch GUI.
We can see it running here – app ID is ‘5e0f1b8a334d7746d9ee687c’:
—————-
root@mtcdt:/var/config/home/admin# ps -ef | grep node
root 4528 1 0 01:29 ? 00:00:00 /sbin/node-angel /bin/bash -c exec /usr/bin/node –max-old-space-size=40 /opt/node-red/red.js –settings /var/config/app/install/5e0f1b8a334d7746d9ee687c/settings.js –userDir /var/config/app/install/5e0f1b8a334d7746d9ee687c /var/config/app/install/5e0f1b8a334d7746d9ee687c/flows.json
root 4533 4528 16 01:29 ? 00:01:41 node-red
nobody 4896 1 7 01:30 ? 00:00:43 stunnel /etc/node-red-stunnel.conf
root 9286 5285 0 01:39 pts/0 00:00:00 grep node——————————
However, when running the node-red GUI, if I click on a inject-node, I get an error message like ‘not not deployed’.Using the ‘Deploy’ button has no effect, I get a sucessfull message, but that doens’t help.
I assume the application is not running at all, and does nothing.
What did I do wrong?
On top of that, log fil ‘/var/log/app/node-red.log’ is disabled in firmware 5.0.1, so I am totally blind! Is there a way to reactivate it?
Thanks in advance for your help,
Olivier
January 5, 2020 at 4:39 am #30159o.romain@bouygues-es.com
ParticipantWell,
I was able to get a log by tweaking file ‘/sbin/app.py’. Then a got a log in file /var/log/app/node-red.log:
Welcome to Node-RED
===================4 Jan 16:36:37 – [info] Node-RED version: v0.15.3
4 Jan 16:36:37 – [info] Node.js version: v0.10.48
4 Jan 16:36:37 – [info] Linux 4.9.87 arm LE
4 Jan 16:36:52 – [info] Loading palette nodes
4 Jan 16:38:34 – [warn] ——————————————————
4 Jan 16:38:35 – [warn] [ftp] Error: ftp already registered
4 Jan 16:38:35 – [warn] ——————————————————
4 Jan 16:38:35 – [info] Settings file : /var/config/app/install/5e10721cd76dad5200c11132/settings.js
4 Jan 16:38:35 – [info] User directory : /var/config/app/install/5e10721cd76dad5200c11132
4 Jan 16:38:35 – [info] Flows file : /var/config/app/install/5e10721cd76dad5200c11132/flows.json
4 Jan 16:38:35 – [info] Server now running at http://127.0.0.1:1881/
4 Jan 16:38:36 – [info] Waiting for missing types to be registered:
4 Jan 16:38:36 – [info] – ftp
4 Jan 16:38:36 – [info] – ftp inIt seems node-red was not starting up because some conflict between to manually installed nodes.
Looking in the app file .config.json, we have:
“node-red-contrib-ftp”: {
“name”: “node-red-contrib-ftp”,
“version”: “0.0.5”,
“local”: true,
“nodes”: {
“ftp”: {
“name”: “ftp”,
“types”: [
“ftp”,
“ftp in”
],
“enabled”: true,
“local”: true,
“module”: “node-red-contrib-ftp”,
“file”: “/var/config/app/install/development/node_modules/node-red-contrib-ftp/ftp.js”
}
}
},
“node-red-contrib-ftp-env”: {
“name”: “node-red-contrib-ftp-env”,
“version”: “1.5.0”,
“local”: true,
“nodes”: {
“ftp”: {
“name”: “ftp”,
“types”: [
“ftp”,
“ftp in”
],
“enabled”: true,
“local”: true,
“module”: “node-red-contrib-ftp-env”,
“file”: “/var/config/app/install/development/node_modules/node-red-contrib-ftp-env/ftp.js”
}
}
}Those 2 nodes have the same name, which is weird … anyway, the second one was not used in my application, so I removed it from the .config.json file, and removed the related files from directory ‘node_modules’.
When restarting node-red (/etc/init.d/nod-red stop+start), it started properly this time:
Welcome to Node-RED
===================4 Jan 18:02:56 – [info] Node-RED version: v0.15.3
4 Jan 18:02:56 – [info] Node.js version: v0.10.48
4 Jan 18:02:56 – [info] Linux 3.12.70 arm LE
4 Jan 18:03:10 – [info] Loading palette nodes
4 Jan 18:04:31 – [info] Settings file : /var/config/app/install/development/settings.js
4 Jan 18:04:31 – [info] User directory : /var/config/app/install/development
4 Jan 18:04:31 – [info] Flows file : /var/config/app/install/development/flows.json
4 Jan 18:04:32 – [info] Server now running at http://127.0.0.1:1881/
4 Jan 18:04:33 – [info] Starting flows
4 Jan 18:04:38 – [info] [lora in:57531597.fb3244] lora in node created
4 Jan 18:04:49 – [info] Started flows
4 Jan 18:04:50 – [info] [lora in:57531597.fb3244] Connected to MQTT for LoRa in node.Conclusion: we need to have a node-red log to troubleshoot out this kind of trick. Otherwise it is just impossible to know what is wrong …
Olivier
-
AuthorPosts
- You must be logged in to reply to this topic.