[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Squeeze-Monit: "monit: Cannot connect to the monit daemon. Did you start it with http support?"



Bonjour,

Je bute sur le problème suivant :

- j'exécute un script d'installation via la console
- à la fin de ce script, j'ai la commande "/etc/init.d/monit restart"
- celle-ci affiche le message "monit: Cannot connect to the monit daemon. Did you start it with http support?" et interrompt l'exécution du script
- pourtant quand j'exécute directement la commande "/etc/init.d/monit restart", elle fonctionne normalement.

En analysant les logs, je voie que même quand le message "monit: ...support?" s'affiche, le daemon monit est bien lancé :
Jun 15 12:52:04 paserv-dev monit[28873]: Starting monit daemon with http interface at [*:2812]
Jun 15 12:52:04 paserv-dev monit[28876]: monit: Cannot connect to the monit daemon. Did you start it with http support?
Jun 15 12:52:05 paserv-dev monit[28877]: Starting monit HTTP server at [*:2812]
Jun 15 12:52:05 paserv-dev monit[28877]: monit HTTP server started


1. Contournement: comment poursuivre malgré tout l'exécution du script ?
Ce qui suit ne marche pas.

set +e
/etc/init.d/monit restart || true
set -e
echo foo


2. Correction: comment corriger ?
Dans quelle direction chercher ?

Slts

PS: Ce script fonctionnait parfaitement avec Lenny.

Reply to: