504 timeout error occurs during model provider registration in proxy environment #11058

Closed
opened 2026-02-21 18:54:25 -05:00 by yindo · 0 comments
Owner

Originally created by @Okazaki-Eishin on GitHub (Mar 14, 2025).

Originally assigned to: @Yeuoly on GitHub.

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

Cloud or Self Hosted

Self Hosted (Docker)

Steps to reproduce

I'm experiencing timeout errors when configuring Azure OpenAI models or Vertex AI models as providers in the self-hosted Dify v1.0.0. I'm hosting Dify in a closed network with a proxy environment, where all network outbound connections go through a proxy. I'm using environment variables like HTTP_PROXY in each container.

Suspected Cause

The PluginDaemon container uses uv pip install to install modules for each provider. In a proxy environment, it seems the --proxy option is being added, but uv pip doesn't have a --proxy option, which might be causing the error. It appears to be repeatedly attempting installation. (In v0.15.3, regular pip was used, which has a --proxy option, so this error didn't occur)

What I've Tried

Checking v0.15.3:

  • It works normally.

Checking if the same issue occurs in a public environment:

  • Deployed Dify v1.0.0 in a public environment (without using a proxy)
  • When distributed via Cloudfront instead of internal ALB, the issue did not occur.

Building Plugin Daemon using this repository:

Deploying with v1.0.1:

  • The same error occurred.

Error logs

2025/03/12 05:46:47 runtime_lifetime.go:76: [ERROR]init environment failed: failed to install dependencies: exit status 2, output: error: unexpected argument '--proxy' found

PluginDaemon

2025年3月12日 14:46 (UTC+9:00)

tip: a similar argument exists: '--prefix'

PluginDaemon

2025年3月12日 14:46 (UTC+9:00)

Usage: uv pip install --prefix <PREFIX> <PACKAGE|--requirements <REQUIREMENTS>|--editable <EDITABLE>>

PluginDaemon

2025年3月12日 14:46 (UTC+9:00)

For more information, try '--help'.

PluginDaemon

2025年3月12日 14:46 (UTC+9:00)

, retry in 30s

PluginDaemon

2025年3月12日 14:46 (UTC+9:00)

2025/03/12 05:46:47 runtime_lifetime.go:70: [INFO]init environment for plugin langgenius/azure_openai:0.0.8

PluginDaemon

2025年3月12日 14:46 (UTC+9:00)

2025/03/12 05:46:39 runtime_lifetime.go:76: [ERROR]init environment failed: failed to install dependencies: exit status 2, output: error: unexpected argument '--proxy' found

PluginDaemon

2025年3月12日 14:46 (UTC+9:00)

tip: a similar argument exists: '--prefix'

PluginDaemon

2025年3月12日 14:46 (UTC+9:00)

Usage: uv pip install --prefix <PREFIX> <PACKAGE|--requirements <REQUIREMENTS>|--editable <EDITABLE>>

PluginDaemon

2025年3月12日 14:46 (UTC+9:00)

For more information, try '--help'.

PluginDaemon

2025年3月12日 14:46 (UTC+9:00)

, retry in 30s

PluginDaemon

2025年3月12日 14:46 (UTC+9:00)

2025/03/12 05:46:39 runtime_lifetime.go:70: [INFO]init environment for plugin langgenius/vertex_ai:0.0.7

PluginDaemon

2025年3月12日 14:46 (UTC+9:00)

tip: a similar argument exists: '--prefix'

PluginDaemon

✔️ Expected Behavior

Can successfully register and use model providers

Actual Behavior

Timeout Error

Originally created by @Okazaki-Eishin on GitHub (Mar 14, 2025). Originally assigned to: @Yeuoly on GitHub. ### 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.0.0 ### Cloud or Self Hosted Self Hosted (Docker) ### Steps to reproduce I'm experiencing timeout errors when configuring Azure OpenAI models or Vertex AI models as providers in the self-hosted Dify v1.0.0. I'm hosting Dify in a closed network with a proxy environment, where all network outbound connections go through a proxy. I'm using environment variables like HTTP_PROXY in each container. ### Suspected Cause The PluginDaemon container uses uv pip install to install modules for each provider. In a proxy environment, it seems the --proxy option is being added, but uv pip doesn't have a --proxy option, which might be causing the error. It appears to be repeatedly attempting installation. (In v0.15.3, regular pip was used, which has a --proxy option, so this error didn't occur) ### What I've Tried **Checking v0.15.3:** - It works normally. **Checking if the same issue occurs in a public environment:** - Deployed Dify v1.0.0 in a public environment (without using a proxy) - When distributed via Cloudfront instead of internal ALB, the issue did not occur. **Building Plugin Daemon using this repository:** - https://github.com/langgenius/dify-plugin-daemon/pull/59 - Although it seemed to debug the timeout error, the same issue persisted. **Deploying with v1.0.1:** - The same error occurred. ### Error logs ``` 2025/03/12 05:46:47 runtime_lifetime.go:76: [ERROR]init environment failed: failed to install dependencies: exit status 2, output: error: unexpected argument '--proxy' found PluginDaemon 2025年3月12日 14:46 (UTC+9:00) tip: a similar argument exists: '--prefix' PluginDaemon 2025年3月12日 14:46 (UTC+9:00) Usage: uv pip install --prefix <PREFIX> <PACKAGE|--requirements <REQUIREMENTS>|--editable <EDITABLE>> PluginDaemon 2025年3月12日 14:46 (UTC+9:00) For more information, try '--help'. PluginDaemon 2025年3月12日 14:46 (UTC+9:00) , retry in 30s PluginDaemon 2025年3月12日 14:46 (UTC+9:00) 2025/03/12 05:46:47 runtime_lifetime.go:70: [INFO]init environment for plugin langgenius/azure_openai:0.0.8 PluginDaemon 2025年3月12日 14:46 (UTC+9:00) 2025/03/12 05:46:39 runtime_lifetime.go:76: [ERROR]init environment failed: failed to install dependencies: exit status 2, output: error: unexpected argument '--proxy' found PluginDaemon 2025年3月12日 14:46 (UTC+9:00) tip: a similar argument exists: '--prefix' PluginDaemon 2025年3月12日 14:46 (UTC+9:00) Usage: uv pip install --prefix <PREFIX> <PACKAGE|--requirements <REQUIREMENTS>|--editable <EDITABLE>> PluginDaemon 2025年3月12日 14:46 (UTC+9:00) For more information, try '--help'. PluginDaemon 2025年3月12日 14:46 (UTC+9:00) , retry in 30s PluginDaemon 2025年3月12日 14:46 (UTC+9:00) 2025/03/12 05:46:39 runtime_lifetime.go:70: [INFO]init environment for plugin langgenius/vertex_ai:0.0.7 PluginDaemon 2025年3月12日 14:46 (UTC+9:00) tip: a similar argument exists: '--prefix' PluginDaemon ``` ### ✔️ Expected Behavior Can successfully register and use model providers ### ❌ Actual Behavior Timeout Error
yindo added the 🐞 bug label 2026-02-21 18:54:25 -05:00
yindo closed this issue 2026-02-21 18:54:25 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langgenius/dify#11058