Po aktualizacji wczoraj swojej dockerowej instancji serwera SUPLA mam jakieś problemy z kilkoma modułami.
Nie wiem czemu, ale rozłączają mi się z supla-server i po chwili łączą ponownie.
Podczas aktualizacji w terminalu moduł działał. Działa również w trybie konfiguracyjnym.
Logi z serwera dla dwóch modułów, które się restartują
Kod: Zaznacz cały
INFO[1550015532.305868] Device registered. ID: 1, ClientSD: 54 Protocol Version: 8
INFO[1550015534.915413] Connection accepted: 192.168.100.244:5206 ClientSD: 41 Secure: 1
INFO[1550015538.914351] Connection accepted: 192.168.100.244:5718 ClientSD: 40 Secure: 1
INFO[1550015539.64899] Cipher: AES128-SHA, ClientSD: 40
INFO[1550015541.704557] Device registered. ID: 66, ClientSD: 40 Protocol Version: 8
INFO[1550015547.345804] Connection accepted: 192.168.100.236:1125 ClientSD: 41 Secure: 1
INFO[1550015547.464843] Cipher: AES128-SHA, ClientSD: 41
INFO[1550015548.289486] Device registered. ID: 65, ClientSD: 41 Protocol Version: 7
INFO[1550015561.918332] Connection accepted: 192.168.100.244:37021 ClientSD: 52 Secure: 1
INFO[1550015562.36446] Cipher: AES128-SHA, ClientSD: 52
INFO[1550015565.920565] Connection accepted: 192.168.100.244:40800 ClientSD: 40 Secure: 1
INFO[1550015566.78742] Cipher: AES128-SHA, ClientSD: 40
INFO[1550015566.226366] Device registered. ID: 66, ClientSD: 40 Protocol Version: 8
INFO[1550015567.517575] Connection accepted: 192.168.100.236:15123 ClientSD: 41 Secure: 1
INFO[1550015567.674336] Cipher: AES128-SHA, ClientSD: 41
Kod: Zaznacz cały
connected with stefan, channel 7
dhcp client start...
ip:192.168.100.244,mask:255.255.255.0,gw:192.168.100.1
WiFi Status: 5
IP Received
client handshake start.
client handshake ok!
devconn_connect_cb
Server connected
Registered and ready.
Free heap size: 22704
pm open,type:2 0
Activity timeout 1483706617, 1463298347, 20, 20
Disconnected
devconn_disconnect_cb
WiFi Status: 5
IP Received
Disconnected
client handshake start.
state: 5 -> 0 (0)
rm 0
pm close 7
scandone
WiFi Status: 1
scandone
state: 0 -> 2 (b0)
state: 2 -> 3 (0)
state: 3 -> 5 (10)
add 0
aid 5
cnt
connected with stefan, channel 7
dhcp client start...
ip:192.168.100.244,mask:255.255.255.0,gw:192.168.100.1
WiFi Status: 5
IP Received
client handshake start.
client handshake ok!
devconn_connect_cb
Server connected
Registered and ready.
Free heap size: 22704
pm open,type:2 0
Activity timeout 1508709559, 1488023282, 20, 20
Disconnected
devconn_disconnect_cb
WiFi Status: 5
IP Received
Disconnected
client handshake start.
state: 5 -> 0 (0)
rm 0
pm close 7
scandone
WiFi Status: 1
scandone
state: 0 -> 2 (b0)
state: 2 -> 3 (0)
state: 3 -> 5 (10)
add 0
aid 5
cnt
Kod: Zaznacz cały
void DEVCONN_ICACHE_FLASH
supla_esp_devconn_timer1_cb(void *timer_arg) {
supla_esp_wifi_check_status();
unsigned int t1;
unsigned int t2;
unsigned int t3;
//supla_log(LOG_DEBUG, "Free heap size: %i", system_get_free_heap_size());
if ( supla_esp_devconn_is_registered() == 1
&& devconn->server_activity_timeout > 0
&& devconn->srpc != NULL ) {
t1 = system_get_time();
t2 = abs((t1-devconn->last_sent)/1000000);
t3 = abs((t1-devconn->last_response)/1000000);
if ( t3 >= (devconn->server_activity_timeout+10) ) {
supla_log(LOG_DEBUG, "Activity timeout %i, %i, %i, %i", t1, devconn->last_response, (t1-devconn->last_response)/1000000, devconn->server_activity_timeout+10);
supla_esp_devconn_reconnect();
} else if ( ( t2 >= (devconn->server_activity_timeout-5)
&& t2 <= devconn->server_activity_timeout )
|| ( t3 >= (devconn->server_activity_timeout-5)
&& t3 <= devconn->server_activity_timeout ) ) {
//supla_log(LOG_DEBUG, "PING %i,%i", t1 / 1000000, t1 % 1000000);
//system_print_meminfo();
srpc_dcs_async_ping_server(devconn->srpc);
}
}
}
devconn->server_activity_timeout+10 = 20
i supla_esp_devconn_reconnect();
Moduł nie wysyła pinga czy serwer nie odpowiada czy co?
Nowo zarejestrowane moduły też się tak zachowują. Gdzie jest pies pogrzebany?
Edit:
Problem zidentyfikowany, poprawki naniesione. Wszystko śmiga jak należy.