Haproxy Bad Gateway 502

So, ich bin mit HAProxy in front Jetty-servlets.
Das Ziel ist im moment nur proof-of-concept und Last-und stress-Tests, sobald alles konfiguriert ist.
Jedoch habe ich ein problem die Konfiguration von haproxy. Ich weiß, dass es nicht ein problem mit meiner Anwendung Grund habe ich nginx(tengine) laufen und alles funktioniert einwandfrei. So, es hat etwas mit der haproxy Konfiguration oder nur die Art, wie haproxy funktioniert, ist nicht geeignet für meine Bedürfnisse.

So, was mein client versucht, eine Verbindung zu haproxy mit zwei verschiedenen verbindungen und halten Sie Sie öffnen.
1. In Verbindung mit chunked-streaming-Modus für den upload.
2. Verbinden Sie mit einem normalen Modus und stellen Sie eine download-Kanal.

Hier ist, wie mein haproxy.conf-Datei sieht wie folgt aus:

global
log /dev/log    local0
log /dev/log    local1 notice
chroot /var/lib/haproxy
stats socket /run/haproxy/admin.sock mode 660 level admin
stats timeout 30s
user haproxy
group haproxy
daemon

# Default SSL material locations
# ca-base /etc/ssl/certs
# crt-base /etc/ssl/private

# Default ciphers to use on SSL-enabled listening sockets.
# For more information, see ciphers(1SSL).
ssl-default-bind-ciphers kEECDH+aRSA+AES:kRSA+AES:+AES256:RC4-SHA:!kEDH:!LOW:!EXP:!MD5:!aNULL:!eNULL
maxconn 2048

defaults
log global
mode    http
option forwardfor
option http-server-close
option  httplog
option  dontlognull
timeout connect 5000
timeout client  50000
timeout server  50000
errorfile 400 /etc/haproxy/errors/400.http
errorfile 403 /etc/haproxy/errors/403.http
errorfile 408 /etc/haproxy/errors/408.http
errorfile 500 /etc/haproxy/errors/500.http
errorfile 502 /etc/haproxy/errors/502.http
errorfile 503 /etc/haproxy/errors/503.http
errorfile 504 /etc/haproxy/errors/504.http
stats enable
stats uri /stats
stats realm Haproxy\ Statistics
stats auth user:password

frontend www-http
   bind *:80
   reqadd X-Forwarded-Proto:\ http
   default_backend www-backend

frontend www-https
   bind *:443 ssl crt /etc/haproxy/server.pem
   reqadd X-Forwarded-Proto:\ https
   default_backend www-backend

backend www-backend
    redirect scheme https if !{ ssl_fc }
    server www-1 localhost:8080 check maxconn 2048

Und hier ist, was meine logs sagen, wenn ich versuche, Zugriff auf port 443:

Sep 17 11:10:18 xxxxx-pc haproxy[15993]: 127.0.0.1:32875 [17/Sep/2014:11:10:18.464] www - https - ~ www-backend/www-1 0/0/0/-1/1 502 212 - - PH-- 0/0/0/0/0 0/0 "GET /test HTTP/1.1"

Irgendwelche Ideen was das problem sein könnte?
Ein Problem mit der Konfiguration oder ?

Dank.

InformationsquelleAutor imps | 2014-09-17
Schreibe einen Kommentar