Gourous de SOdaemon Node.js échoue toutes les 60 secondes avec Monit
Je courais Node.js comme un démon à l'aide Monit & il se trouve qu'il échoue toutes les 60 secondes sur le point. Voici mon monit.log
[email protected]:/etc/monit# tail -f /var/log/monit.log
[UTC Sep 4 12:07:50] info : 'nodejs' start: /sbin/start
[UTC Sep 4 12:08:50] error : 'nodejs' failed, cannot open a connection to INET[127.0.0.1:8000] via TCP
[UTC Sep 4 12:08:50] info : 'nodejs' trying to restart
[UTC Sep 4 12:08:50] info : 'nodejs' stop: /sbin/stop
[UTC Sep 4 12:08:50] info : 'nodejs' start: /sbin/start
[UTC Sep 4 12:09:50] error : 'nodejs' failed, cannot open a connection to INET[127.0.0.1:8000] via TCP
[UTC Sep 4 12:09:50] info : 'nodejs' trying to restart
[UTC Sep 4 12:09:50] info : 'nodejs' stop: /sbin/stop
[UTC Sep 4 12:09:50] info : 'nodejs' start: /sbin/start
[UTC Sep 4 12:10:50] info : 'nodejs' connection succeeded to INET[127.0.0.1:8000] via TCP
Voici ma config Monit de monitrc
set logfile /var/log/monit.log
check host nodejs with address 127.0.0.1
start program = "/sbin/start nodeapp"
stop program = "/sbin/stop nodeapp"
if failed port 8000 protocol HTTP
request/
with timeout 10 seconds
then restart
Ai-je fait quelque chose de mal dans cette configuration ou est-il une autre raison semble nœud à l'échec si régulièrement? Où d'autre dois-je chercher pour identifier ce problème?
Merci.
même chose ici. vous devez suivre le tutoriel de How to Node. Avez-vous trouvé une solution? –
Oui j'ai suivi ce tutoriel. Non, pas encore de solution! J'espère passer une journée entière à ce sujet ce mois-ci et le résoudre. – iUsable
Monit démarre-t-il réellement le processus de noeud? (si vous vérifiez avec ps) –