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

目前的目标只是在配置完所有内容后进行概念验证,加载和压力测试.

但是我在配置haproxy时遇到问题.我知道这不是我的应用程序的问题,因为我有运行nginx(tengine),一切正常.所以它必须与haproxy配置或haproxy工作的方式不适合我的需要.

所以我的客户端尝试做的是使用两个不同的连接连接到haproxy并保持它们打开.

1.连接分块流模式以进行上传.

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时我的日志所说的内容:

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”

任何想法可能是什么问题?

配置问题还是?

谢谢.

java ha_java – Haproxy Bad Gateway 502相关推荐

  1. 【Java编程系列】gateway限流实践时发生的问题和解决方案

    前期回顾: [Java编程系列]Springcloud-gateway自带限流方案实践篇 1.实践中发生的问题 主要有以下几个问题: 1.限流返回的响应数据无法自定义 (LogFormatUtils. ...

  2. php7 502 bad gateway,502 bad gateway怎么解决

    502 Bad Gateway错误是HTTP状态代码,表示Internet上的一台服务器收到来自另一台服务器的无效响应. 在前面的文章中,已经给大家详细介绍了502 bad gateway是什么意思以 ...

  3. 微信无法连接服务器1-502,只有一部iphone x手机,在微信公众号中选择菜单,出现bad gateway 502错误,原因?...

    1.菜单项对应的网页链接参见下图: 2.后台看到下面的错误信息: ``` --- iphone x 访问日志 172.17.0.28 - - [03/Jan/2020:10:19:17 +0800] ...

  4. 【Java】 剑指offer(50-2) 字符流中第一个只出现一次的字符

    本文参考自<剑指offer>一书,代码采用Java语言. 更多:<剑指Offer>Java实现合集   题目 请实现一个函数用来找出字符流中第一个只出现一次的字符.例如,当从字 ...

  5. 【Java面试系列】GateWay异步非阻塞模型

    GateWay工作流程 核心流程图如下: 核心概念 客户端向 SpringCloud GateWay 发出请求,如果 GateWay Handler Mapping 确定请求与路由匹配,则将其发送到 ...

  6. Java 网关-Servlet Gateway

    1997 Servlet 相当于 Java CGI(Common Gateway Interface) Servlet 基于线程(Linux 内核小于 2.6 没有线程的概念) JSP 动态 Serv ...

  7. php bad gateway,PHP 接口调用报错 502 Bad Gateway

    PHP接口调用超过5s的请求直接返回如下信息: Response 502 Bad Gateway 502 Bad Gateway nginx 查了Nginx的错误日志如下: 2019/01/22 16 ...

  8. Spring Cloud Gateway 3.1.3最新版中文手册官网2022

    Spring Cloud Gateway 3.1.3 该项目提供了一个库,用于在 Spring WebFlux 之上构建 API 网关.Spring Cloud Gateway 旨在提供一种简单而有效 ...

  9. nginx环境下执行php文件就报502,nginx请求php文件提示502错误 | 吴老二

    nginx的文件提示502就是服务没有启动,这里不管是php还是java.出现502的问题都是服务没有启动,下面浮现一下,首先在nginx的配置文件里写了一个php版本的文件. [root@wulao ...

最新文章

  1. 微软发布虚机管理SCVMM 2008 R2 RC版
  2. EntityFramework(EF)贪婪加载和延迟加载的选择和使用
  3. [BZOJ2324][ZJOI2011][最小费用最大流]营救皮卡丘
  4. 为Unity项目生成文档(一)
  5. 【Android自定义View】Bitmap的绘制和颜色滤镜
  6. 【算法】剑指 Offer 53 - I. 在排序数组中查找数字 I
  7. react 树形菜单_react使用antd组件递归实现左侧菜单导航树
  8. [转载] Python编程之np.argmax()的用法
  9. mysql无法添加服务_MySQL无法开启服务
  10. 我把朋友圈关掉了235天
  11. CSS实现输入框的高亮效果-------Day50
  12. Houdini保存自定义节点
  13. html5视频标签video画中画几个API
  14. 计算机机房普通照明,计算机机房对照明的要求
  15. Excel:12 个操作小技巧
  16. 【android】解码.9图片及xml
  17. oracle中dbms_DBMS中的关系演算
  18. 海外优秀资讯抢先看2:私有应用云平台Sandstorm之易用性
  19. 陶瓷电容—导致失效的七大原因解析
  20. 使用flex布局实现局部滚动条

热门文章

  1. 5G精华问答 | 除了速度,5G还能带来什么?
  2. vue 前期准备,项目结构
  3. linux远程执行迷路,linux操作系统基础
  4. 7读不出来卡显示无服务器,win7识别不了网络如何解决_win7显示未识别网络的处理方法...
  5. android图标字体大小设置,Android系统上如何调节显示的字体图标的大小
  6. centos6.x redhat6.x 升级openssh8.7
  7. docker: Error response from daemon: driver failed programming external connectivity
  8. Keepalived时主备负载均衡器都有VIP的问题:VRRP协议问题
  9. pom.xml中添加阿里云Maven中央仓库配置
  10. linux CentOS7最小化安装环境静默安装Oracle11GR2数据库(配置数据库监听_09)