MQTT节点导致Node-RED失去与服务器的连接

时间:2019-04-11 04:15:47

标签: mqtt node-red openhab

节点RED 0.20在添加MQTT节点后立即停止并重新启动。我已经在输出节点中尝试了MQTT-结果是相同的。

这是运行OpenHabianPi 2.4.0.1的RaspberryPi。 MQTT服务器在同一台计算机上。使用MQTT服务器的其他设备可以正常工作,我可以与其他客户端发送,接收和查看MQTT消息。我在同一流上也有一个OpenHAB2节点。

这是Node RED控制台的(相关)输出:

11 Apr 13:58:48 - [info] Started flows
11 Apr 13:58:48 - [info] Server now running at http://127.0.0.1:1880/
11 Apr 13:58:48 - [info] [mqtt-broker:LocalMqtt] Connected to broker: mqtt://localhost:1883
11 Apr 13:58:53 - [red] Uncaught Exception:
11 Apr 13:58:53 - TypeError: Converting circular structure to JSON
    at JSON.stringify (<anonymous>)
nodered.service: Main process exited, code=exited, status=1/FAILURE
nodered.service: Unit entered failed state.
nodered.service: Failed with result 'exit-code'.
nodered.service: Service hold-off time over, scheduling restart.
Stopped Node-RED graphical event wiring tool.
Started Node-RED graphical event wiring tool.
11 Apr 13:58:55 - [info]
Welcome to Node-RED
===================
11 Apr 13:58:55 - [info] Node-RED version: v0.20.0
11 Apr 13:58:55 - [info] Node.js  version: v10.15.3
11 Apr 13:58:55 - [info] Linux 4.14.98-v7+ arm LE
11 Apr 13:58:56 - [info] Loading palette nodes
11 Apr 13:59:07 - [info] Settings file  : /home/openhabian/.node-red/settings.js
11 Apr 13:59:07 - [info] Context store  : 'default' [module=memory]
11 Apr 13:59:07 - [info] User directory : /home/openhabian/.node-red
11 Apr 13:59:07 - [warn] Projects disabled : editorTheme.projects.enabled=false
11 Apr 13:59:07 - [info] Flows file     : /home/openhabian/.node-red/flows_elvie.json
11 Apr 13:59:07 - [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.
---------------------------------------------------------------------
11 Apr 13:59:07 - [info] Starting flows

部署后,节点RED进入断开和重新连接的恒定循环。我只能通过删除MQTT节点并重新部署来解决此问题。

我以前在同一流程中一起使用过MQTT和OpenHAB2节点,而没有出现此问题。我不知道发生了什么变化,但是它可能是Node RED 0.20的新版本,因为这是最近的变化。

感谢任何可以提供帮助的人。


其他信息:

经过一番尝试和错误之后,当同时连接MQTT和OpenHab2时,我可以将问题简化为现有问题。

MQTT + OpenHab2 = lost connection

阅读上面粘贴的输出,我想知道在这些节点之一中使用空白用户名或密码是否存在问题。我会尝试更多...

0 个答案:

没有答案