Domotics interface inaccessible

Forum dédié aux questions concernant la configuration de votre serveur sous Linux
regis
Messages : 20
Inscription : 09 févr. 2018, 19:02

Domotics interface inaccessible

Message par regis »

Bonjour
J'ai installé Domoticz sur un Raspberry2

Régulièrement, l'interface devient inaccessible, il me semble que c'est lorsque j'ai une sauvegarde automatique (toute les heures) mais je n'en suis pas sûr. Obligé de me connecté en SSH et de redémarrer le service avec sudo service domotics reload.
J'ai essayé Monit mais je dois avoir un problème dans mes réglages, le service ne redémarre pas, seul le redémarrage du Rasberry fonctionne et me permet de retrouver un serveur fonctionnel sans intervenir.
Quand l'interface est inaccessible, le serveur tourne pourtant

Code : Tout sélectionner

sudo service domoticz status
   domoticz.service - LSB: Home Automation System
   Loaded: loaded (/etc/init.d/domoticz.sh; generated; vendor preset: enabled)
   Active: active (exited) since Thu 2019-11-14 17:33:51 CET; 58min ago
     Docs: man:systemd-sysv-generator(8)
  Process: 470 ExecStart=/etc/init.d/domoticz.sh start (code=exited, status=0/SUCCESS)

nov. 14 17:33:49 raspberrypi systemd[1]: Starting LSB: Home Automation System...
nov. 14 17:33:50 raspberrypi domoticz.sh[470]: 2019-11-14 17:33:50.935  Status: Domoticz V4.10717 (c)2012-2019 GizMoCuz
nov. 14 17:33:50 raspberrypi domoticz.sh[470]: 2019-11-14 17:33:50.956  Status: Build Hash: b38b49e5, Date: 2019-05-09 13:04:08
nov. 14 17:33:50 raspberrypi domoticz.sh[470]: 2019-11-14 17:33:50.958  Status: Startup Path: /home/domoticz/domoticz/
nov. 14 17:33:50 raspberrypi domoticz.sh[470]: domoticz: Domoticz is starting up....
nov. 14 17:33:50 raspberrypi domoticz[522]: Domoticz is starting up....
nov. 14 17:33:50 raspberrypi domoticz[628]: Domoticz running...
nov. 14 17:33:51 raspberrypi systemd[1]: Started LSB: Home Automation System.
17:33 c'est l'heure de l'avant dernier redémarrage automatique, je viens d'en avoir un à 18:47
Comment puis-je trouver ce qui fait planter le serveur web de Domoticz ? Il doit bien y avoir un fichier de log qui enregistre l'erreur mais je ne sais pas où le chercher., si quelqu'un a une idée …
regis
Messages : 20
Inscription : 09 févr. 2018, 19:02

Re: Domotics interface inaccessible

Message par regis »

Je me réponds en partie.
J'ai réglé le problème de Monit

Code : Tout sélectionner

check process domoticz with pidfile /var/run/domoticz.pid
    start program = "/etc/init.d/domoticz.sh start"
    stop  program = "/etc/init.d/domoticz.sh stop"
    if failed
       url http://127.0.0.1:8080/json.htm?type=command&param=getversion
           and content = '"status" : "OK"'
       for 2 cycles
       then restart
ne fonctionnait pas mais en ajoutant

Code : Tout sélectionner

    restart program = "/etc/init.d/domoticz.sh restart"
Domoticz se relance bien mais ça ne règle pas le problème du serveur Web de Domoticz qui se plante régulièrement
higgins91
Messages : 668
Inscription : 17 nov. 2016, 11:06

Re: Domotics interface inaccessible

Message par higgins91 »

utilise les LOG, active les dans le fichier de configuration, comme ça c'est plus facile d'identifier l'origine du problème.
Dz version : 2023.2
Rpi 4 avec dongle téléinfo, RFXCom, sondes 1-wire et GPIO
regis
Messages : 20
Inscription : 09 févr. 2018, 19:02

Re: Domotics interface inaccessible

Message par regis »

Dans mes logs j'ai

Code : Tout sélectionner

2019-11-16 01:36:03.968  Status: EventSystem: Script event triggered: Chauffage-chambre1
2019-11-16 01:36:04.034  (RFXtrx433) Lighting 2 (Radiateur chambre1)
2019-11-16 01:36:04.044  Status: EventSystem: Script event triggered: Chauffage-chambre1
2019-11-16 01:36:04.109  (RFXtrx433) Lighting 2 (Radiateur chambre1)
2019-11-16 01:36:04.119  Status: EventSystem: Script event triggered: Chauffage-chambre1
2019-11-16 01:36:04.185  (RFXtrx433) Lighting 2 (Radiateur chambre1)
2019-11-16 01:36:04.195  Status: EventSystem: Script event triggered: Chauffage-chambre1
2019-11-16 01:36:04.260  (RFXtrx433) Lighting 2 (Radiateur chambre1)
2019-11-16 01:36:04.270  Status: EventSystem: Script event triggered: Chauffage-chambre1
2019-11-16 01:36:04.335  (RFXtrx433) Lighting 2 (Radiateur chambre1)
2019-11-16 01:36:04.345  Status: EventSystem: Script event triggered: Chauffage-chambre1
2019-11-16 01:36:04.410  (RFXtrx433) Lighting 2 (Radiateur chambre1)
2019-11-16 01:36:04.420  Status: EventSystem: Script event triggered: Chauffage-chambre1
2019-11-16 01:36:04.486  (RFXtrx433) Lighting 2 (Radiateur chambre1)
2019-11-16 01:36:04.496  Status: EventSystem: Script event triggered: Chauffage-chambre1
2019-11-16 01:36:04.561  (RFXtrx433) Lighting 2 (Radiateur chambre1)
2019-11-16 01:36:04.561  subtype          = Wrong command received from application (210)
Sequence nbr      = 65
2019-11-16 01:36:04.570  Status: EventSystem: Script event triggered: Chauffage-chambre1
2019-11-16 01:36:04.636  (RFXtrx433) Lighting 2 (Radiateur chambre1)
2019-11-16 01:36:04.646  Status: EventSystem: Script event triggered: Chauffage-chambre1
2019-11-16 01:36:04.712  (RFXtrx433) Lighting 2 (Radiateur chambre1)
2019-11-16 01:36:04.722  Status: EventSystem: Script event triggered: Chauffage-chambre1
2019-11-16 01:36:04.787  (RFXtrx433) Lighting 2 (Radiateur chambre1)
2019-11-16 01:36:04.796  Status: EventSystem: Script event triggered: Chauffage-chambre1
2019-11-16 01:36:04.862  (RFXtrx433) Lighting 2 (Radiateur chambre1)
2019-11-16 01:36:04.872  Status: EventSystem: Script event triggered: Chauffage-chambre1
2019-11-16 01:36:04.938  (RFXtrx433) Lighting 2 (Radiateur chambre1)
2019-11-16 01:36:04.938  subtype          = Wrong command received from application (1)
Sequence nbr      = 1

Chauffage-chambre1 c'est un script Lua qui sert de thermostat pour le chauffage Radiateur chambre1
Un script qui se lance plus de 10 fois par secondes tout en laissant 2 lignes dans les logs, ce n'est pas top mais je ne sais pas l'appeler moins souvent., Du coup, ma carte de 16Go était pleine, j'ai fait un peu de place et je vais voir pour vider automatiquement et régulièrement mes logs.
Je verrai demain si le serveur s'est planté ou pas.
Sinon j'ai des Wrong command received from application et je ne sais pas trop à quoi ça correspond.
Je chercherai demain
regis
Messages : 20
Inscription : 09 févr. 2018, 19:02

Re: Domotics interface inaccessible

Message par regis »

Bon en nettoyant les logs, j'ai bien trouvé une erreur qui bloque au moment de la sauvegarde automatique

Code : Tout sélectionner

2019-11-16 02:00:01.081  Status: Starting automatic database backup procedure...
2019-11-16 02:00:01.939  Error: SQL Query("VACUUM") : database or disk is full
2019-11-16 02:00:01.961  Status: Schedule item started! Name: Piscine, Type: On Time, DevID: 126, Time: 2019-11-16 02:00:01
2019-11-16 02:04:50.599  Error: mainworker seems to have ended or hung unexpectedly (last update 301.000000 seconds ago)
2019-11-16 02:04:50.804  Error: Domoticz(1403) is exiting due to watchdog triggered...
2019-11-16 02:05:54.205  Error: Failed to start gdb, will use backtrace() for printing stack frame

2019-11-16 02:05:55.194  Status: Closing application!...
2019-11-16 02:05:55.194  Status: Stopping worker...
2019-11-16 02:06:02.712  Status: Domoticz V4.10717 (c)2012-2019 GizMoCuz
2019-11-16 02:06:02.713  Status: Build Hash: b38b49e5, Date: 2019-05-09 13:04:08
2019-11-16 02:06:02.713  Status: Startup Path: /home/domoticz/domoticz/
Le disque n'est pas plein à priori (1,5Go de libre)
À voir demain
regis
Messages : 20
Inscription : 09 févr. 2018, 19:02

Re: Domotics interface inaccessible

Message par regis »

Je me réponds :
Un script Lua remplissait la base (table LightingLog) indéfiniment. Quand j'ai passé /var/tmp en mémoire vive (→ place limitée), le programme n'a plus eu assez de place pour faire les sauvegardes et la table n'a plus été nettoyée.
J'ouvre un autre post pour ce problème de base qui grossit trop vite.
Répondre