Page 1 of 1

MQTT App Socket Connection closed

Posted: 05 Jan 2022 16:42
by ridewithstyle
Hi there,

since the update to 3.2.2. I have issues with the MQTT App (the legacy one, not the new one). I have the same setup since a couple of years, but now the app seems to crash. I did update mosquitto to 2.0.12, it runs on the Razberry, so no network issue here.

Code: Select all

[MQTT-10] Trying to reconnect (2998)
[2022-01-05 14:24:29.774] [E] [core] Callback execution error: TypeError: undefined is not a function
    at MQTTClient._startSession (automation/userModules/MQTT/lib/mqtt.js:452:28)
    at MQTTClient.connect (automation/userModules/MQTT/lib/mqtt.js:177:10)
    at Function.<anonymous> (automation/userModules/MQTT/index.js:191:15)
[2022-01-05 14:24:32.560] [D] [zway] Job 0x13: deleted from queue
[2022-01-05 14:24:34.473] [D] [zway] Job 0x3b: deleted from queue
[2022-01-05 14:24:35.325] [I] [core] [MQTT-26] Trying to reconnect (2998)
[2022-01-05 14:24:35.842] [E] [core] Callback execution error: TypeError: undefined is not a function
    at MQTTClient._startSession (automation/userModules/MQTT/lib/mqtt.js:452:28)
    at MQTTClient.connect (automation/userModules/MQTT/lib/mqtt.js:177:10)
    at Function.<anonymous> (automation/userModules/MQTT/index.js:191:15)
[2022-01-05 14:24:41.334] [I] [core] [MQTT-28] Trying to reconnect (2998)
[2022-01-05 14:24:41.920] [E] [core] Callback execution error: TypeError: undefined is not a function
    at MQTTClient._startSession (automation/userModules/MQTT/lib/mqtt.js:452:28)
    at MQTTClient.connect (automation/userModules/MQTT/lib/mqtt.js:177:10)
    at Function.<anonymous> (automation/userModules/MQTT/index.js:191:15)
[2022-01-05 14:24:43.729] [I] [zway] Adding job: Get background noise level
[2022-01-05 14:24:43.737] [D] [zway] SENDING: ( 01 03 00 3B C7 )
[2022-01-05 14:24:43.738] [D] [zway] RECEIVED ACK
[2022-01-05 14:24:43.740] [D] [zway] RECEIVED: ( 01 05 01 3B A8 A8 C0 )
[2022-01-05 14:24:43.740] [D] [zway] SENT ACK
[2022-01-05 14:24:43.740] [D] [zway] SETDATA controller.data.statistics.backgroundRSSI.channel1 = 168 (0x000000a8)
[2022-01-05 14:24:43.740] [D] [zway] SETDATA controller.data.statistics.backgroundRSSI.channel2 = 168 (0x000000a8)
[2022-01-05 14:24:43.740] [D] [zway] SETDATA controller.data.statistics.backgroundRSSI.channel3 = 127 (0x0000007f)
[2022-01-05 14:24:43.740] [I] [zway] Job 0x3b (Get background noise level): RSSI Ch#1: -88 dBm, Ch#2: -88 dBm, Ch#3: not available
[2022-01-05 14:24:43.740] [D] [zway] Job 0x3b (Get background noise level): success
[2022-01-05 14:24:43.740] [I] [zway] Removing job: Get background noise level
[2022-01-05 14:24:47.303] [I] [core] [MQTT-25] Trying to reconnect (2998)
[2022-01-05 14:24:47.998] [E] [core] Callback execution error: TypeError: undefined is not a function
    at MQTTClient._startSession (automation/userModules/MQTT/lib/mqtt.js:452:28)
    at MQTTClient.connect (automation/userModules/MQTT/lib/mqtt.js:177:10)
    at Function.<anonymous> (automation/userModules/MQTT/index.js:191:15)
[2022-01-05 14:25:04.468] [D] [zway] Job 0x3b: deleted from queue
Triggering the device in ZWay does not result in an update to mosquitto anymore. Once I stop the app and restart it, everything works fine again

Code: Select all

[2022-01-05 14:27:22.853] [I] [core] --- Stopping module MQTT
[2022-01-05 14:27:24.125] [I] [core] --- Stopping module MQTT
[2022-01-05 14:27:25.398] [I] [core] --- Stopping module MQTT
[2022-01-05 14:27:34.920] [D] [zway] Job 0x3b: deleted from queue
[2022-01-05 14:27:40.092] [I] [core] Instantiating module 25 from class MQTT
[2022-01-05 14:27:40.095] [I] [core] --- Starting module MQTT
[2022-01-05 14:27:40.257] [I] [core] Executing script: /*** Buffer ******************************************************************* ...
[2022-01-05 14:27:40.268] [I] [core] Executing script: /*** MQTTClient ************************************************************** ...
[2022-01-05 14:27:42.711] [I] [core] [MQTT-25] Socket connection opened.
[2022-01-05 14:27:42.712] [I] [core] [MQTT-25] Connected to razberry as ZWayMQTTSupramatic
[2022-01-05 14:27:43.830] [I] [zway] Adding job: Get background noise level
[2022-01-05 14:27:43.835] [D] [zway] SENDING: ( 01 03 00 3B C7 )
does anybody else experience the same issue?

Cheers,
rws

Re: MQTT App Socket Connection closed

Posted: 05 Jan 2022 19:49
by PoltoS
I suppose you have a problem.with libssl or sockets.

Please run Z-Way manually from a terminal and post errors of modules load.

Re: MQTT App Socket Connection closed

Posted: 17 Jan 2022 12:54
by ridewithstyle
PoltoS wrote:
05 Jan 2022 19:49
I suppose you have a problem.with libssl or sockets.

Please run Z-Way manually from a terminal and post errors of modules load.
Just like it is being started in /etc/init.d/z-way-server?

[edit]I just saw that there's an update to the websocket lib of MQTT, updated that and will keep checking if the error persists

Re: MQTT App Socket Connection closed

Posted: 25 Jan 2022 12:43
by ridewithstyle
Update: Error persists, so I am still affected

@PoltoS manually from a terminal as in

Code: Select all

start-stop-daemon --start  --pidfile /var/run/z-way-server.pid --make-pidfile  --background --no-close --chdir /opt/z-way-server --exec z-way-server 
Or do you have something other in mind?

thx,
rws

Re: MQTT App Socket Connection closed

Posted: 27 Jan 2022 00:46
by PoltoS

Code: Select all

cd /opt/z-way-server
sudo ./z-way-server

Re: MQTT App Socket Connection closed

Posted: 31 Mar 2022 21:26
by ridewithstyle
Hi Poltos,

sorry for the delay.

Code: Select all

pi@razberry:/opt/z-way-server $ sudo ./z-way-server
Z-Way version v3.2.2 from 2021-11-29 15:40:21 +0300 (build 101045968be0f00797fdc4d1a70e2955271fe4e7)
Looking for modules in ./modules
Module modzwave.so loaded
Module modskininstaller.so loaded
Module moddhs.so loaded
Module modnotification2ext.so loaded
Module modzbw.so loaded
Module modmqtt.so loaded
Module modinstaller.so loaded
Module modenocean.so loaded
Module modhttp.so loaded
Module modhomekit.so loaded
Module modws.so loaded
Module modsockets.so loaded
Module modcrypto.so loaded
Module modiconinstaller.so loaded
Using default configuration file config.xml
Error: 'debug-port' number is out of range. Skipping it.
rws

Re: MQTT App Socket Connection closed

Posted: 03 Apr 2022 00:50
by PoltoS
Not enough data... Maybe provide us remote access and a way to reproduce the issue and we look

Re: MQTT App Socket Connection closed

Posted: 06 Apr 2022 17:13
by ridewithstyle
remote access is enabled, I dm'd you the ID. My ssh log currently shows the issue