tinyproxy doesn't handle TCP health checks well and logs errors

未关闭
#438 12 条评论 2 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

评估

难度
3/5
预计耗时
1-2 天
新手友好度
35/100
Issue 类型
缺陷
描述清晰度
基本清楚
活跃度
停滞
技术栈
c

调研方向

Start by tracing the client connection and request-reading path that emits read_request_line and the related errors shown in the issue; the payload does not name source files or tests. Reproduce a TCP connection that closes without sending a request, then inspect the logs. Done means handling this health-check pattern without filling the logs with errors while preserving useful reporting for other failed requests.

由索引模型根据 Issue 内容生成。

描述

Tinyproxy version

1.11.0 stable

Issue

I'm running tinyproxy in a container on aws/ecs behind an nlb (network load-balancer). The issue is that with an nlb my service health check is TCP based. So aws attempts to connect to my tinyproxy over the correct port to determine if the service is running.

The health check passes fine...however, tinyproxy doesn't like that no data is being passed through the proxy only the connect and disconnect. Thus producing a log error with every healthcheck

tinyproxy  | CONNECT   May 11 20:15:09.609 [1]: Connect (file descriptor 7): 10.0.1.118
tinyproxy  | ERROR     May 11 20:15:09.609 [1]: read_request_line: Client (file descriptor: 7) closed socket before read.
tinyproxy  | ERROR     May 11 20:15:09.609 [1]: Error reading readable client_fd 7
tinyproxy  | WARNING   May 11 20:15:09.609 [1]: Could not retrieve request entity

Expectation

I'd like for my logs to not be filled with errors from these health checks. If there was a way to handle these better it would be great.

主要语言
C
星标
6.1k
派生
768
平均合并
15 天 3 小时
30 天内合并 PR
1

环境准备

这个项目没有提供开发容器、Dockerfile 或贡献指南,环境需要你自己搭建:先看它的 README,通用步骤见我们的新手贡献指南。

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

tinyproxy/tinyproxy 的其他 Issue

查看 tinyproxy/tinyproxy 的全部 Issue

相似的 Issue

更多 C Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。