intel-iot-devkit / intel-iot-gateway

These recipes provide an introduction to developing Node-Red flows using sensors with an Intel IoT Gateway.
MIT License
65 stars 41 forks source link

[red] Uncaught Exception #6

Open ElizBth opened 7 years ago

ElizBth commented 7 years ago

Hello,

Recently I had added node-red-contrib-azure-iot-hub node for connect my system with azure platform and send it my devices messages to the hub.

I had done tests with the platform and I could connected successfully but I found a problem if I want to work with the platform when I don't have internet connection.

When I work without internet I got differents errors from the azure-iot-hub and node-red is restarted.

Then I would like to know if there is a way for catch those errors and avoid the node-red exit, because my platform must work with internet or without internet.


[info] [azureiothub:Azure IoT Hub] Disconnecting from Azure IoT Hub Feb 7 14:58:33 beaglebone NodeRedService[826]: 7 Feb 14:58:33 - [red] Uncaught Exception: Feb 7 14:58:33 beaglebone NodeRedService[826]: 7 Feb 14:58:33 - TypeError: Object close has no method 'log' Feb 7 14:58:33 beaglebone NodeRedService[826]: at printResult (/usr/local/lib/node_modules/node-red-contrib-azure-iot-hub/azureiothub.js:216:27) Feb 7 14:58:34 beaglebone NodeRedService[826]: at safeCallback (/usr/local/lib/node_modules/node-red-contrib-azure-iot-hub/node_modules/azure-iot-device/lib/client.js:21:17) Feb 7 14:58:34 beaglebone NodeRedService[826]: at _fsm.machina.Fsm.states.disconnected.close (/usr/local/lib/node_modules/node-red-contrib-azure-iot-hub/nodemodules/azure-iot-device/lib/client.js:124:11) Feb 7 14:58:34 beaglebone NodeRedService[826]: at .extend.handle (/usr/local/lib/node_modules/node-red-contrib-azure-iot-hub/node_modules/machina/lib/machina.js:613:25) Feb 7 14:58:34 beaglebone NodeRedService[826]: at Fsm.(anonymous function) [as handle] (/usr/local/lib/node_modules/node-red-contrib-azure-iot-hub/node_modules/machina/lib/machina.js:466:63) Feb 7 14:58:34 beaglebone NodeRedService[826]: at Client.close (/usr/local/lib/node_modules/node-red-contrib-azure-iot-hub/node_modules/azure-iot-device/lib/client.js:603:13) Feb 7 14:58:34 beaglebone NodeRedService[826]: at disconnectFromIoTHub (/usr/local/lib/node_modules/node-red-contrib-azure-iot-hub/azureiothub.js:112:20) Feb 7 14:58:34 beaglebone NodeRedService[826]: at null. (/usr/local/lib/node_modules/node-red-contrib-azure-iot-hub/azureiothub.js:102:21) Feb 7 14:58:34 beaglebone NodeRedService[826]: at emit (events.js:95:17) Feb 7 14:58:34 beaglebone NodeRedService[826]: at Amqp._disconnectHandler (/usr/local/lib/node_modules/node-red-contrib-azure-iot-hub/node_modules/azure-iot-device/lib/client.js:321:16) Feb 7 14:58:34 beaglebone NodeRedService[826]: at Amqp.emit (events.js:95:17) Feb 7 14:58:34 beaglebone NodeRedService[826]: at Amqp. (/usr/local/lib/node_modules/node-red-contrib-azure-iot-hub/node_modules/azure-iot-device-amqp/lib/amqp.js:36:10) Feb 7 14:58:34 beaglebone NodeRedService[826]: at Amqp. (/usr/local/lib/node_modules/node-red-contrib-azure-iot-hub/node_modules/azure-iot-amqp-base/lib/amqp.js:133:5) Feb 7 14:58:34 beaglebone NodeRedService[826]: at AMQPClient.emit (events.js:92:17) Feb 7 14:58:34 beaglebone NodeRedService[826]: at Connection. (/usr/local/lib/node_modules/node-red-contrib-azure-iot-hub/node_modules/amqp10/lib/amqp_client.js:179:12) Feb 7 14:58:34 beaglebone NodeRedService[826]: at Connection.emit (events.js:117:20) Feb 7 14:58:34 beaglebone NodeRedService[826]: at Connection._terminate (/usr/local/lib/node_modules/node-red-contrib-azure-iot-hub/node_modules/amqp10/lib/connection.js:550:8) Feb 7 14:58:34 beaglebone NodeRedService[826]: at Connection._processError (/usr/local/lib/node_modules/node-red-contrib-azure-iot-hub/node_modules/amqp10/lib/connection.js:351:8) Feb 7 14:58:34 beaglebone NodeRedService[826]: at Object.Connection.errorHandler (/usr/local/lib/node_modules/node-red-contrib-azure-iot-hub/node_modules/amqp10/lib/connection.js:282:43) Feb 7 14:58:34 beaglebone NodeRedService[826]: at Object.event (/usr/local/lib/node_modules/node-red-contrib-azure-iot-hub/node_modules/stately.js/Stately.js:203:67) Feb 7 14:58:34 beaglebone NodeRedService[826]: at Object.event (/usr/local/lib/node_modules/node-red-contrib-azure-iot-hub/node_modules/stately.js/Stately.js:190:52) Feb 7 14:58:34 beaglebone NodeRedService[826]: at Object.event (/usr/local/lib/node_modules/node-red-contrib-azure-iot-hub/node_modules/stately.js/Stately.js:190:52) Feb 7 14:58:34 beaglebone NodeRedService[826]: at Object.event (/usr/local/lib/node_modules/node-red-contrib-azure-iot-hub/node_modules/stately.js/Stately.js:190:52) Feb 7 14:58:34 beaglebone NodeRedService[826]: at null. (/usr/local/lib/node_modules/node-red-contrib-azure-iot-hub/node_modules/amqp10/lib/connection.js:516:46) Feb 7 14:58:34 beaglebone NodeRedService[826]: at emit (events.js:95:17) Feb 7 14:58:34 beaglebone NodeRedService[826]: at CleartextStream. (/usr/local/lib/node_modules/node-red-contrib-azure-iot-hub/node_modules/amqp10/lib/transport/tls_transport.js:30:49) Feb 7 14:58:34 beaglebone NodeRedService[826]: at CleartextStream.emit (events.js:95:17) Feb 7 14:58:34 beaglebone NodeRedService[826]: at Socket.onerror (tls.js:1456:17) Feb 7 14:58:34 beaglebone systemd[1]: node_red_service.service: main process exited, code=exited, status=1


[red] Uncaught Exception: Feb 7 15:28:49 beaglebone NodeRedService[13466]: 7 Feb 15:28:49 - TypeError: Cannot call method 'destroy' of null Feb 7 15:28:49 beaglebone NodeRedService[13466]: at Connection._terminate (/usr/local/lib/node_modules/node-red-contrib-azure-iot-hub/node_modules/amqp10/lib/connection.js:539:23) Feb 7 15:28:49 beaglebone NodeRedService[13466]: at Connection._processError (/usr/local/lib/node_modules/node-red-contrib-azure-iot-hub/node_modules/amqp10/lib/connection.js:351:8) . . .

Feb 7 15:28:49 beaglebone NodeRedService[13466]: at CleartextStream. (/usr/local/lib/node_modules/node-red-contrib-azure-iot-hub/node_modules/amqp10/lib/transport/tls_transport.js:30:49) Feb 7 15:28:49 beaglebone NodeRedService[13466]: at CleartextStream.emit (events.js:95:17) Feb 7 15:28:49 beaglebone NodeRedService[13466]: at Socket.onerror (tls.js:1456:17) Feb 7 15:28:49 beaglebone NodeRedService[13466]: at Socket.emit (events.js:117:20) Feb 7 15:28:49 beaglebone NodeRedService[13466]: at net.js:834:16 Feb 7 15:28:49 beaglebone NodeRedService[13466]: at process._tickCallback (node.js:419:13)


w4ilun commented 7 years ago

What hardware platform and OS version is being used?

ElizBth commented 7 years ago

I am using node-red on a beaglebone black with linux a Debian Wheezy distribution Node-RED version: v0.14.6 Node.js version: v0.10.42 Linux 3.8.13-bone80 arm LE