Informatic0re
11/15/2023, 3:35 PMkasperl
11/15/2023, 3:40 PMfloitsch
11/15/2023, 3:41 PMfloitsch
11/15/2023, 3:41 PMfloitsch
11/15/2023, 3:42 PMInformatic0re
11/15/2023, 3:45 PMInformatic0re
11/15/2023, 3:45 PMInformatic0re
11/15/2023, 3:46 PMInformatic0re
11/15/2023, 3:47 PMclient = mqtt.Client
--host=host
--routes=routes
when I am creating the client. So there must be a difference if the server device is available or not somehow in the codeInformatic0re
11/15/2023, 3:48 PMInformatic0re
11/15/2023, 3:49 PMInformatic0re
11/15/2023, 3:52 PM******************************************************************************
Decoding by `jag`, device has version <2.0.0-alpha.120>
******************************************************************************
EXCEPTION error.
Connection refused
0: TcpSocket.connect <sdk>\net\modules\tcp.toit:151:40
1: TcpSocket.connect <sdk>\net\modules\tcp.toit:141:12
2: Client.tcp-connect <sdk>\net\net.toit:110:12
3: Client.tcp-connect <sdk>\net\net.toit:101:12
4: ReconnectingTransport_.new-connection_ <pkg:mqtt>\tcp.toit:132:21
5: ReconnectingTransport_.reconnect.<block> <pkg:mqtt>\tcp.toit:120:22
6: Mutex.do.<monitor-block> <sdk>\monitor.toit:28:27
7: __Monitor__.locked_.<block> <sdk>\core\monitor_impl_.toit:123:12
8: __Monitor__.locked_ <sdk>\core\monitor_impl_.toit:95:3
9: Mutex.do <sdk>\monitor.toit:28:3
10: ReconnectingTransport_.reconnect <pkg:mqtt>\tcp.toit:112:25
11: ReconnectingTransport_ <pkg:mqtt>\tcp.toit:94:5
12: TcpTransport <pkg:mqtt>\tcp.toit:33:12
13: Client <pkg:mqtt>\client.toit:54:18
14: main C:\Users\Mirko\AppData\Local\Temp\artemis-464b3efa-86cf-43f1-a66e-8b58389ac9e3\clone\src\services\mqtt\mqtt.toit:71:12******************************************************************************
for many many times and suddenly the crashes stopped being printed. But I see that the ble watchdog is still running, which tells me that the ble container is still running so the task which is keeping the advertisement died or got stuck or something.floitsch
11/15/2023, 4:00 PMmqtt.Client --...
can't connect it immediately throws an exception like the one you show.floitsch
11/15/2023, 4:00 PMfloitsch
11/15/2023, 4:01 PMfloitsch
11/15/2023, 4:01 PMcatch
around that part of the code. -> The program crashes.
However, you marked the container as critical (or something similar), and the program is started immediately again and it tries to start the MQTT again.floitsch
11/15/2023, 4:03 PMmqtt.Client
and retry again after an appropriate timeout.
- we change the mqtt library to go through the "normal" reconnection strategy even for the first connection.
I think I changed it away from that, because users didn't get a nice "wrong credentials, ..." when they tried to start the client. Instead the program seemed to hang.Informatic0re
11/15/2023, 4:03 PMInformatic0re
11/15/2023, 4:04 PMInformatic0re
11/15/2023, 4:08 PMInformatic0re
11/15/2023, 4:10 PM"mqtt": {
... github bla bla
"background": true,
"interval": "1s"
}
kasperl
11/15/2023, 4:12 PMInformatic0re
11/15/2023, 4:13 PMkasperl
11/15/2023, 4:13 PM"containers": {
"measure": {
"entrypoint": "measure.toit",
"triggers": [ { "interval": "20s" } ]
}
}
kasperl
11/15/2023, 4:13 PMInformatic0re
11/15/2023, 4:14 PMkasperl
11/15/2023, 4:14 PMInformatic0re
11/15/2023, 4:14 PMfloitsch
11/15/2023, 4:16 PMInformatic0re
11/15/2023, 4:17 PMInformatic0re
11/15/2023, 4:17 PMInformatic0re
11/15/2023, 4:18 PMfloitsch
11/15/2023, 4:39 PMkasperl
11/16/2023, 8:06 AMfloitsch
11/16/2023, 10:25 AM