2014-07-04 15 views
10

Ho creato un'app di Nodejs di base da Openshift e casualmente, il servizio si termina alcune volte in pochi giorni. Nessun messaggio di errore dal mio modulo Nodejs ma solo in haproxy installato automaticamente con.L'errore haproxy di Openshift con 'express' non ha server disponibile

I messaggi dei haproxy.log sono:

[WARNING] 184/001333 (193501) : Server express/local-gear is DOWN for maintenance. 
[WARNING] 184/010106 (483047) : config : log format ignored for proxy 'stats' since it has no log address. 
[WARNING] 184/010106 (483047) : config : log format ignored for proxy 'express' since it has no log address. 
[WARNING] 184/010106 (483047) : Server express/local-gear is DOWN, reason: Layer4 connection problem, info: "Connection refused", check duration: 0ms. 0 active and 0 backup servers left. 0 sessions active, 0 requeued, 0 remaining in queue. 
[ALERT] 184/010106 (483047) : proxy 'express' has no server available! 
[WARNING] 184/010110 (483047) : Server express/local-gear is DOWN for maintenance. 
[WARNING] 184/010115 (483047) : Server express/local-gear is UP (leaving maintenance). 
[WARNING] 184/010116 (483047) : Server express/local-gear is DOWN, reason: Layer7 wrong status, code: 500, info: "Internal Server Error", check duration: 43ms. 0 active and 0 backup servers left. 0 sessions active, 0 requeued, 0 remaining in queue. 
[ALERT] 184/010116 (483047) : proxy 'express' has no server available! 

haproxy_ctld.log

E, [2014-07-03T12:12:59.557445 #97055] ERROR -- : Could not connect to the application. Check if the application is stopped. 
E, [2014-07-03T12:13:04.557968 #97055] ERROR -- : Could not connect to the application. Check if the application is stopped. 
E, [2014-07-03T12:13:09.558480 #97055] ERROR -- : Could not connect to the application. Check if the application is stopped. 

risposta

3

Controllare questo: Openshift Layer4 connection, App Won't Start

Il problema potrebbe essere che non stai servendo nulla alla radice della tua app express, quindi devi modificare il file di configurazione di haproxy, trovare il file che cita express e httpchk e cambiare da/a qualcosa che risponde alla richiesta.

In alternativa, serve solo qualcosa su/così HAProxy non continua a riavviare il servizio.

+0

ha risolto il mio problema perfettamente. aggiunto un phony index.html e poi tutto ha iniziato a funzionare. – Sombriks

0

Sei sicuro che il traffico stia mantenendo l'app? Se non ci sono richieste, dovrebbe "sgonfiare" la marcia. Qualsiasi richiesta successiva dovrebbe "gonfiarlo", ma tuttavia potrebbe finire come "servizio non disponibile".

Re @Dids risposta, anche se corretta, RedHat raccomanda non cambiare l'URL keepalive HAProxy per i futuri aggiornamenti di OpenShift può sovrascrivere la configurazione. Io stesso ho modificato l'app per servire un semplice Hello alla radice.

Problemi correlati