NEWS
UNSOLVED Breaking Change bei MQTT Adapter 2.1+ via Websockets?
-
Re: MQTT >1.5 funktioniert bei mir nicht mehr
Hallo, wäre toll, wenn mir jemand helfen könnte:
Wenn ich iobroker MQTT Adapter v2.1 installiere
bringt meine Javascript Webseite, die sich über den Paho-Client via Websockets im lokalen Netz auf Port 1884 beim iobroker MQTT Server 2.1 anmelden möchte:client = new Paho.MQTT.Client("192.168.178.101", Number(1884), "/ws", "MeineMQTTWebseite");
den MQTT Adapter mit folgender Fehlermeldung zum Absturz:
host.ioBroker-RasPi 2020-04-06 11:08:14.131 info Restart adapter system.adapter.mqtt.0 because enabled host.ioBroker-RasPi 2020-04-06 11:08:14.130 error instance system.adapter.mqtt.0 terminated with code 6 (UNCAUGHT_EXCEPTION) host.ioBroker-RasPi 2020-04-06 11:08:14.130 error Caught by controller[0]: at Connection.Readable.push (/opt/iobroker/node_modules/readable-stream/lib/_stream_readable.js:245:10) host.ioBroker-RasPi 2020-04-06 11:08:14.130 error Caught by controller[0]: at readableAddChunk (/opt/iobroker/node_modules/readable-stream/lib/_stream_readable.js:278:11) host.ioBroker-RasPi 2020-04-06 11:08:14.129 error Caught by controller[0]: at addChunk (/opt/iobroker/node_modules/readable-stream/lib/_stream_readable.js:291:12) host.ioBroker-RasPi 2020-04-06 11:08:14.129 error Caught by controller[0]: at Connection.emit (events.js:198:13) host.ioBroker-RasPi 2020-04-06 11:08:14.129 error Caught by controller[0]: at Object.onceWrapper (events.js:286:20) host.ioBroker-RasPi 2020-04-06 11:08:14.129 error Caught by controller[0]: at Connection.<anonymous> (/opt/iobroker/node_modules/mqtt-connection/connection.js:53:12) host.ioBroker-RasPi 2020-04-06 11:08:14.128 error Caught by controller[0]: at Connection.emit (events.js:198:13) host.ioBroker-RasPi 2020-04-06 11:08:14.128 error Caught by controller[0]: at Connection.emitPacket (/opt/iobroker/node_modules/mqtt-connection/connection.js:10:8) host.ioBroker-RasPi 2020-04-06 11:08:14.128 error Caught by controller[0]: at Connection.emit (events.js:198:13) host.ioBroker-RasPi 2020-04-06 11:08:14.127 error Caught by controller[0]: at Connection.client.on.options (/opt/iobroker/node_modules/iobroker.mqtt/lib/server.js:756:30) host.ioBroker-RasPi 2020-04-06 11:08:14.126 error Caught by controller[0]: TypeError: stream.setTimeout is not a function mqtt.0 2020-04-06 11:08:13.639 info (9969) terminating mqtt.0 2020-04-06 11:08:13.582 warn (9969) Terminated (UNCAUGHT_EXCEPTION): Without reason mqtt.0 2020-04-06 11:08:12.484 error (9969) TypeError: stream.setTimeout is not a function at Connection.client.on.options (/opt/iobroker/node_modules/iobroker.mqtt/lib/server.js:756:30) at Connection.emit (events.js:198:13) mqtt.0 2020-04-06 11:08:12.483 error (9969) uncaught exception: stream.setTimeout is not a function mqtt.0 2020-04-06 11:08:12.287 info (9969) Client [LAB_CountdownHTML] connected with secret 1586164092263_8980 mqtt.0 2020-04-06 11:08:11.883 info (9969) Starting MQTT -WebSocket' server on port 1884 mqtt.0 2020-04-06 11:08:11.882 info (9969) Starting MQTT ' server on port 1883 mqtt.0 2020-04-06 11:08:10.235 info (9969) starting. Version 2.1.1 in /opt/iobroker/node_modules/iobroker.mqtt, node: v10.19.0 host.ioBroker-RasPi 2020-04-06 11:08:07.573 info instance system.adapter.mqtt.0 started with pid 9969
-
Das passiert ERST seit dieser Version (irgendwo ab 2.1?)
-
Mit MQTT Adapter 2.0.4 funktioniert alles einwandfrei. (2.0.5. und 2.0.6 nicht getestet)
-
Verschiedene ESP8266 Mikrocontroller melden sich auf Port 1883 (OHNE Websockets) in allen Versionen an, ohne dass es zu Problemen kommt.
-
Leider kann ich Paho nicht sagen, sich ebenfalls auf 1883 anzumelden und keine Websockets zu verwenden. Vielleicht gehts, aber ich weiß nicht wie.
-
Alles andere ist gleich geblieben. Ich benutze KEIN SSL.
=> Es müsste also daran liegen, dass sich im iobroker-MQTT-Adapter 2.1 irgendwas geändert hat, was den Port 1884 und Websockets angeht.
Frage ist: Was und kann sich das mal jemand angucken? Ich kann sonst ja nicht mehr updaten und muss Iobroker einfrieren.
Systemdata Bitte Ausfüllen Hardwaresystem: Pi3 + x64 Arbeitsspeicher: 1GB Festplattenart: SSD Betriebssystem: Raspbian/Windows (Webseite) Node-Version: v10.19.0 Nodejs-Version: v10.19.0 NPM-Version: 6.13.7 Installationsart: Skript/Manuell Image genutzt: Nein Ort/Name der Imagedatei: Link Re: MQTT >1.5 funktioniert bei mir nicht mehr -
-
Auch mit den neuesten Updates:
socket.io 2.1.2 auf 3.0.6
und nochmals MQTT Broker/Client 2.0.4 auf 2.1.1
kommt es zum sofortigen Absturz, wenn sich meine Webseite über Websockets/Port 1884 beim MQTT Broker anmeldet.
Gleiche Fehlermeldung wie oben.Erst wenn ich MQTT wieder zurück auf 2.0.4 installiere, funktioniert alles wieder. Socket.io Version scheint nicht relevant zu sein.
Weiß vielleicht jemand, wo ich sonst um Hilfe fragen könnte?
Auf Github habe ich schon seit geraumer Zeit ein Issue eröffnet, aber da meldet sich auch niemand.Hier nochmal die Fehlermeldung iobroker Logs mit MQTT Version 2.1.1:
host.ioBroker-RasPi 2020-05-04 10:06:54.647 error instance system.adapter.mqtt.0 terminated with code 6 (UNCAUGHT_EXCEPTION) host.ioBroker-RasPi 2020-05-04 10:06:54.645 error Caught by controller[0]: at Connection.Readable.push (/opt/iobroker/node_modules/readable-stream/lib/_stream_readable.js:245:10) host.ioBroker-RasPi 2020-05-04 10:06:54.644 error Caught by controller[0]: at readableAddChunk (/opt/iobroker/node_modules/readable-stream/lib/_stream_readable.js:278:11) host.ioBroker-RasPi 2020-05-04 10:06:54.644 error Caught by controller[0]: at addChunk (/opt/iobroker/node_modules/readable-stream/lib/_stream_readable.js:291:12) host.ioBroker-RasPi 2020-05-04 10:06:54.644 error Caught by controller[0]: at Connection.emit (events.js:198:13) host.ioBroker-RasPi 2020-05-04 10:06:54.643 error Caught by controller[0]: at Object.onceWrapper (events.js:286:20) host.ioBroker-RasPi 2020-05-04 10:06:54.643 error Caught by controller[0]: at Connection.<anonymous> (/opt/iobroker/node_modules/mqtt-connection/connection.js:53:12) host.ioBroker-RasPi 2020-05-04 10:06:54.642 error Caught by controller[0]: at Connection.emit (events.js:198:13) host.ioBroker-RasPi 2020-05-04 10:06:54.642 error Caught by controller[0]: at Connection.emitPacket (/opt/iobroker/node_modules/mqtt-connection/connection.js:10:8) host.ioBroker-RasPi 2020-05-04 10:06:54.641 error Caught by controller[0]: at Connection.emit (events.js:198:13) host.ioBroker-RasPi 2020-05-04 10:06:54.640 error Caught by controller[0]: at Connection.client.on.options (/opt/iobroker/node_modules/iobroker.mqtt/lib/server.js:756:30) host.ioBroker-RasPi 2020-05-04 10:06:54.638 error Caught by controller[0]: TypeError: stream.setTimeout is not a function mqtt.0 2020-05-04 10:06:53.460 info (6894) terminating mqtt.0 2020-05-04 10:06:53.405 warn (6894) Terminated (UNCAUGHT_EXCEPTION): Without reason mqtt.0 2020-05-04 10:06:52.026 error at Connection.Readable.push (/opt/iobroker/node_modules/readable-stream/lib/_stream_readable.js:245:10) mqtt.0 2020-05-04 10:06:52.026 error at readableAddChunk (/opt/iobroker/node_modules/readable-stream/lib/_stream_readable.js:278:11) mqtt.0 2020-05-04 10:06:52.026 error at addChunk (/opt/iobroker/node_modules/readable-stream/lib/_stream_readable.js:291:12) mqtt.0 2020-05-04 10:06:52.026 error at Connection.emit (events.js:198:13) mqtt.0 2020-05-04 10:06:52.026 error at Object.onceWrapper (events.js:286:20) mqtt.0 2020-05-04 10:06:52.026 error at Connection.<anonymous> (/opt/iobroker/node_modules/mqtt-connection/connection.js:53:12) mqtt.0 2020-05-04 10:06:52.026 error at Connection.emit (events.js:198:13) mqtt.0 2020-05-04 10:06:52.026 error at Connection.emitPacket (/opt/iobroker/node_modules/mqtt-connection/connection.js:10:8) mqtt.0 2020-05-04 10:06:52.026 error at Connection.emit (events.js:198:13) mqtt.0 2020-05-04 10:06:52.026 error at Connection.client.on.options (/opt/iobroker/node_modules/iobroker.mqtt/lib/server.js:756:30) mqtt.0 2020-05-04 10:06:52.026 error (6894) TypeError: stream.setTimeout is not a function mqtt.0 2020-05-04 10:06:52.025 error (6894) uncaught exception: stream.setTimeout is not a function mqtt.0 2020-05-04 10:06:51.784 info (6894) Client [SCHATZ-COUNTDOWN-70185] connected with secret 1588579611759_4423 mqtt.0 2020-05-04 10:06:51.321 info (6894) Starting MQTT -WebSocket' server on port 1884 mqtt.0 2020-05-04 10:06:51.319 info (6894) Starting MQTT ' server on port 1883 mqtt.0 2020-05-04 10:06:49.412 info (6894) starting. Version 2.1.1 in /opt/iobroker/node_modules/iobroker.mqtt, node: v10.19.0
Und hier das gleiche Verhalten mit MQTT Version 2.0.4:
mqtt.0 2020-05-04 10:07:28.228 info (7360) Client [SCHATZ-COUNTDOWN-70185] subscribes on topic "SCHATZ/" mqtt.0 2020-05-04 10:07:28.023 info (7360) Client [SCHATZ-COUNTDOWN-70185] connected with secret 1588579648006_4897 mqtt.0 2020-05-04 10:07:14.470 info (7360) Starting MQTT -WebSocket' server on port 1884 mqtt.0 2020-05-04 10:07:14.467 info (7360) Starting MQTT ' server on port 1883 mqtt.0 2020-05-04 10:07:12.709 info (7360) starting. Version 2.0.4 in /opt/iobroker/node_modules/iobroker.mqtt, node: v10.19.0
Danach keine Fehlermeldung. Es läuft und läuft.