When configuring the API keys for Tongyi Qianwen and Jina plugins, the page reports an error (104,'Connection reset by peer') #16089

Closed
opened 2026-02-21 19:24:36 -05:00 by yindo · 2 comments
Owner

Originally created by @Paradox27315 on GitHub (Aug 12, 2025).

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.4.3

Cloud or Self Hosted

Self Hosted (Docker)

Steps to reproduce

  1. Click to enter the Settings - Model List and ensure that the current model (Tongyi Qianwen) has been downloaded. Two methods, local upload and online download from the market, have been tested here
  2. Set API key and select 'No' under 'Use International Endpoint' (tested and not related to this parameter)
  3. Click save to output this error
Image Image

✔️ Expected Behavior

Successfully configured and able to successfully apply the model in the application

Actual Behavior

The current page output error is: 'Connection aborted.', 'Connection ResetError (104,' Connection reset by peer ')
And there is no debugging information in the web, API, and plugin_daemon containers, only 401 and 400 errors are output in the nginx container

Originally created by @Paradox27315 on GitHub (Aug 12, 2025). ### Self Checks - [x] I have read the [Contributing Guide](https://github.com/langgenius/dify/blob/main/CONTRIBUTING.md) and [Language Policy](https://github.com/langgenius/dify/issues/1542). - [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, otherwise it will be closed. - [x] 【中文用户 & Non English User】请使用英语提交,否则会被关闭 :) - [x] Please do not modify this template :) and fill in all the required fields. ### Dify version 1.4.3 ### Cloud or Self Hosted Self Hosted (Docker) ### Steps to reproduce 1. Click to enter the Settings - Model List and ensure that the current model (Tongyi Qianwen) has been downloaded. Two methods, local upload and online download from the market, have been tested here 2. Set API key and select 'No' under 'Use International Endpoint' (tested and not related to this parameter) 3. Click save to output this error <img width="778" height="388" alt="Image" src="https://github.com/user-attachments/assets/1ef4822e-e546-4cb5-8090-6bb227ece8ff" /> <img width="924" height="411" alt="Image" src="https://github.com/user-attachments/assets/a01a2f6b-7657-4e63-950e-e04f41806a34" /> ### ✔️ Expected Behavior Successfully configured and able to successfully apply the model in the application ### ❌ Actual Behavior The current page output error is: 'Connection aborted.', 'Connection ResetError (104,' Connection reset by peer ') And there is no debugging information in the web, API, and plugin_daemon containers, only 401 and 400 errors are output in the nginx container
yindo closed this issue 2026-02-21 19:24:37 -05:00
Author
Owner
@crazywoola commented on GitHub (Aug 12, 2025): https://stackoverflow.com/questions/51137032/what-are-the-general-rules-for-getting-the-104-connection-reset-by-peer-error
Author
Owner

@dosubot[bot] commented on GitHub (Aug 12, 2025):

The "Connection reset by peer" (104) error, along with 401 and 400 errors when configuring Tongyi Qianwen and Jina plugins, is most often caused by network connectivity issues, invalid API keys, or misconfiguration in a self-hosted Docker setup.

Here’s a focused troubleshooting checklist:

  1. Check outbound network access: The plugin_daemon container must have internet access to reach external APIs and, for Tongyi, to install dependencies on first run. If your environment was cloned from another network, dependencies may not be installed. Temporarily allow outbound access, restart Dify, and let the plugin initialize fully. Afterward, you can re-apply restrictions if needed (source).

  2. Validate Docker network and PLUGIN_DAEMON_URL: Make sure all Dify containers (web, API, plugin_daemon) are on the same Docker network and that the PLUGIN_DAEMON_URL is set correctly. Misconfiguration here can cause internal server errors and plugin connectivity failures (source).

  3. Confirm API key validity and format: Double-check that your API keys are correct, have the necessary permissions, and are entered in the expected format. Invalid or missing keys will result in 401 Unauthorized or 400 Bad Request errors (source).

  4. Update plugin_daemon image and increase resources: Outdated plugin_daemon images or insufficient system resources (memory, threads) can cause connection errors. Update the image and ensure your host meets or exceeds recommended specs (source).

  5. Advanced diagnostics: If the above steps don’t resolve the issue, check for firewall or proxy restrictions, review /etc/hosts in your containers (especially if using services behind Cloudflare or similar), and consider running the plugin_daemon in debug mode for more detailed logs (source).

Dify’s plugin credential validation and error handling are generic: all plugin API key checks and network calls go through shared interfaces. Connection errors (like 104), 401, and 400 are surfaced directly from the plugin daemon and mapped to unified error types for the UI. There are no plugin-specific overrides for Tongyi Qianwen or Jina—so any network, credential, or configuration issue will result in these errors (source).

If you follow these steps and still see the error, please share details about your network setup, Docker Compose configuration, and any relevant logs for deeper analysis.

To reply, just mention @dosu.


How did I do? Good | Irrelevant | Incorrect | Verbose | Hallucination | Report 🐛 | Other  Chat with Dosu Join Discord Share on X

@dosubot[bot] commented on GitHub (Aug 12, 2025): <!-- Answer --> The "Connection reset by peer" (104) error, along with 401 and 400 errors when configuring Tongyi Qianwen and Jina plugins, is most often caused by network connectivity issues, invalid API keys, or misconfiguration in a self-hosted Docker setup. Here’s a focused troubleshooting checklist: 1. **Check outbound network access**: The plugin_daemon container must have internet access to reach external APIs and, for Tongyi, to install dependencies on first run. If your environment was cloned from another network, dependencies may not be installed. Temporarily allow outbound access, restart Dify, and let the plugin initialize fully. Afterward, you can re-apply restrictions if needed ([source](https://github.com/langgenius/dify/issues/20325#issuecomment-2914653190)). 2. **Validate Docker network and PLUGIN_DAEMON_URL**: Make sure all Dify containers (web, API, plugin_daemon) are on the same Docker network and that the `PLUGIN_DAEMON_URL` is set correctly. Misconfiguration here can cause internal server errors and plugin connectivity failures ([source](https://github.com/langgenius/dify/issues/20325#issuecomment-2914653190)). 3. **Confirm API key validity and format**: Double-check that your API keys are correct, have the necessary permissions, and are entered in the expected format. Invalid or missing keys will result in 401 Unauthorized or 400 Bad Request errors ([source](https://github.com/langgenius/dify/blob/de0dae9d9b98e5d39d672024c5bb43c721a7fcd6/api/core/plugin/impl/model.py)). 4. **Update plugin_daemon image and increase resources**: Outdated plugin_daemon images or insufficient system resources (memory, threads) can cause connection errors. Update the image and ensure your host meets or exceeds recommended specs ([source](https://github.com/langgenius/dify/issues/15201#issuecomment-2705705458)). 5. **Advanced diagnostics**: If the above steps don’t resolve the issue, check for firewall or proxy restrictions, review `/etc/hosts` in your containers (especially if using services behind Cloudflare or similar), and consider running the plugin_daemon in debug mode for more detailed logs ([source](https://github.com/langgenius/dify/issues/13775)). Dify’s plugin credential validation and error handling are generic: all plugin API key checks and network calls go through shared interfaces. Connection errors (like 104), 401, and 400 are surfaced directly from the plugin daemon and mapped to unified error types for the UI. There are no plugin-specific overrides for Tongyi Qianwen or Jina—so any network, credential, or configuration issue will result in these errors ([source](https://github.com/langgenius/dify/blob/de0dae9d9b98e5d39d672024c5bb43c721a7fcd6/api/core/plugin/impl/base.py)). If you follow these steps and still see the error, please share details about your network setup, Docker Compose configuration, and any relevant logs for deeper analysis. <!-- Dosu Comment Footer --> *To reply, just mention [@dosu](https://go.dosu.dev/dosubot).* --- <sup>How did I do? [Good](https://app.dosu.dev/response-feedback/e03ae41b-a6cd-44a6-8170-4f673468a1fb?feedback_type=great_response) | [Irrelevant](https://app.dosu.dev/response-feedback/e03ae41b-a6cd-44a6-8170-4f673468a1fb?feedback_type=irrelevant_answer) | [Incorrect](https://app.dosu.dev/response-feedback/e03ae41b-a6cd-44a6-8170-4f673468a1fb?feedback_type=incorrect_sources) | [Verbose](https://app.dosu.dev/response-feedback/e03ae41b-a6cd-44a6-8170-4f673468a1fb?feedback_type=too_verbose) | [Hallucination](https://app.dosu.dev/response-feedback/e03ae41b-a6cd-44a6-8170-4f673468a1fb?feedback_type=hallucination) | [Report 🐛](https://app.dosu.dev/response-feedback/e03ae41b-a6cd-44a6-8170-4f673468a1fb?feedback_type=bug_report) | [Other](https://app.dosu.dev/response-feedback/e03ae41b-a6cd-44a6-8170-4f673468a1fb?feedback_type=other)</sup>&nbsp;&nbsp;[![Chat with Dosu](https://dosu.dev/dosu-chat-badge.svg)](https://app.dosu.dev/6088a4f4-073a-43f3-b3d4-4f06fb0c05a0/ask?utm_source=github)&nbsp;[![Join Discord](https://img.shields.io/badge/join-5865F2?logo=discord&logoColor=white&label=)](https://go.dosu.dev/discord-bot)&nbsp;[![Share on X](https://img.shields.io/badge/X-share-black)](https://twitter.com/intent/tweet?text=%40dosu_ai%20helped%20me%20solve%20this%20issue!&url=https%3A//github.com/langgenius/dify/issues/23818)
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langgenius/dify#16089