Source code private deployment exception #8311

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

Originally created by @levin950825 on GitHub (Feb 16, 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

0.15.3

Cloud or Self Hosted

Self Hosted (Source)

Steps to reproduce

I used the source code deployment method on the server. After deployment, some console APIs are still using 127.0.0.1, and the knowledge base is continuously queued, as shown in the picture.
Image

Image

✔️ Expected Behavior

No response

Actual Behavior

No response

Originally created by @levin950825 on GitHub (Feb 16, 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 0.15.3 ### Cloud or Self Hosted Self Hosted (Source) ### Steps to reproduce I used the source code deployment method on the server. After deployment, some console APIs are still using 127.0.0.1, and the knowledge base is continuously queued, as shown in the picture. <img width="1050" alt="Image" src="https://github.com/user-attachments/assets/c963a659-75bf-471a-81fb-1388296cdd87" /> <img width="1692" alt="Image" src="https://github.com/user-attachments/assets/e8e4dfb3-969a-4407-b390-8576264e417f" /> ### ✔️ Expected Behavior _No response_ ### ❌ Actual Behavior _No response_
yindo added the 🐞 bug🤔 cant-reproduce labels 2026-02-21 18:25:02 -05:00
yindo closed this issue 2026-02-21 18:25:02 -05:00
Author
Owner

@dosubot[bot] commented on GitHub (Feb 16, 2025):

Hello @levin950825! 👋 I'm here to help you with bug fixes, answer questions, and guide you on becoming a contributor. If you need assistance, feel free to ask!

I found a similar unsolved discussion titled "[Help] localhost:3000 not launching the app on npm run dev" [1]. Additionally, there is a closed issue related to a similar error: "Error occurred prerendering page '/api/parameters'. Read more: https://nextjs.org/docs/messages/prerender-error Error: connect ECONNREFUSED 127.0.0.1:80" [2].

To address the ERR_CONNECTION_REFUSED errors for API requests to 127.0.0.1:5001, ensure that the API server is running and listening on the correct address and port. You should start the API server with the following command:

flask run --host 0.0.0.0 --port=5001 --debug

This command ensures that the server listens on all available network interfaces (0.0.0.0), which is necessary if you are accessing the server from a different machine or a containerized environment. Additionally, make sure that the necessary middleware services like PostgreSQL, Redis, and Weaviate are set up using Docker Compose. You can start these services with:

cd docker
cp middleware.env.example middleware.env
docker compose -f docker-compose.middleware.yaml up -d

Ensure that there are no firewall rules blocking the connection to port 5001, and verify that the Python environment is correctly set up with Python 3.12 and all dependencies are installed using Poetry [3][4][5].

Regarding the knowledge base being continuously queued, this is commonly caused by reaching the rate limit for the Embedding model API key used [6].

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 (Feb 16, 2025): <!-- Greeting --> Hello @levin950825! 👋 I'm here to help you with bug fixes, answer questions, and guide you on becoming a contributor. If you need assistance, feel free to ask! <!-- Answer --> I found a similar unsolved discussion titled "[Help] localhost:3000 not launching the app on npm run dev" <sup>[[1]](https://github.com/langgenius/dify/discussions/12720)</sup>. Additionally, there is a closed issue related to a similar error: "Error occurred prerendering page '/api/parameters'. Read more: https://nextjs.org/docs/messages/prerender-error Error: connect ECONNREFUSED 127.0.0.1:80" <sup>[[2]](https://github.com/langgenius/dify/issues/1632)</sup>. To address the `ERR_CONNECTION_REFUSED` errors for API requests to `127.0.0.1:5001`, ensure that the API server is running and listening on the correct address and port. You should start the API server with the following command: ```bash flask run --host 0.0.0.0 --port=5001 --debug ``` This command ensures that the server listens on all available network interfaces (`0.0.0.0`), which is necessary if you are accessing the server from a different machine or a containerized environment. Additionally, make sure that the necessary middleware services like PostgreSQL, Redis, and Weaviate are set up using Docker Compose. You can start these services with: ```bash cd docker cp middleware.env.example middleware.env docker compose -f docker-compose.middleware.yaml up -d ``` Ensure that there are no firewall rules blocking the connection to port 5001, and verify that the Python environment is correctly set up with Python 3.12 and all dependencies are installed using Poetry <sup>[[3]](https://github.com/langgenius/dify-docs/blob/main/lang-check/commit-79f79-0214.txt)</sup><sup>[[4]](https://github.com/langgenius/dify-docs/blob/main/jp/getting-started/install-self-hosted/local-source-code.md)</sup><sup>[[5]](https://github.com/langgenius/dify-docs/blob/main/zh_CN/getting-started/install-self-hosted/local-source-code.md)</sup>. Regarding the knowledge base being continuously queued, this is commonly caused by reaching the rate limit for the Embedding model API key used <sup>[[6]](https://github.com/langgenius/dify-docs/blob/main/en/guides/application-orchestrate/llms-use-faq.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/986374d9-48c1-47c8-9743-16eca964c394?feedback_type=great_response) | [Irrelevant Answer](https://app.dosu.dev/response-feedback/986374d9-48c1-47c8-9743-16eca964c394?feedback_type=irrelevant_answer) | [Incorrect Sources](https://app.dosu.dev/response-feedback/986374d9-48c1-47c8-9743-16eca964c394?feedback_type=incorrect_sources) | [Too Verbose](https://app.dosu.dev/response-feedback/986374d9-48c1-47c8-9743-16eca964c394?feedback_type=too_verbose) | [Hallucination](https://app.dosu.dev/response-feedback/986374d9-48c1-47c8-9743-16eca964c394?feedback_type=hallucination) | [Bug Report](https://app.dosu.dev/response-feedback/986374d9-48c1-47c8-9743-16eca964c394?feedback_type=bug_report) | [Other](https://app.dosu.dev/response-feedback/986374d9-48c1-47c8-9743-16eca964c394?feedback_type=other)</sup>
Author
Owner

@crazywoola commented on GitHub (Feb 16, 2025):

Check the environment settings.

If you are using source code to start the project, we assume you have the ability to resolve the issues you have encountered. Especial those programming basics.

@crazywoola commented on GitHub (Feb 16, 2025): Check the environment settings. If you are using source code to start the project, we assume you have the ability to resolve the issues you have encountered. Especial those programming basics.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langgenius/dify#8311