Je ne sais pas si c’est lié mais si on a beaucoup de déclencheurs ou d’actions celles-ci ne se chargent pas complètement.
ça n’a pas de lien donc j’ai déplacé ce post dans un nouveau sujet
Tu as plus d’informations à nous donner ?
Est-ce que tu peux regarder la console de ton navigateur ?
Tu as le détail des requêtes qui reviennent en erreur ? (Onglet « Network » ?)
Le container Gladys crash ? Je veux bien des logs si tu as…
Ah tu es sur Gladys Plus là!
Je veux bien que tu m’envoie ce soir les détails des requêtes en local.
Tu trouveras les requêtes en rouge dans l’onglet Network, et tu les ouvriras pour afficher la response
oui.
ok ca marche.
j’ai testé en local et aucun problème. C’est avec Gladys Plus que ça bug.
Lorsque c’est le cas, cela me renvois sur la page de configuration.
dans la console j’ai ça:
dans les logs j’ai ça.
at ChildProcess.<anonymous> (/src/server/lib/device/device.calculateAggregate.js:102:23)
at ChildProcess.emit (events.js:400:28)
at maybeClose (internal/child_process.js:1058:16)
at Process.ChildProcess._handle.onexit (internal/child_process.js:293:5)
2022-03-07T21:27:10+0100 <info> device.calculateAggregate.js:38 (DeviceManager.calculateAggregate) Calculating aggregates device feature state for interval daily
2022-03-07T21:27:10+0100 <info> gateway.backup.js:46 (Gateway.backup) Gateway backup: Encrypting backup
2022-03-07T21:27:10+0100 <info> gateway.backup.js:54 (Gateway.backup) Gateway backup: Uploading backup
2022-03-07T21:27:12+0100 <info> gateway.backup.js:59 (Gateway.backup) Gladys backup uploaded with success to Gladys Gateway. gladys-db-backup-2022-3-7-21-27-0.db
2022-03-07T21:27:19+0100 <warn> device.calculateAggregate.js:95 (Socket.<anonymous>) device.calculateAggregate stderr: DatabaseError [SequelizeDatabaseError]: SQLITE_CORRUPT: database disk image is malformed
at Query.formatError (/src/server/node_modules/sequelize/lib/dialects/sqlite/query.js:415:16)
at Query._handleQueryResponse (/src/server/node_modules/sequelize/lib/dialects/sqlite/query.js:72:18)
at Statement.afterExecute (/src/server/node_modules/sequelize/lib/dialects/sqlite/query.js:246:27) {
parent: [Error: SQLITE_CORRUPT: database disk image is malformed] {
errno: 11,
code: 'SQLITE_CORRUPT',
sql: "SELECT `value`, `created_at` FROM `t_device_feature_state` AS `t_device_feature_state` WHERE `t_device_feature_state`.`device_feature_id` = '04d521be-6b56-463a-a0de-5f540ac76a9a' AND `t_device_feature_state`.`created_at` BETWEEN '2022-02-15 23:00:00.000 +00:00' AND '2022-03-06 23:00:00.000 +00:00' ORDER BY `t_device_feature_state`.`created_at` ASC;"
},
original: [Error: SQLITE_CORRUPT: database disk image is malformed] {
errno: 11,
code: 'SQLITE_CORRUPT',
sql: "SELECT `value`, `created_at` FROM `t_device_feature_state` AS `t_device_feature_state` WHERE `t_device_feature_state`.`device_feature_id` = '04d521be-6b56-463a-a0de-5f540ac76a9a' AND `t_device_feature_state`.`created_at` BETWEEN '2022-02-15 23:00:00.000 +00:00' AND '2022-03-06 23:00:00.000 +00:00' ORDER BY `t_device_feature_state`.`created_at` ASC;"
},
sql: "SELECT `value`, `created_at` FROM `t_device_feature_state` AS `t_device_feature_state` WHERE `t_device_feature_state`.`device_feature_id` = '04d521be-6b56-463a-a0de-5f540ac76a9a' AND `t_device_feature_state`.`created_at` BETWEEN '2022-02-15 23:00:00.000 +00:00' AND '2022-03-06 23:00:00.000 +00:00' ORDER BY `t_device_feature_state`.`created_at` ASC;",
parameters: undefined
}
2022-03-07T21:27:19+0100 <warn> device.calculateAggregate.js:101 (ChildProcess.<anonymous>) device.calculateAggregate: Exiting child process with code 1
2022-03-07T21:27:19+0100 <error> device.onHourlyDeviceAggregateEvent.js:27 (DeviceManager.onHourlyDeviceAggregateEvent) Error: DatabaseError [SequelizeDatabaseError]: SQLITE_CORRUPT: database disk image is malformed
at Query.formatError (/src/server/node_modules/sequelize/lib/dialects/sqlite/query.js:415:16)
at Query._handleQueryResponse (/src/server/node_modules/sequelize/lib/dialects/sqlite/query.js:72:18)
at Statement.afterExecute (/src/server/node_modules/sequelize/lib/dialects/sqlite/query.js:246:27) {
parent: [Error: SQLITE_CORRUPT: database disk image is malformed] {
errno: 11,
code: 'SQLITE_CORRUPT',
sql: "SELECT `value`, `created_at` FROM `t_device_feature_state` AS `t_device_feature_state` WHERE `t_device_feature_state`.`device_feature_id` = '04d521be-6b56-463a-a0de-5f540ac76a9a' AND `t_device_feature_state`.`created_at` BETWEEN '2022-02-15 23:00:00.000 +00:00' AND '2022-03-06 23:00:00.000 +00:00' ORDER BY `t_device_feature_state`.`created_at` ASC;"
},
original: [Error: SQLITE_CORRUPT: database disk image is malformed] {
errno: 11,
code: 'SQLITE_CORRUPT',
sql: "SELECT `value`, `created_at` FROM `t_device_feature_state` AS `t_device_feature_state` WHERE `t_device_feature_state`.`device_feature_id` = '04d521be-6b56-463a-a0de-5f540ac76a9a' AND `t_device_feature_state`.`created_at` BETWEEN '2022-02-15 23:00:00.000 +00:00' AND '2022-03-06 23:00:00.000 +00:00' ORDER BY `t_device_feature_state`.`created_at` ASC;"
},
sql: "SELECT `value`, `created_at` FROM `t_device_feature_state` AS `t_device_feature_state` WHERE `t_device_feature_state`.`device_feature_id` = '04d521be-6b56-463a-a0de-5f540ac76a9a' AND `t_device_feature_state`.`created_at` BETWEEN '2022-02-15 23:00:00.000 +00:00' AND '2022-03-06 23:00:00.000 +00:00' ORDER BY `t_device_feature_state`.`created_at` ASC;",
parameters: undefined
}
at ChildProcess.<anonymous> (/src/server/lib/device/device.calculateAggregate.js:102:23)
at ChildProcess.emit (events.js:400:28)
at maybeClose (internal/child_process.js:1058:16)
at Process.ChildProcess._handle.onexit (internal/child_process.js:293:5)
2022-03-07T21:27:20+0100 <info> device.calculateAggregate.js:38 (DeviceManager.calculateAggregate) Calculating aggregates device feature state for interval monthly
2022-03-07T21:27:29+0100 <warn> device.calculateAggregate.js:95 (Socket.<anonymous>) device.calculateAggregate stderr: DatabaseError [SequelizeDatabaseError]: SQLITE_CORRUPT: database disk image is malformed
at Query.formatError (/src/server/node_modules/sequelize/lib/dialects/sqlite/query.js:415:16)
at Query._handleQueryResponse (/src/server/node_modules/sequelize/lib/dialects/sqlite/query.js:72:18)
at Statement.afterExecute (/src/server/node_modules/sequelize/lib/dialects/sqlite/query.js:246:27) {
parent: [Error: SQLITE_CORRUPT: database disk image is malformed] {
errno: 11,
code: 'SQLITE_CORRUPT',
sql: "SELECT `value`, `created_at` FROM `t_device_feature_state` AS `t_device_feature_state` WHERE `t_device_feature_state`.`device_feature_id` = '04d521be-6b56-463a-a0de-5f540ac76a9a' AND `t_device_feature_state`.`created_at` BETWEEN '2022-01-31 23:00:00.000 +00:00' AND '2022-02-28 23:00:00.000 +00:00' ORDER BY `t_device_feature_state`.`created_at` ASC;"
},
original: [Error: SQLITE_CORRUPT: database disk image is malformed] {
errno: 11,
code: 'SQLITE_CORRUPT',
sql: "SELECT `value`, `created_at` FROM `t_device_feature_state` AS `t_device_feature_state` WHERE `t_device_feature_state`.`device_feature_id` = '04d521be-6b56-463a-a0de-5f540ac76a9a' AND `t_device_feature_state`.`created_at` BETWEEN '2022-01-31 23:00:00.000 +00:00' AND '2022-02-28 23:00:00.000 +00:00' ORDER BY `t_device_feature_state`.`created_at` ASC;"
},
sql: "SELECT `value`, `created_at` FROM `t_device_feature_state` AS `t_device_feature_state` WHERE `t_device_feature_state`.`device_feature_id` = '04d521be-6b56-463a-a0de-5f540ac76a9a' AND `t_device_feature_state`.`created_at` BETWEEN '2022-01-31 23:00:00.000 +00:00' AND '2022-02-28 23:00:00.000 +00:00' ORDER BY `t_device_feature_state`.`created_at` ASC;",
parameters: undefined
}
2022-03-07T21:27:29+0100 <warn> device.calculateAggregate.js:101 (ChildProcess.<anonymous>) device.calculateAggregate: Exiting child process with code 1
2022-03-07T21:27:29+0100 <error> device.onHourlyDeviceAggregateEvent.js:32 (DeviceManager.onHourlyDeviceAggregateEvent) Error: DatabaseError [SequelizeDatabaseError]: SQLITE_CORRUPT: database disk image is malformed
at Query.formatError (/src/server/node_modules/sequelize/lib/dialects/sqlite/query.js:415:16)
at Query._handleQueryResponse (/src/server/node_modules/sequelize/lib/dialects/sqlite/query.js:72:18)
at Statement.afterExecute (/src/server/node_modules/sequelize/lib/dialects/sqlite/query.js:246:27) {
parent: [Error: SQLITE_CORRUPT: database disk image is malformed] {
errno: 11,
code: 'SQLITE_CORRUPT',
sql: "SELECT `value`, `created_at` FROM `t_device_feature_state` AS `t_device_feature_state` WHERE `t_device_feature_state`.`device_feature_id` = '04d521be-6b56-463a-a0de-5f540ac76a9a' AND `t_device_feature_state`.`created_at` BETWEEN '2022-01-31 23:00:00.000 +00:00' AND '2022-02-28 23:00:00.000 +00:00' ORDER BY `t_device_feature_state`.`created_at` ASC;"
},
original: [Error: SQLITE_CORRUPT: database disk image is malformed] {
errno: 11,
code: 'SQLITE_CORRUPT',
sql: "SELECT `value`, `created_at` FROM `t_device_feature_state` AS `t_device_feature_state` WHERE `t_device_feature_state`.`device_feature_id` = '04d521be-6b56-463a-a0de-5f540ac76a9a' AND `t_device_feature_state`.`created_at` BETWEEN '2022-01-31 23:00:00.000 +00:00' AND '2022-02-28 23:00:00.000 +00:00' ORDER BY `t_device_feature_state`.`created_at` ASC;"
},
sql: "SELECT `value`, `created_at` FROM `t_device_feature_state` AS `t_device_feature_state` WHERE `t_device_feature_state`.`device_feature_id` = '04d521be-6b56-463a-a0de-5f540ac76a9a' AND `t_device_feature_state`.`created_at` BETWEEN '2022-01-31 23:00:00.000 +00:00' AND '2022-02-28 23:00:00.000 +00:00' ORDER BY `t_device_feature_state`.`created_at` ASC;",
parameters: undefined
}
at ChildProcess.<anonymous> (/src/server/lib/device/device.calculateAggregate.js:102:23)
at ChildProcess.emit (events.js:400:28)
at maybeClose (internal/child_process.js:1058:16)
at Process.ChildProcess._handle.onexit (internal/child_process.js:293:5)
2022-03-07T21:27:42+0100 <info> scene.actions.js:267 (Object.user.check-presence) CheckUserPresence action: No devices of the user "vincent" were seen in the last 16 minutes.
2022-03-07T21:27:42+0100 <info> scene.actions.js:270 (Object.user.check-presence) CheckUserPresence action: Set "vincent" to left home of house "appart"
Je ne pense pas que c’est un rapport mais dans la dernière ligne il appel ma maison ''appart" ce qui était le cas, mais j’ai changé par “maison” est ce qu’il n’y aurait pas un truc là aussi ?
ça te fait pas peur ça ? Moi si !
Ta base de donnée est corrompue comme le dise les logs, ce qui doit créer des bugs dans tous les sens. Les problèmes de connexion à Gladys Plus ne sont qu’une conséquence de cette base corrompue.
Tu es sûr une carte SD pour Gladys ou un SSD déjà ?
Sur SSD, j’ai vue et je pense que c’est suite à l’ajout de périphériques zigbee à moins qu’il y ait une autre raison.
Ah mince, c’est pas normal alors ça
Tu as ajouté un appareil Zigbee très verbose ?
Pour réparer ta DB, SQLite3 a des outils pour le faire ( sqlite - How to recover a corrupt SQLite3 database? - Stack Overflow ), après c’est du CLI
non juste snzb-01, 02, 03,
Ok, je serais curieux de savoir ce qu’il s’est passé…
Pour corriger ce problème, il va falloir du CLI par contre je pense. Si tu veux le faire toi même, il faut faire ça : sqlite - How to recover a corrupt SQLite3 database? - Stack Overflow (après avoir stoppé gladys bien entendu), après ne fait surtout pas ça directement sur ta DB de prod, on ne sait pas ce que va réussir à faire le CLI, il faut copier la DB avant.
Sinon si c’est du charabia pour toi, je peux te corriger le problème de mon côté si ça te dérange pas de m’envoyer ta DB.
Si ça ne te dérange pas, tu te connecte en SSH, tu fais:
docker stop gladys
Ensuite tu récupère le fichier dans /var/lib/gladysassistant/gladys-production.db
Et tu m’envoie ce fichier en privée.
Je ferais le fix et je te renverrais le fichier. Le seul souci de cette solution c’est que bon pendant le temps que je fix ta DB tu ne peux pas utiliser Gladys (ou utiliser, mais bon tout sera perdu quand tu remplaceras le fichier de DB par le fichier corrigé)
On va faire ça, pas de problème.
Je n’ai pas grand chose dessus.
J’ai corrigé la DB que tu m’as envoyé et je te l’ai renvoyé fixée
Mauvaise nouvelle, c’est exactement pareil.
Je ne comprend pas cette ligne, je n’ai pas de device avec cet ID.
Si tu veux un jour prendre le contrôle et vérifier d’où ca vient, c’est possible.
Est-ce que tout simplement ce n’est pas des actions qui sont liés à des appareils qui n’existent plus dans Gladys ?
J’avoue que je n’ai jamais testé ce cas
Tu peux faire un test dans une nouvelle scène pour tester ? Tu créé un device MQTT bidon, tu créé une scène qui fait un “récupérer le dernier état” de ce device, puis tu supprime le device et tu reviens sur la scène ?
Là le comportement est bon, quand on supprime un device Mqtt, il est supprimer des scènes aussi.
Je pense que c’est plus lié aux devices zigbee2mqtt.
Dans l’intégration zigbee2mqtt j’ai beaucoup plus de devices dans « appareils » 20 que dans « découverte zigbee » 13.
Donc en plus si je ne prend pas le bon, est ce que ce n’est pas ça qui fait bugger ?
Honte à moi je ne suis toujours pas passé sur Gladys Plus… !
Voilà une mission à accomplir rapidement