[BUG] A request the HTTP Listener rejects leaves no record anywhere
維護者通常 1 天內回覆
還沒有人認領這個 Issue。
評估
- 難度
- 4/5
- 預估耗時
- 3-5 天
- 新手友好度
- 42/100
- Issue 類型
- 缺陷
- 描述清晰度
- 基本清楚
- 活躍度
- 活躍
- 技術堆疊
- java
- 領域
- backend, observability
研究方向
Start in the HTTP Listener receiver, HttpReceiver, where the existing ErrorEvent dispatch sites are, and read the Jetty hook HttpChannel.Listener.onRequestFailure that the issue identifies as the only one reporting rejected requests. Reproduce with the curl command in the issue (431 with a 9000-byte header) and check the Events tab and logs/mirth.log. Done means a rejected request produces an Events entry naming the listener, and ideally the 400 and 414 cases are covered too; conf/log4j2.properties is also involved in the logging side. The issue leaves the event design open, so confirm the approach with maintainers first.
由索引模型根據 Issue 內容生成。
描述
Describe the bug
This is the HTTP Listener source connector. When the Jetty server it runs rejects a request before the channel sees it, nothing is recorded: no message, no event, nothing in mirth.log. Same for a header that is too large (431), a URI that is too long (414) and a malformed header (400). Reproducible every time.
To Reproduce
- Deploy an HTTP Listener with the default Request Header Size (8192).
curl -H "X-Big: $(head -c 9000 /dev/zero | tr '\0' a)" http://localhost:<port>/- The client gets
431 Request Header Fields Too Large. - Look at the dashboard, the Events tab and
logs/mirth.log.
Expected behavior
An operator can see that the listener turned a request away, and why.
Actual behavior
Nothing anywhere. No event is written. Jetty logs a WARN, but conf/log4j2.properties sets rootLogger = ERROR with no Jetty logger, so the line is dropped.
Environment
OIE 4.6.0 (Linux tarball), OpenJDK 17.0.20.1, Jetty 9.4.57. main has the same Jetty version and the same log4j2.properties root logger.
Workaround(s)
Add to conf/log4j2.properties and restart:
logger.jettyParser.name = org.eclipse.jetty.http.HttpParser
logger.jettyParser.level = WARN
A 431 then writes WARN ... org.eclipse.jetty.http.HttpParser: Header is too large 8193>8192 to mirth.log, and a 414 writes URI is too large >8192. The line names no channel, port or client, a 400 for a malformed header still logs nothing, and there is still no event.
Additional context
Which Jetty hooks see a rejected request, checked on 9.4.57:
HttpChannel.Listener.onRequestFailurefires withBadMessageException: 431(register withconnector.addBean(...)). It is the only one that reports the failure.ErrorHandler.handlenever fires on this path.RequestLog.log,onResponseBeginandonCompletefire but report status 200, so a request log would record the rejection as a success.
HttpReceiver already dispatches ErrorEvents at four sites, so an Events entry from onRequestFailure would fit. Jetty throws BadMessageException for the 400 and 414 cases too, so the same hook should cover them (not tested).
- 主要語言
- Java
- 星號
- 227
- 分支
- 81
- 平均合併
- 2 天 16 小時
- 30 天內合併 PR
- 12
環境準備
- 提供 Dockerfile 或 Docker Compose 檔案
- 沒有 Pull Request 範本
- 閱讀貢獻指南
從這裡開始
- 先讀完整個 Issue,再讀專案的貢獻指南。
- 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
- Fork 儲存庫,在一個分支上完成修改。
- 送出 Pull Request,並在描述裡引用這個 Issue 編號。
OpenIntegrationEngine/engine 的其他 Issue
-
難度 2/5 1-3 小時 新手友好度 68/100
OpenIntegrationEngine/engine#485 ·
維護者通常 1 天內回覆
-
enhancement
難度 2/5 1-3 小時 新手友好度 62/100
OpenIntegrationEngine/engine#478 · 1 則留言 ·
維護者通常 1 天內回覆
-
難度 2/5 1-3 小時 新手友好度 68/100
OpenIntegrationEngine/engine#355 ·
維護者通常 1 天內回覆
-
難度 2/5 1-3 小時 新手友好度 68/100
OpenIntegrationEngine/engine#347 ·
維護者通常 1 天內回覆
-
難度 2/5 1-3 小時 新手友好度 68/100
OpenIntegrationEngine/engine#313 ·
維護者通常 1 天內回覆
查看 OpenIntegrationEngine/engine 的全部 Issue
相似的 Issue
-
ToolCallbackProvider AutoConfiguration does not preserve tool order可能已有人在做 關聯的 PR 仍在進行中或已合併。 未關閉status: waiting-for-triage
難度 2/5 1-3 小時 新手友好度 79/100
spring-projects/spring-ai#7206 ·
維護者通常 2 天內回覆
-
難度 2/5 1-3 小時 新手友好度 80/100
eclipse-dirigible/dirigible#7958 ·
維護者通常 1 天內回覆
-
bug ci sev-6
難度 2/5 1-3 小時 新手友好度 73/100
-
area/cli
難度 2/5 半天 新手友好度 78/100
quarkusio/quarkus#57623 · 1 則留言 ·
維護者通常 1 天內回覆
-
難度 2/5 1-3 小時 新手友好度 72/100
jhipster/prettier-java#1113 ·
維護者通常 2 天內回覆