agent strategy run error 404 #12932

Closed
opened 2026-02-21 19:09:45 -05:00 by yindo · 15 comments
Owner

Originally created by @kenneth-bro on GitHub (Apr 15, 2025).

Self Checks

  • 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 (我已阅读并同意 Language Policy).
  • [FOR CHINESE USERS] 请务必使用英文提交 Issue,否则会被关闭。谢谢!:)
  • Please do not modify this template :) and fill in all the required fields.

Dify version

1.2.0

Cloud or Self Hosted

Self Hosted (Docker)

Steps to reproduce

1、create workflow
2、config agent strategy
3、run

✔️ Expected Behavior

No response

Actual Behavior

Run failed: Failed to transform agent message: PluginInvokeError: {"args":{},"error_type":"Exception","message":"invoke llm model failed: request failed with status code: 404 and respond with: \u003c!doctype html\u003e\n\u003chtml lang=en\u003e\n\u003ctitle\u003e404 Not Found\u003c/title\u003e\n\u003ch1\u003eNot Found\u003c/h1\u003e\n\u003cp\u003eThe requested URL was not found on the server. If you entered the URL manually please check your spelling and try again.\u003c/p\u003e\n"}

[AgentLogEvent]
[NodeRunFailedEvent]
Node ID: 1744702995058
Node Title: Agent
Type: agent
Error: Failed to transform agent message: PluginInvokeError: {"args":{},"error_type":"Exception","message":"invoke llm model failed: request failed with status code: 404 and respond with: \u003c!doctype html\u003e\n\u003chtml lang=en\u003e\n\u003ctitle\u003e404 Not Found\u003c/title\u003e\n\u003ch1\u003eNot Found\u003c/h1\u003e\n\u003cp\u003eThe requested URL was not found on the server. If you entered the URL manually please check your spelling and try again.\u003c/p\u003e\n"}
Inputs: {'model': {'provider': 'langgenius/openai/openai', 'model': 'o1', 'model_type': 'llm', 'mode': 'chat', 'completion_params': {}, 'type': 'model-selector'}, 'mcp_servers_config': '', 'instruction': '助手', 'query': '123', 'tools': [{'provider_name': 'junjiem/mcp_sse/mcp_sse', 'type': 'builtin', 'tool_name': 'mcp_sse_list_tools', 'tool_label': '获取MCP工具列表', 'settings': {}, 'parameters': {}, 'enabled': True, 'extra': {'description': ''}}]}
Process Data: 
Outputs: 
[GraphRunFailedEvent] reason: Failed to transform agent message: PluginInvokeError: {"args":{},"error_type":"Exception","message":"invoke llm model failed: request failed with status code: 404 and respond with: \u003c!doctype html\u003e\n\u003chtml lang=en\u003e\n\u003ctitle\u003e404 Not Found\u003c/title\u003e\n\u003ch1\u003eNot Found\u003c/h1\u003e\n\u003cp\u003eThe requested URL was not found on the server. If you entered the URL manually please check your spelling and try again.\u003c/p\u003e\n"}
Originally created by @kenneth-bro on GitHub (Apr 15, 2025). ### Self Checks - [x] This is only for bug report, if you would like to ask a question, please head to [Discussions](https://github.com/langgenius/dify/discussions/categories/general). - [x] I have searched for existing issues [search for existing issues](https://github.com/langgenius/dify/issues), including closed ones. - [x] I confirm that I am using English to submit this report (我已阅读并同意 [Language Policy](https://github.com/langgenius/dify/issues/1542)). - [x] [FOR CHINESE USERS] 请务必使用英文提交 Issue,否则会被关闭。谢谢!:) - [x] Please do not modify this template :) and fill in all the required fields. ### Dify version 1.2.0 ### Cloud or Self Hosted Self Hosted (Docker) ### Steps to reproduce 1、create workflow 2、config agent strategy 3、run ### ✔️ Expected Behavior _No response_ ### ❌ Actual Behavior ``` Run failed: Failed to transform agent message: PluginInvokeError: {"args":{},"error_type":"Exception","message":"invoke llm model failed: request failed with status code: 404 and respond with: \u003c!doctype html\u003e\n\u003chtml lang=en\u003e\n\u003ctitle\u003e404 Not Found\u003c/title\u003e\n\u003ch1\u003eNot Found\u003c/h1\u003e\n\u003cp\u003eThe requested URL was not found on the server. If you entered the URL manually please check your spelling and try again.\u003c/p\u003e\n"} [AgentLogEvent] [NodeRunFailedEvent] Node ID: 1744702995058 Node Title: Agent Type: agent Error: Failed to transform agent message: PluginInvokeError: {"args":{},"error_type":"Exception","message":"invoke llm model failed: request failed with status code: 404 and respond with: \u003c!doctype html\u003e\n\u003chtml lang=en\u003e\n\u003ctitle\u003e404 Not Found\u003c/title\u003e\n\u003ch1\u003eNot Found\u003c/h1\u003e\n\u003cp\u003eThe requested URL was not found on the server. If you entered the URL manually please check your spelling and try again.\u003c/p\u003e\n"} Inputs: {'model': {'provider': 'langgenius/openai/openai', 'model': 'o1', 'model_type': 'llm', 'mode': 'chat', 'completion_params': {}, 'type': 'model-selector'}, 'mcp_servers_config': '', 'instruction': '助手', 'query': '123', 'tools': [{'provider_name': 'junjiem/mcp_sse/mcp_sse', 'type': 'builtin', 'tool_name': 'mcp_sse_list_tools', 'tool_label': '获取MCP工具列表', 'settings': {}, 'parameters': {}, 'enabled': True, 'extra': {'description': ''}}]} Process Data: Outputs: [GraphRunFailedEvent] reason: Failed to transform agent message: PluginInvokeError: {"args":{},"error_type":"Exception","message":"invoke llm model failed: request failed with status code: 404 and respond with: \u003c!doctype html\u003e\n\u003chtml lang=en\u003e\n\u003ctitle\u003e404 Not Found\u003c/title\u003e\n\u003ch1\u003eNot Found\u003c/h1\u003e\n\u003cp\u003eThe requested URL was not found on the server. If you entered the URL manually please check your spelling and try again.\u003c/p\u003e\n"} ```
yindo added the 🐞 bug label 2026-02-21 19:09:45 -05:00
yindo closed this issue 2026-02-21 19:09:45 -05:00
Author
Owner

@dosubot[bot] commented on GitHub (Apr 15, 2025):

The 404 error you're encountering in Dify version 1.2.0 when self-hosted using Docker is likely due to a mismatch between the port number in your API requests and the port configured in your Docker setup. Ensure that the port number in your API requests matches the port you configured in your Docker setup. If you've modified the default port in your Docker configuration, update your API request URLs to use the same port number.

Additionally, if you are using localhost within Docker, it refers to the container itself. Replace localhost with host.docker.internal in your service URLs to ensure proper communication between Docker containers and the host machine [1][2].

To continue talking to Dosu, mention @dosu.


Help Dosu learn! Give it feedback: Great Response | Irrelevant Answer | Incorrect Sources | Too Verbose | Hallucination | Bug Report | Other

@dosubot[bot] commented on GitHub (Apr 15, 2025): <!-- Answer --> The 404 error you're encountering in Dify version 1.2.0 when self-hosted using Docker is likely due to a mismatch between the port number in your API requests and the port configured in your Docker setup. Ensure that the port number in your API requests matches the port you configured in your Docker setup. If you've modified the default port in your Docker configuration, update your API request URLs to use the same port number. Additionally, if you are using `localhost` within Docker, it refers to the container itself. Replace `localhost` with `host.docker.internal` in your service URLs to ensure proper communication between Docker containers and the host machine <sup>[[1]](https://github.com/langgenius/dify/issues/17282)</sup><sup>[[2]](https://github.com/langgenius/dify-docs/blob/main/jp/learn-more/use-cases/private-ai-ollama-deepseek-dify.md)</sup>. <!-- Dosu Comment Footer --> *To continue talking to [Dosu](https://dosu.dev), mention @dosu.* --- <sup>Help Dosu learn! Give it feedback: [Great Response](https://app.dosu.dev/response-feedback/253e171f-1838-4f51-89d5-202adb5ba9e2?feedback_type=great_response) | [Irrelevant Answer](https://app.dosu.dev/response-feedback/253e171f-1838-4f51-89d5-202adb5ba9e2?feedback_type=irrelevant_answer) | [Incorrect Sources](https://app.dosu.dev/response-feedback/253e171f-1838-4f51-89d5-202adb5ba9e2?feedback_type=incorrect_sources) | [Too Verbose](https://app.dosu.dev/response-feedback/253e171f-1838-4f51-89d5-202adb5ba9e2?feedback_type=too_verbose) | [Hallucination](https://app.dosu.dev/response-feedback/253e171f-1838-4f51-89d5-202adb5ba9e2?feedback_type=hallucination) | [Bug Report](https://app.dosu.dev/response-feedback/253e171f-1838-4f51-89d5-202adb5ba9e2?feedback_type=bug_report) | [Other](https://app.dosu.dev/response-feedback/253e171f-1838-4f51-89d5-202adb5ba9e2?feedback_type=other)</sup>
Author
Owner

@kenneth-bro commented on GitHub (Apr 15, 2025):

it's right to use llm node, the error happen to agent node.

@kenneth-bro commented on GitHub (Apr 15, 2025): it's right to use llm node, the error happen to agent node.
Author
Owner

@crazywoola commented on GitHub (Apr 15, 2025):

What's your plugin version.

@crazywoola commented on GitHub (Apr 15, 2025): What's your plugin version.
Author
Owner

@kenneth-bro commented on GitHub (Apr 15, 2025):

What's your plugin version.
Agent Strategy 0.0.11 (from junjiem/mcp_see_agent)
Plugin Server: dify-plugin-daemon:0.0.7-local

@crazywoola

@kenneth-bro commented on GitHub (Apr 15, 2025): > What's your plugin version. Agent Strategy 0.0.11 (from junjiem/mcp_see_agent) Plugin Server: dify-plugin-daemon:0.0.7-local @crazywoola
Author
Owner

@Foglotus commented on GitHub (Apr 16, 2025):

  1. docker build with source:api web and run
  2. use Agent Node and (Dify Agent https://marketplace.dify.ai/plugins/langgenius/agent) plugin in chatflow app,agent mode is ReAct,any tools
  3. debug run,404 error
@Foglotus commented on GitHub (Apr 16, 2025): 1. docker build with source:api web and run 2. use Agent Node and (Dify Agent https://marketplace.dify.ai/plugins/langgenius/agent) plugin in chatflow app,agent mode is ReAct,any tools 3. debug run,404 error
Author
Owner

@Foglotus commented on GitHub (Apr 17, 2025):

What's your plugin version.
Agent Strategy 0.0.11 (from junjiem/mcp_see_agent)
Plugin Server: dify-plugin-daemon:0.0.7-local

@crazywoola

Hello,u can try the method , what is below

add the INNER_API_KEY_FOR_PLUGIN=QaHbTe77CtuXmsfyhR7+vRjI/+XbV1AaFy691iy+kGDv2Jvy0/eAh8Y1 to the env will be ok

the reaseon is docker/env.example is miss this key

@Foglotus commented on GitHub (Apr 17, 2025): > > What's your plugin version. > > Agent Strategy 0.0.11 (from junjiem/mcp_see_agent) > > Plugin Server: dify-plugin-daemon:0.0.7-local > > [@crazywoola](https://github.com/crazywoola) Hello,u can try the method , what is below add the INNER_API_KEY_FOR_PLUGIN=QaHbTe77CtuXmsfyhR7+vRjI/+XbV1AaFy691iy+kGDv2Jvy0/eAh8Y1 to the env will be ok the reaseon is docker/env.example is miss this key
Author
Owner

@kenneth-bro commented on GitHub (Apr 17, 2025):

What's your plugin version.
Agent Strategy 0.0.11 (from junjiem/mcp_see_agent)
Plugin Server: dify-plugin-daemon:0.0.7-local

@crazywoola

Hello,u can try the method , what is below

add the INNER_API_KEY_FOR_PLUGIN=QaHbTe77CtuXmsfyhR7+vRjI/+XbV1AaFy691iy+kGDv2Jvy0/eAh8Y1 to the env will be ok

the reaseon is docker/env.example is miss this key
@Foglotus It's already configured, but there are still problems
Image

@kenneth-bro commented on GitHub (Apr 17, 2025): > > > What's your plugin version. > > > Agent Strategy 0.0.11 (from junjiem/mcp_see_agent) > > > Plugin Server: dify-plugin-daemon:0.0.7-local > > > > > > [@crazywoola](https://github.com/crazywoola) > > Hello,u can try the method , what is below > > add the INNER_API_KEY_FOR_PLUGIN=QaHbTe77CtuXmsfyhR7+vRjI/+XbV1AaFy691iy+kGDv2Jvy0/eAh8Y1 to the env will be ok > > the reaseon is docker/env.example is miss this key @Foglotus It's already configured, but there are still problems ![Image](https://github.com/user-attachments/assets/ea5d6bb9-2cf9-4e2f-8b33-25fccfea32e9)
Author
Owner

@Foglotus commented on GitHub (Apr 17, 2025):

What's your plugin version.
Agent Strategy 0.0.11 (from junjiem/mcp_see_agent)
Plugin Server: dify-plugin-daemon:0.0.7-local

@crazywoola

Hello,u can try the method , what is below
add the INNER_API_KEY_FOR_PLUGIN=QaHbTe77CtuXmsfyhR7+vRjI/+XbV1AaFy691iy+kGDv2Jvy0/eAh8Y1 to the env will be ok
the reaseon is docker/env.example is miss this key
@Foglotus It's already configured, but there are still problems
Image

the code below:
Only in these two situations can get 404 error:
Image

@Foglotus commented on GitHub (Apr 17, 2025): > > > > What's your plugin version. > > > > Agent Strategy 0.0.11 (from junjiem/mcp_see_agent) > > > > Plugin Server: dify-plugin-daemon:0.0.7-local > > > > > > > > > [@crazywoola](https://github.com/crazywoola) > > > > > > Hello,u can try the method , what is below > > add the INNER_API_KEY_FOR_PLUGIN=QaHbTe77CtuXmsfyhR7+vRjI/+XbV1AaFy691iy+kGDv2Jvy0/eAh8Y1 to the env will be ok > > the reaseon is docker/env.example is miss this key > > [@Foglotus](https://github.com/Foglotus) It's already configured, but there are still problems > > ![Image](https://github.com/user-attachments/assets/ea5d6bb9-2cf9-4e2f-8b33-25fccfea32e9) the code below: Only in these two situations can get 404 error: <img width="638" alt="Image" src="https://github.com/user-attachments/assets/cfcd64de-adc7-4fe4-aac9-c96ca7fe7dd8" />
Author
Owner

@kenneth-bro commented on GitHub (Apr 17, 2025):

What's your plugin version.你的插件版本是多少。
Agent Strategy 0.0.11 (from junjiem/mcp_see_agent)代理策略 0.0.11 (来自 junjiem/mcp_see_agent)
Plugin Server: dify-plugin-daemon:0.0.7-local插件服务器:dify-plugin-daemon:0.0.7-local

@crazywoola

Hello,u can try the method , what is below你好,你可以尝试下面的方法
add the INNER_API_KEY_FOR_PLUGIN=QaHbTe77CtuXmsfyhR7+vRjI/+XbV1AaFy691iy+kGDv2Jvy0/eAh8Y1 to the env will be ok将 INNER_API_KEY_FOR_PLUGIN=QaHbTe77CtuXmsfyhR7+vRjI/+XbV1AaFy691iy+kGDv2Jvy0/eAh8Y1 添加到环境中就可以了
the reaseon is docker/env.example is miss this key原因是 docker/env.example 缺少这个键
@Foglotus It's already configured, but there are still problems@Foglotus 已经配置好了,但是还有问题
Image

the code below:  下面的代码: Only in these two situations can get 404 error:只有在这两种情况下才会出现404错误: Image

@Foglotus Both of these are official values

Image

@kenneth-bro commented on GitHub (Apr 17, 2025): > > > > > What's your plugin version.你的插件版本是多少。 > > > > > Agent Strategy 0.0.11 (from junjiem/mcp_see_agent)代理策略 0.0.11 (来自 junjiem/mcp_see_agent) > > > > > Plugin Server: dify-plugin-daemon:0.0.7-local插件服务器:dify-plugin-daemon:0.0.7-local > > > > > > > > > > > > [@crazywoola](https://github.com/crazywoola) > > > > > > > > > Hello,u can try the method , what is below你好,你可以尝试下面的方法 > > > add the INNER_API_KEY_FOR_PLUGIN=QaHbTe77CtuXmsfyhR7+vRjI/+XbV1AaFy691iy+kGDv2Jvy0/eAh8Y1 to the env will be ok将 INNER_API_KEY_FOR_PLUGIN=QaHbTe77CtuXmsfyhR7+vRjI/+XbV1AaFy691iy+kGDv2Jvy0/eAh8Y1 添加到环境中就可以了 > > > the reaseon is docker/env.example is miss this key原因是 docker/env.example 缺少这个键 > > > [@Foglotus](https://github.com/Foglotus) It's already configured, but there are still problems[@Foglotus](https://github.com/Foglotus) 已经配置好了,但是还有问题 > > > ![Image](https://github.com/user-attachments/assets/ea5d6bb9-2cf9-4e2f-8b33-25fccfea32e9) > > the code below:  下面的代码: Only in these two situations can get 404 error:只有在这两种情况下才会出现404错误: <img alt="Image" width="638" src="https://private-user-images.githubusercontent.com/36061646/434781490-cfcd64de-adc7-4fe4-aac9-c96ca7fe7dd8.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3NDQ4OTEzNzMsIm5iZiI6MTc0NDg5MTA3MywicGF0aCI6Ii8zNjA2MTY0Ni80MzQ3ODE0OTAtY2ZjZDY0ZGUtYWRjNy00ZmU0LWFhYzktYzk2Y2E3ZmU3ZGQ4LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTA0MTclMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwNDE3VDExNTc1M1omWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWRkMzlmNTA2NjUzYmE3NWU3ZWE3MjI1Nzk0MjEzZWZlZTQ1ZThiYzczYmQzNTJmNmU4ZTZiODAwNmYwNWY0MDcmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.xuvGX98o62TJ-LC_CJBjIFGoT3XY5eJTbl0rkQc2ZFs"> @Foglotus Both of these are official values ![Image](https://github.com/user-attachments/assets/1a0bb30b-a86a-4d76-8b3c-fe5c7f90e2b0)
Author
Owner

@crazywoola commented on GitHub (Apr 17, 2025):

PLUGIN_DIFY_INNER_API_KEY=QaHbTe77CtuXmsfyhR7+vRjI/+XbV1AaFy691iy+kGDv2Jvy0/eAh8Y1
PLUGIN_DIFY_INNER_API_URL=http://api:5001
@crazywoola commented on GitHub (Apr 17, 2025): ``` PLUGIN_DIFY_INNER_API_KEY=QaHbTe77CtuXmsfyhR7+vRjI/+XbV1AaFy691iy+kGDv2Jvy0/eAh8Y1 PLUGIN_DIFY_INNER_API_URL=http://api:5001 ```
Author
Owner

@kenneth-bro commented on GitHub (Apr 17, 2025):

PLUGIN_DIFY_INNER_API_KEY=QaHbTe77CtuXmsfyhR7+vRjI/+XbV1AaFy691iy+kGDv2Jvy0/eAh8Y1
PLUGIN_DIFY_INNER_API_URL=http://api:5001

it's ok.

@kenneth-bro commented on GitHub (Apr 17, 2025): > ``` > PLUGIN_DIFY_INNER_API_KEY=QaHbTe77CtuXmsfyhR7+vRjI/+XbV1AaFy691iy+kGDv2Jvy0/eAh8Y1 > PLUGIN_DIFY_INNER_API_URL=http://api:5001 > ``` it's ok.
Author
Owner

@berg-wang commented on GitHub (Apr 23, 2025):

I met the same problem, how to solve it? I have config all the env.

@berg-wang commented on GitHub (Apr 23, 2025): I met the same problem, how to solve it? I have config all the env.
Author
Owner

@jungleAI404 commented on GitHub (Jun 5, 2025):

I met the same problem, how to solve it? I have config all the env.我遇到了同样的问题,如何解决?我已经配置了所有环境。

Do you solve the problem? Thanks.

@jungleAI404 commented on GitHub (Jun 5, 2025): > I met the same problem, how to solve it? I have config all the env.我遇到了同样的问题,如何解决?我已经配置了所有环境。 Do you solve the problem? Thanks.
Author
Owner

@kenneth-bro commented on GitHub (Jun 5, 2025):

I met the same problem, how to solve it? I have config all the env.我遇到了同样的问题,如何解决?我已经配置了所有环境。

Do you solve the problem? Thanks.你能解决这个问题吗?谢谢。

check DIFY_INNER_API_URL config

@kenneth-bro commented on GitHub (Jun 5, 2025): > > I met the same problem, how to solve it? I have config all the env.我遇到了同样的问题,如何解决?我已经配置了所有环境。 > > Do you solve the problem? Thanks.你能解决这个问题吗?谢谢。 check DIFY_INNER_API_URL config
Author
Owner

@jungleAI404 commented on GitHub (Jun 5, 2025):

Thanks!

I met the same problem, how to solve it? I have config all the env.我遇到了同样的问题,如何解决?我已经配置了所有环境。

Do you solve the problem? Thanks.你能解决这个问题吗?谢谢。

check DIFY_INNER_API_URL config检查 DIFY_INNER_API_URL 配置

Thanks! I've adjusted the API project's interface path, and DIFY_INNER_API_URL is still using the default configuration. It's working correctly now.

@jungleAI404 commented on GitHub (Jun 5, 2025): Thanks! > > > I met the same problem, how to solve it? I have config all the env.我遇到了同样的问题,如何解决?我已经配置了所有环境。 > > > > > > Do you solve the problem? Thanks.你能解决这个问题吗?谢谢。 > > check DIFY_INNER_API_URL config检查 DIFY_INNER_API_URL 配置 Thanks! I've adjusted the API project's interface path, and DIFY_INNER_API_URL is still using the default configuration. It's working correctly now.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langgenius/dify#12932