Hacktoberfest 2026:維護者為十月標記出來的 issue,仍然開放、適合新手。 瀏覽 Hacktoberfest issue

HAProxy replies client with RST when client side reuses port in http mode and soft reload is issued on HAProxy

未關閉
#3,472 6 則留言 0 個 reaction 已指派 0 人 在 GitHub 檢視

還沒有人認領這個 Issue。

評估

難度
4/5
預估耗時
3-5 天
新手友好度
48/100
Issue 類型
缺陷
描述清晰度
基本清楚
活躍度
冷清
技術堆疊
c

研究方向

Start by reproducing the issue with HAProxy master-worker mode, the shown HTTP backend settings, connection pooling, and the specified keep-alive timeouts. Use the described tcpdump observations to trace the client connection across a soft reload; done means reused client requests continue without HAProxy sending FIN or RST.

由索引模型根據 Issue 內容生成。

描述

status: feedback required type: bug
Detailed Description of the Problem
Setup

Clients --> Gateway -> HAProxy -> Backend Server

Client side Gateway is using ConnectionPools which means the client tries to reuse exiting connection (5 sec timeout).
Client side keep alive timer: 5 seconds
HAProxy keep alive timeout: 60 seconds
HAProxy Version haproxy-3.0.17

Issue

Whenever client reuses existing connection towards HAProxy, and HAProxy is issued soft reload (due to changes to in the ingress or backend), then the HAProxy terminating the client connection with RST.

I believe above is not an expected behaviour on the HAProxy. Either the soft reload or client side connection reuse should not lead to termination of the existing connection by the HAProxy.

Current Analysis

Analysed the tcpdumps and client connection behaviour for the above scenario.
Tcpdump traces indicate that whenever clients have started the connections:

  • There is single tcp/SSL connection from client to the HAProxy for entire duration
  • There are multiple http connections from HAProxy to the backend server - one for each client request

When reload is issued on HAProxy the following observation is made:

  • No issue or tcp/http packets seen between HAProxy and the backend server
  • If client tries to send another request using the existing tcp connection, HAProxy is replying with FIN and RST
Expected Behavior

The client requests should continue to work as it was working prior to the reload of the HAProxy.

Steps to Reproduce the Behavior
  1. Connect some Gateway before the HAProxy with connection pooling enabled, set the port reuse timeout to 5 seconds
  2. Use standard master-worker mode on HAProxy, add a HTTP backend, set http-keep-alive time out to 1m
  3. Establish multiple http GET requests from the client side and while the requests are in progress, issue soft reload on the HAProxy
Do you have any idea what may have caused this?

No response

Do you have an idea how to solve the issue?

No response

What is your configuration?
**HAProxy Config**

 
global
     master-worker

 defaults
     log global
     option redispatch
     option http-server-close 
     option http-keep-alive
     timeout client          600s
     timeout client-fin      600s
     timeout connect         5s
     timeout http-keep-alive 1m
     timeout http-request    5s
     ...

 backend apps
     mode http
     balance hdr(xyz)
     option srvtcpka
    ...
Output of haproxy -vv
NA
Last Outputs and Backtraces

Additional Information

No response

主要語言
C
星號
6.9k
分支
976
PR 合併指標
30 天內沒有已合併 PR

環境準備

這個專案沒有提供開發容器、Dockerfile 或貢獻指南,環境需要你自己搭建:先看它的 README,通用步驟見我們的新手貢獻指南。

從這裡開始

  1. 先讀完整個 Issue,再讀專案的貢獻指南。
  2. 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
  3. Fork 儲存庫,在一個分支上完成修改。
  4. 送出 Pull Request,並在描述裡引用這個 Issue 編號。

haproxy/haproxy 的其他 Issue

查看 haproxy/haproxy 的全部 Issue

相似的 Issue

更多 C Issue

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。