Je rencontre un problème depuis hier : mon gladys plus n’interagit plus avec mes appareils et n’est plus « à jour ».
Tous mes graphiques sont arrêtés au 2 juin (alors que tout fonctionnait jusqu’à il y a 2 jours environ).
Lorsque j’accède à mon instance locale tout est à jour, aucun problème… Que se passe-t-il ?
Un indice par chez toi @pierre-gilles ?
Bon, je rencontre un souci : le problème se répète.
Pourtant chez moi : aucun problème réseau, je n’ai pas de pb d’alim puisque tout est sur un onduleur.
Etant donné que je n’arrive pas à savoir quand la deconnexion se produit je suis un peu perdu niveau logs.
Ce que je remarque ce matin c’est que mes logs Gladys sont totalement pollués par des erreurs Telegram :
2024-06-28T09:05:27+0200 <warn> message.connect.js:19 (TelegramBot.<anonymous>) Telegram polling error, code = ETELEGRAM, message = ETELEGRAM: 409 Conflict: terminated by other getUpdates request; make sure that only one bot instance is running
Il y en a des centaines dans les quelques logs que je ressort.
Par ailleurs, je demande à ChatGPT ce qu’il en pense, il me propose de tester une commande :
Ca c’est pas grave, je m’en accomoderai. Par contre ce que je trouve étrange, c’est que je ne retrouve pas de flux node-red qui utilise la même API que celle configurée dans Gladys …!
Et j’avais bien un flux node-red qui utilisait le même Telegram que Gladys. J’ai désactivé ce flux node-red, et gladys fonctionne nettement mieux depuis.
Mais pas encore parfait, j’ai eu un autre blocage depuis mais que je n’ai pas pu analyser sur le moment… Alors je suis en ‹ observation ›, avec une scène Gladys qui se déclenche toutes les heures et m’écrit un ‹ keep alive › dans Telegram, histoire de repérer efficacement le prochain plantage
Mais bon, gros manque de temps en ce moment pour me poser et analyser sérieusement tout ça…
Il y a peut-être une petite confusion, le « 33ms ping » veut juste dire que ton frontend est connecté au backend Gladys (en pur local), ça ne veut pas dire que Gladys est connectée à internet.
Aucun souci particulier hier sur l’infrastructure. Je n’ai pas de détail par instance en revanche.
Tu as regardé les logs voir si quelque chose n’allait pas ? L’activité sur ta machine ?
2024-07-02T04:00:00+0200 <info> device.purgeStates.js:29 (DeviceManager.purgeStates) Purging device feature states of the last 90 days. States older than Wed Apr 03 2024 04:00:00 GMT+0200 (Central European Summer Time) will be purged.
2024-07-02T04:00:06+0200 <warn> device.calculateAggregate.js:95 (Socket.<anonymous>) device.calculateAggregate stderr: Error
at Database.<anonymous> (/src/server/node_modules/sequelize/lib/dialects/sqlite/query.js:179:27)
at /src/server/node_modules/sequelize/lib/dialects/sqlite/query.js:177:50
at new Promise (<anonymous>)
at Query.run (/src/server/node_modules/sequelize/lib/dialects/sqlite/query.js:177:12)
at /src/server/node_modules/sequelize/lib/sequelize.js:314:28
at async SQLiteQueryInterface.bulkUpdate (/src/server/node_modules/sequelize/lib/dialects/abstract/query-interface.js:366:12)
at async t_device_feature.update (/src/server/node_modules/sequelize/lib/model.js:1958:28)
at async /src/server/lib/device/device.calculcateAggregateChildProcess.js:153:5 {
name: 'SequelizeTimeoutError',
parent: [Error: SQLITE_BUSY: database is locked] {
errno: 5,
code: 'SQLITE_BUSY',
sql: 'UPDATE `t_device_feature` SET `last_hourly_aggregate`=$1,`updated_at`=$2 WHERE `id` = $3'
},
original: [Error: SQLITE_BUSY: database is locked] {
errno: 5,
code: 'SQLITE_BUSY',
sql: 'UPDATE `t_device_feature` SET `last_hourly_aggregate`=$1,`updated_at`=$2 WHERE `id` = $3'
},
sql: 'UPDATE `t_device_feature` SET `last_hourly_aggregate`=$1,`updated_at`=$2 WHERE `id` = $3',
parameters: {}
}
all values are hidden
2024-07-02T04:00:06+0200 <warn> device.calculateAggregate.js:101 (ChildProcess.<anonymous>) device.calculateAggregate: Exiting child process with code 1
2024-07-02T04:00:19+0200 <info> device.purgeAggregateStates.js:31 (DeviceManager.purgeAggregateStates) Purging device feature states of the last 365 days. States older than Mon Jul 03 2023 04:00:19 GMT+0200 (Central European Summer Time) will be purged.
2024-07-02T04:00:19+0200 <error> device.onHourlyDeviceAggregateEvent.js:22 (DeviceManager.onHourlyDeviceAggregateEvent) Error: Error
at Database.<anonymous> (/src/server/node_modules/sequelize/lib/dialects/sqlite/query.js:179:27)
at /src/server/node_modules/sequelize/lib/dialects/sqlite/query.js:177:50
at new Promise (<anonymous>)
at Query.run (/src/server/node_modules/sequelize/lib/dialects/sqlite/query.js:177:12)
at /src/server/node_modules/sequelize/lib/sequelize.js:314:28
at async SQLiteQueryInterface.bulkUpdate (/src/server/node_modules/sequelize/lib/dialects/abstract/query-interface.js:366:12)
at async t_device_feature.update (/src/server/node_modules/sequelize/lib/model.js:1958:28)
at async /src/server/lib/device/device.calculcateAggregateChildProcess.js:153:5 {
name: 'SequelizeTimeoutError',
parent: [Error: SQLITE_BUSY: database is locked] {
errno: 5,
code: 'SQLITE_BUSY',
sql: 'UPDATE `t_device_feature` SET `last_hourly_aggregate`=$1,`updated_at`=$2 WHERE `id` = $3'
},
original: [Error: SQLITE_BUSY: database is locked] {
errno: 5,
code: 'SQLITE_BUSY',
sql: 'UPDATE `t_device_feature` SET `last_hourly_aggregate`=$1,`updated_at`=$2 WHERE `id` = $3'
},
sql: 'UPDATE `t_device_feature` SET `last_hourly_aggregate`=$1,`updated_at`=$2 WHERE `id` = $3',
parameters: {}
}
all values are hidden
at ChildProcess.<anonymous> (/src/server/lib/device/device.calculateAggregate.js:102:23)
at ChildProcess.emit (node:events:517:28)
at maybeClose (node:internal/child_process:1098:16)
at Process.ChildProcess._handle.onexit (node:internal/child_process:303:5)
Est-ce que cela pourrait venir de là ?
Parce que je constate ce matin que ma connexion à Gladys plus est encore tombée…
F*ck … j’y croyais
Je vais continuer à chercher, le problème c’est que je n’arrive jamais à savoir quand est-ce que la connexion tombe, je m’en rends compte lorsque je suis hors de chez moi généralement
Ce que je remarque c’est qu’au moment où je redémarres Gladys, la mémoire utilisée est en très forte baisse :
On passe de 1,9Go de RAM à 250Mo environ
Voici les logs du lancement (je ne sais pas ce qui est interessant à investiguer ou non) :
Container started
2024-07-02T13:14:19+0200 <info> job.purge.js:17 (Job.purge) Deleting all background jobs created before = Tue Jun 25 2024 13:14:19 GMT+0200 (Central European Summer Time)
2024-07-02T13:14:21+0200 <info> index.js:14 (Object.start) starting Alexa service
2024-07-02T13:14:21+0200 <info> index.js:20 (Object.start) Starting Open Weather service
2024-07-02T13:14:21+0200 <info> index.js:88 (Object.start) Starting CalDAV service
2024-07-02T13:14:21+0200 <info> index.js:15 (Object.start) Starting enedis service
2024-07-02T13:14:21+0200 <info> index.js:18 (Object.start) Starting GoogleCast service
2024-07-02T13:14:21+0200 <info> index.js:16 (Object.start) Starting Z-Wave JS UI service
2024-07-02T13:14:21+0200 <info> service.start.js:40 (Service.start) Service zwavejs-ui is not configured, so it was not started.
2024-07-02T13:14:21+0200 <info> index.js:17 (Object.start) Starting Sonos service
2024-07-02T13:14:21+0200 <info> index.js:17 (Object.start) Starting Netatmo service 2c286e6d-2a29-4b91-acff-6f4d942430a4
2024-07-02T13:14:21+0200 <info> service.start.js:40 (Service.start) Service netatmo is not configured, so it was not started.
2024-07-02T13:14:21+0200 <info> init.js:14 (NodeRedManager.init) Nodered: is not enabled, skipping...
2024-07-02T13:14:21+0200 <info> index.js:27 (Object.start) Starting MELCloud service 1ef9a32d-2664-4a3b-8824-ac983bb3cc12
2024-07-02T13:14:21+0200 <info> service.start.js:40 (Service.start) Service melcloud is not configured, so it was not started.
2024-07-02T13:14:21+0200 <info> index.js:17 (Object.start) Starting Tuya service d94188bc-9520-4043-9171-3e8dc9c4ee48
2024-07-02T13:14:21+0200 <info> service.start.js:40 (Service.start) Service tuya is not configured, so it was not started.
2024-07-02T13:14:21+0200 <info> index.js:16 (Object.start) Starting Nextcloud Talk service
2024-07-02T13:14:21+0200 <info> service.start.js:40 (Service.start) Service nextcloud-talk is not configured, so it was not started.
2024-07-02T13:14:21+0200 <info> index.js:17 (Object.start) Starting LAN Manager service
2024-07-02T13:14:21+0200 <info> lan-manager.initPresenceScanner.js:18 (LANManager.initPresenceScanner) LANManager configuration: starting presence scanner
2024-07-02T13:14:21+0200 <info> index.js:16 (Object.start) starting Broadlink service
2024-07-02T13:14:22+0200 <info> index.js:18 (Object.start) Starting HomeKit service
2024-07-02T13:14:22+0200 <info> index.js:14 (Object.start) starting GoogleActions service
2024-07-02T13:14:22+0200 <info> init.js:63 (Zigbee2mqttManager.init) Zigbee2mqtt USB dongle attached to /dev/ttyUSB0
2024-07-02T13:14:22+0200 <info> checkForContainerUpdates.js:14 (Zigbee2mqttManager.checkForContainerUpdates) Checking for current installed versions and required updates...
2024-07-02T13:14:22+0200 <info> installMqttContainer.js:114 (Zigbee2mqttManager.installMqttContainer) MQTT broker container successfully started
2024-07-02T13:14:22+0200 <info> configureContainer.js:23 (Zigbee2mqttManager.configureContainer) Z2M Docker container is being configured...
2024-07-02T13:14:22+0200 <info> configureContainer.js:36 (Zigbee2mqttManager.configureContainer) Z2M configuration file already exists.
2024-07-02T13:14:23+0200 <info> installZ2mContainer.js:90 (Zigbee2mqttManager.installZ2mContainer) Zigbee2mqtt container successfully started
2024-07-02T13:14:23+0200 <info> connect.js:25 (Zigbee2mqttManager.connect) Connecting Gladys to mqtt://localhost:1884 MQTT broker...
2024-07-02T13:14:23+0200 <error> index.js:20 (process.<anonymous>) uncaughtException catched: uncaughtException
2024-07-02T13:14:23+0200 <error> index.js:21 (process.<anonymous>) Error: Service name is already in use on the network
at Registry._onProbeComplete (/src/server/services/homekit/node_modules/bonjour-hap/lib/Registry.js:108:27)
at Prober.done (/src/server/services/homekit/node_modules/bonjour-hap/lib/Prober.js:67:10)
at Prober.onMDNSresponse (/src/server/services/homekit/node_modules/bonjour-hap/lib/Prober.js:61:102)
at EventEmitter.emit (node:events:517:28)
at Socket.<anonymous> (/src/server/services/homekit/node_modules/multicast-dns/index.js:49:43)
at Socket.emit (node:events:517:28)
at UDP.onMessage (node:dgram:942:8)
2024-07-02T13:14:23+0200 <info> connect.js:35 (MqttClient.<anonymous>) Connected to MQTT container mqtt://localhost:1884
2024-07-02T13:14:23+0200 <info> subscribe.js:12 (Zigbee2mqttManager.subscribe) Subscribing to MQTT topic zigbee2mqtt/#
2024-07-02T13:14:23+0200 <info> index.js:18 (Object.start) Starting TP-Link service
2024-07-02T13:14:23+0200 <info> index.js:17 (Object.start) Starting eWeLink service
2024-07-02T13:14:23+0200 <warn> service.start.js:44 (Service.start) Unable to start service ewelink Error500:
at EweLinkHandler.throwErrorIfNeeded (/src/server/services/ewelink/lib/device/index.js:65:11)
at EweLinkHandler.connect (/src/server/services/ewelink/lib/device/connect.js:43:14)
at processTicksAndRejections (node:internal/process/task_queues:95:5)
at Object.start (/src/server/services/ewelink/index.js:18:5)
at Service.start (/src/server/lib/service/service.start.js:33:7) {
status: 500,
code: 'SERVER_ERROR',
error: 'eWeLink: Sign:oauthClient enable invalid'
}
2024-07-02T13:14:23+0200 <info> index.js:15 (Object.start) Starting Bluetooth service
2024-07-02T13:14:23+0200 <info> index.js:15 (Object.start) Starting Tasmota service
2024-07-02T13:14:23+0200 <info> index.js:14 (Object.start) Starting Xiaomi service
2024-07-02T13:14:23+0200 <info> index.js:13 (Object.start) Starting usb service
2024-07-02T13:14:23+0200 <info> index.js:19 (Object.start) Starting Telegram service
2024-07-02T13:14:23+0200 <info> index.js:18 (Object.start) Starting RTSP service
2024-07-02T13:14:23+0200 <info> index.js:18 (Object.start) Starting Philips Hue service
2024-07-02T13:14:23+0200 <info> index.js:16 (Object.start) Starting MQTT service
2024-07-02T13:14:23+0200 <info> updateContainer.js:13 (MqttHandler.updateContainer) MQTT: checking for required changes...
2024-07-02T13:14:23+0200 <info> updateContainer.js:41 (MqttHandler.updateContainer) MQTT: no container update required
2024-07-02T13:14:23+0200 <info> connect.js:38 (MqttClient.<anonymous>) Connected to MQTT server mqtt://localhost
2024-07-02T13:14:23+0200 <info> subscribe.js:12 (MqttHandler.subscribe) Subscribing to MQTT topic stat/+/+
2024-07-02T13:14:23+0200 <info> subscribe.js:12 (MqttHandler.subscribe) Subscribing to MQTT topic tele/+/+
2024-07-02T13:14:23+0200 <info> subscribe.js:12 (MqttHandler.subscribe) Subscribing to MQTT topic gladys/master/#
2024-07-02T13:14:23+0200 <info> index.js:26 (Object.start) Starting EDF Tempo service
2024-07-02T13:14:23+0200 <info> index.js:17 (Object.start) Starting Ecowatt service
2024-07-02T13:14:23+0200 <info> index.js:21 (Object.start) Starting example service
2024-07-02T13:14:23+0200 <info> scene.dailyUpdate.js:58 () Sunrise today is at 6:18 today, in your timezone = Europe/Paris
2024-07-02T13:14:23+0200 <info> scene.dailyUpdate.js:59 () Sunset today is at 21:42 today, in your timezone = Europe/Paris
2024-07-02T13:14:23+0200 <info> scene.dailyUpdate.js:70 () The sun rose this morning. Not scheduling for today.
2024-07-02T13:14:23+0200 <info> scene.dailyUpdate.js:81 () Sunset is scheduled, in 8 hours.
2024-07-02T13:14:24+0200 <info> index.js:64 (Server.<anonymous>) Server listening on port 80
2024-07-02T13:14:24+0200 <info> index.js:884 (Socket.<anonymous>) Gladys Gateway: connected in websockets
@guim31 Rappelle nous ton hardware et ta connexion internet ( fibre ? ADSL?) ?
De ce que tu décris, ton instance Gladys a l’air d’accumuler de la data en mémoire avec le temps, ça peut être dû a plein de facteurs.
Ca ressemble beaucoup à un souci de ressources, ce qu’il faudrait faire c’est avoir des analytics précises sur toutes les métrics de ton serveur à travers le temps.
Je vais installer Netdata, je l’ai déjà utilisé pour mon NAS mais j’avoue que je suis paumé dans toutes les infos (surtout que l’outil est super puissant !).
J’ai un mini pc avec un Core i3 et 8Go de RAM.
Connexion fibre chez Free qui semble tout à fait stable.