HAProxy前端后端不断启动和停止

时间:2016-04-16 04:16:54

标签: haproxy

我正在使用HAProxy 1.6.4 来将我的流量负载均衡到不同的服务器。就像现在我的haproxy在docker容器内运行。在我的配置中,我有不同的前端和后端。在我的测试中,我的前端后端工作并将流量转发到我想要的请求。

但问题是我的一些流量正在收到CONN_RESET错误。通过查看haproxy日志,我发现我的朋友和后端正在不断重启。日志看起来像这样。

local0.warn: Apr 15 12:30:36 haproxy[32715]: Stopping backend default-backend in 0 ms.
local0.warn: Apr 15 12:30:36 haproxy[32715]: Stopping backend default-backend in 0 ms.
local0.warn: Apr 15 12:30:36 haproxy[32715]: Stopping frontend http-frontend in 0 ms.
local0.warn: Apr 15 12:30:36 haproxy[32715]: Stopping frontend http-frontend in 0 ms.
local0.warn: Apr 15 12:30:36 haproxy[32715]: Stopping backend http-service-vbv7kk in 0 ms.
local0.warn: Apr 15 12:30:36 haproxy[32715]: Stopping backend http-service-vbv7kk in 0 ms.
local0.warn: Apr 15 12:30:36 haproxy[32715]: Stopping backend http-service-tsah7b in 0 ms.
local0.notice: Apr 15 12:30:37 haproxy[32720]: Proxy default-backend started.
local0.notice: Apr 15 12:30:37 haproxy[32720]: Proxy default-backend started.
local0.notice: Apr 15 12:30:37 haproxy[32720]: Proxy http-frontend started.
local0.notice: Apr 15 12:30:37 haproxy[32720]: Proxy http-frontend started.
local0.notice: Apr 15 12:30:37 haproxy[32720]: Proxy http-service-vbv7kk started.
local0.notice: Apr 15 12:30:37 haproxy[32720]: Proxy http-service-vbv7kk started.
local0.notice: Apr 15 12:30:37 haproxy[32720]: Proxy http-service-orry6w started.
local0.notice: Apr 15 12:30:37 haproxy[32720]: Proxy tcp-frontend-key-3443 started.
local0.notice: Apr 15 12:30:37 haproxy[32720]: Proxy tcp-service-bzczrg started.
local0.notice: Apr 15 12:30:37 haproxy[32720]: Proxy tcp-service-hacbno started.
local0.notice: Apr 15 12:30:37 haproxy[32720]: Proxy tcp-service-hacbno started.
local0.warn: Apr 15 12:30:37 haproxy[32719]: Stopping backend default-backend in 0 ms.
local0.warn: Apr 15 12:30:37 haproxy[32719]: Stopping backend default-backend in 0 ms.
local0.warn: Apr 15 12:30:37 haproxy[32719]: Stopping frontend http-frontend in 0 ms.
local0.warn: Apr 15 12:30:37 haproxy[32719]: Stopping frontend http-frontend in 0 ms.
local0.warn: Apr 15 12:30:37 haproxy[32719]: Stopping backend http-service-tsah7b in 0 ms.
local0.warn: Apr 15 12:30:37 haproxy[32719]: Stopping backend http-service-tsah7b in 0 ms

最简单的配置我看起来像this

现在我的问题是我错过了什么?为什么我的连接被重置以及重启的原因?

*在ServerFault here中询问的问题,但看起来没人在检查。

0 个答案:

没有答案