dify hitTesting HTTP/1.1 500 Internal Server Error by ragflow
まだ誰も着手していません。
評価
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 初心者へのやさしさ
- 38/100
調査の方向性
api/controllers/console/datasets/external.py から開始し、hit_testing_service.py、retrieval_service.py、external_knowledge_service.py、core/helper/ssrf_proxy.py を経由してリクエストを追跡します。RAGFlow の検索リクエストを再現し、外部 hit-testing エンドポイントが3回の再試行後に500を返す理由を特定し、報告された失敗がもはや発生しないことを確認します。
索引モデルが issue の本文から書いたものです。
説明
Self Checks
- I have read the Contributing Guide and Language Policy.
- This is only for bug report, if you would like to ask a question, please head to Discussions.
- I have searched for existing issues search for existing issues, including closed ones.
- I confirm that I am using English to submit this report, otherwise it will be closed.
- 【中文用户 & Non English User】请使用英语提交,否则会被关闭 :)
- Please do not modify this template :) and fill in all the required fields.
Dify version
1.14.2
Cloud or Self Hosted
Self Hosted (Docker)
Steps to reproduce
api-1 | /app/api/.venv/lib/python3.12/site-packages/httpx/_models.py:408: DeprecationWarning: Use 'content=<...>' to upload raw bytes/text content.
api-1 | headers, stream = encode_request(
api-1 | 2026-08-10 13:43:53.962 INFO [Dummy-118] [_client.py:1025] 14ec8d87c9c454fa871769d65891cf62 - HTTP Request: POST http://10.168.45.21:3000/api/v1/dify/retrieval "HTTP/1.1 500 Internal Server Error"
api-1 | 2026-08-10 13:43:53.963 WARNING [Dummy-118] [ssrf_proxy.py:195] 14ec8d87c9c454fa871769d65891cf62 - Received status code 500 for URL http://10.168.45.21:3000/api/v1/dify/retrieval which is in the force list
ssrf_proxy-1 | 1786340633.961 1472 192.168.224.5 TCP_MISS/500 319 POST http://10.168.45.21:3000/api/v1/dify/retrieval - HIER_DIRECT/10.168.45.21 application/json
api-1 | 2026-08-10 13:43:55.804 INFO [Dummy-118] [_client.py:1025] 14ec8d87c9c454fa871769d65891cf62 - HTTP Request: POST http://10.168.45.21:3000/api/v1/dify/retrieval "HTTP/1.1 500 Internal Server Error"
api-1 | 2026-08-10 13:43:55.805 WARNING [Dummy-118] [ssrf_proxy.py:195] 14ec8d87c9c454fa871769d65891cf62 - Received status code 500 for URL http://10.168.45.21:3000/api/v1/dify/retrieval which is in the force list
ssrf_proxy-1 | 1786340635.803 1337 192.168.224.5 TCP_MISS/500 319 POST http://10.168.45.21:3000/api/v1/dify/retrieval - HIER_DIRECT/10.168.45.21 application/json
api-1 | 2026-08-10 13:43:58.304 INFO [Dummy-118] [_client.py:1025] 14ec8d87c9c454fa871769d65891cf62 - HTTP Request: POST http://10.168.45.21:3000/api/v1/dify/retrieval "HTTP/1.1 500 Internal Server Error"
api-1 | 2026-08-10 13:43:58.305 WARNING [Dummy-118] [ssrf_proxy.py:195] 14ec8d87c9c454fa871769d65891cf62 - Received status code 500 for URL http://10.168.45.21:3000/api/v1/dify/retrieval which is in the force list
ssrf_proxy-1 | 1786340638.303 1494 192.168.224.5 TCP_MISS/500 319 POST http://10.168.45.21:3000/api/v1/dify/retrieval - HIER_DIRECT/10.168.45.21 application/json
api-1 | 2026-08-10 13:44:01.656 INFO [Dummy-118] [_client.py:1025] 14ec8d87c9c454fa871769d65891cf62 - HTTP Request: POST http://10.168.45.21:3000/api/v1/dify/retrieval "HTTP/1.1 500 Internal Server Error"
api-1 | 2026-08-10 13:44:01.657 WARNING [Dummy-118] [ssrf_proxy.py:195] 14ec8d87c9c454fa871769d65891cf62 - Received status code 500 for URL http://10.168.45.21:3000/api/v1/dify/retrieval which is in the force list
api-1 | 2026-08-10 13:44:01.657 ERROR [Dummy-118] [app.py:875] 14ec8d87c9c454fa871769d65891cf62 - Exception on /console/api/datasets/39ce4a3a-0689-460b-aea7-3dfc36a7e82d/external-hit-testing [POST]
api-1 | Traceback (most recent call last):
api-1 | File "/app/api/controllers/console/datasets/external.py", line 301, in post
api-1 | response = HitTestingService.external_retrieve(
api-1 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
api-1 | File "/app/api/services/hit_testing_service.py", line 201, in external_retrieve
api-1 | all_documents = RetrievalService.external_retrieve(
api-1 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
api-1 | File "/app/api/core/rag/datasource/retrieval_service.py", line 191, in external_retrieve
api-1 | all_documents = ExternalDatasetService.fetch_external_knowledge_retrieval(
api-1 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
api-1 | File "/app/api/services/external_knowledge_service.py", line 347, in fetch_external_knowledge_retrieval
api-1 | response = ExternalDatasetService.process_external_api(
api-1 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
api-1 | File "/app/api/services/external_knowledge_service.py", line 223, in process_external_api
api-1 | response: httpx.Response = _METHOD_MAP[method_lc](data=json.dumps(settings.params), files=files, **kwargs)
api-1 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
api-1 | File "/app/api/core/helper/ssrf_proxy.py", line 217, in post
api-1 | return make_request("POST", url, max_retries=max_retries, **kwargs)
api-1 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
api-1 | File "/app/api/core/helper/ssrf_proxy.py", line 209, in make_request
api-1 | raise MaxRetriesExceededError(f"Reached maximum retries ({max_retries}) for URL {url}")
api-1 | core.helper.ssrf_proxy.MaxRetriesExceededError: Reached maximum retries (3) for URL http://10.168.45.21:3000/api/v1/dify/retrieval
api-1 |
api-1 | During handling of the above exception, another exception occurred:
api-1 |
api-1 | Traceback (most recent call last):
api-1 | File "/app/api/.venv/lib/python3.12/site-packages/flask/app.py", line 917, in full_dispatch_request
api-1 | rv = self.dispatch_request()
api-1 | ^^^^^^^^^^^^^^^^^^^^^^^
api-1 | File "/app/api/.venv/lib/python3.12/site-packages/flask/app.py", line 902, in dispatch_request
api-1 | return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args) # type: ignore[no-any-return]
api-1 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
api-1 | File "/app/api/.venv/lib/python3.12/site-packages/flask_restx/api.py", line 404, in wrapper
api-1 | resp = resource(*args, **kwargs)
api-1 | ^^^^^^^^^^^^^^^^^^^^^^^^^
api-1 | File "/app/api/.venv/lib/python3.12/site-packages/flask/views.py", line 110, in view
api-1 | return current_app.ensure_sync(self.dispatch_request)(**kwargs) # type: ignore[no-any-return]
api-1 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
api-1 | File "/app/api/.venv/lib/python3.12/site-packages/flask_restx/resource.py", line 41, in dispatch_request
api-1 | resp = meth(*args, **kwargs)
api-1 | ^^^^^^^^^^^^^^^^^^^^^
api-1 | File "/app/api/controllers/console/wraps.py", line 225, in decorated
api-1 | return view(*args, **kwargs)
api-1 | ^^^^^^^^^^^^^^^^^^^^^
api-1 | File "/app/api/libs/login.py", line 100, in decorated_view
api-1 | return current_app.ensure_sync(func)(*args, **kwargs)
api-1 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
api-1 | File "/app/api/controllers/console/wraps.py", line 44, in decorated
api-1 | return view(*args, **kwargs)
api-1 | ^^^^^^^^^^^^^^^^^^^^^
api-1 | File "/app/api/controllers/console/datasets/external.py", line 311, in post
api-1 | raise InternalServerError(str(e))
api-1 | werkzeug.exceptions.InternalServerError: 500 Internal Server Error: Reached maximum retries (3) for URL http://10.168.45.21:3000/api/v1/dify/retrieval
nginx-1 | 10.168.22.86 - - [10/Aug/2026:05:44:01 +0000] "POST /console/api/datasets/39ce4a3a-0689-460b-aea7-3dfc36a7e82d/external-hit-testing HTTP/1.1" 500 147 "http://dify.ops.test.dwzq/datasets/39ce4a3a-0689-460b-aea7-3dfc36a7e82d/hitTesting" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/151.0.0.0 Safari/537.36" "-"
✔️ Expected Behavior
no
❌ Actual Behavior
- 主要言語
- TypeScript
- スター
- 157k
- フォーク
- 24.7k
- 平均マージ
- 22時間 32分
- マージ済み PR(30日)
- 611
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
langgenius/dify のほかの issue
-
Annotation Reply: a stored score threshold of 0.0 is silently replaced with 1, disabling the feature オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
langgenius/dify#42639 · コメント 1 件 · リアクション 1 件 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
langgenius/dify#42468 · コメント 1 件 · リアクション 1 件 ·
-
🐞 bug
難易度 2/5 1〜3時間 初心者へのやさしさ 86/100
langgenius/dify#42446 · リアクション 1 件 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
langgenius/dify#42355 · コメント 1 件 · リアクション 1 件 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
langgenius/dify#42350 · コメント 1 件 · リアクション 1 件 ·
langgenius/dify の issue をすべて見る
似ている issue
-
calcite-components needs triage refactor
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
Esri/calcite-design-system#15203 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 91/100
-
community first-timers-only good first issue hacktoberfest help wanted low hanging fruit up-for-grabs
難易度 1/5 1時間未満 初心者へのやさしさ 95/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
Automattic/studio#4908 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 90/100