2014-07-04 11 views
10

Ich habe eine grundlegende Nodejs App von Openshift erstellt und nach dem Zufallsprinzip, der Dienst selbst beendet sich ein paar Mal in wenigen Tagen. Keine Fehlermeldung von meinem Nodejs-Modul, sondern nur in haproxy, das automatisch mit installiert wurde.Openshipt haproxy Fehler mit 'Express' hat keinen Server verfügbar

Nachrichten von haproxy.log sind:

[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. 

Antwort

3

prüfen dies: Openshift Layer4 connection, App Won't Start

Das Problem könnte sein, dass Sie nicht alles, was an der Wurzel dient, von Ihrer Express-App, so müssen Sie Haproxy-Konfigurationsdatei ändern, finden Sie die Datei, die Express und httpchk erwähnt und ändern von/zu etwas, das auf Anfrage reagiert.

Alternativ können Sie auch etwas aufstellen, damit HAProxy Ihren Dienst nicht neu startet.

+0

es löste mein Problem perfekt. fügte ein gefälschtes index.html hinzu und dann fing alles an zu arbeiten. – Sombriks

0

Sind Sie sicher, dass der Traffic Ihre App hält? Wenn es keine Anfragen gibt, sollte es den Gang "entleeren". Jede nachfolgende Anfrage sollte es "aufblasen", aber trotzdem kann es als "Dienst nicht erreichbar" enden.

Re @ Dids Antwort, obwohl korrekt, empfiehlt RedHat nicht Ändern der HaProxy Keepalive URL für die zukünftigen Updates von Openshift kann die Konfiguration überschreiben. Ich selbst habe die App modifiziert, um ein einfaches Hallo bei root zu bedienen.

Verwandte Themen