日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當(dāng)前位置: 首頁 > 编程资源 > 编程问答 >内容正文

编程问答

java ha_java – Haproxy Bad Gateway 502

發(fā)布時間:2025/3/8 编程问答 20 豆豆
生活随笔 收集整理的這篇文章主要介紹了 java ha_java – Haproxy Bad Gateway 502 小編覺得挺不錯的,現(xiàn)在分享給大家,幫大家做個參考.

所以我在Jetty servlet面前使用HAProxy.

目前的目標(biāo)只是在配置完所有內(nèi)容后進(jìn)行概念驗證,加載和壓力測試.

但是我在配置haproxy時遇到問題.我知道這不是我的應(yīng)用程序的問題,因為我有運行nginx(tengine),一切正常.所以它必須與haproxy配置或haproxy工作的方式不適合我的需要.

所以我的客戶端嘗試做的是使用兩個不同的連接連接到haproxy并保持它們打開.

1.連接分塊流模式以進(jìn)行上傳.

2.連接正常模式并建立下載通道.

這是我的haproxy.conf文件的樣子:

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

這是我嘗試訪問端口443時我的日志所說的內(nèi)容:

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”

任何想法可能是什么問題?

配置問題還是?

謝謝.

總結(jié)

以上是生活随笔為你收集整理的java ha_java – Haproxy Bad Gateway 502的全部內(nèi)容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網(wǎng)站內(nèi)容還不錯,歡迎將生活随笔推薦給好友。