What can I do if the dify docker-api-1 disappears? #6562

Closed
opened 2026-02-21 18:16:20 -05:00 by yindo · 3 comments
Owner

Originally created by @leild on GitHub (Nov 5, 2024).

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

Cloud or Self Hosted

Self Hosted (Docker)

Steps to reproduce

image
After running for a period of time
image

✔️ Expected Behavior

Help solve and update the nginx file every time feel very unfriendly, hope to solve all problems in one fell swoop.

Actual Behavior

Help solve and update the nginx file every time feel very unfriendly, hope to solve all problems in one fell swoop.

Originally created by @leild on GitHub (Nov 5, 2024). ### 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.10.2 ### Cloud or Self Hosted Self Hosted (Docker) ### Steps to reproduce ![image](https://github.com/user-attachments/assets/d29730cf-6878-448d-bac0-772420425f57) After running for a period of time ![image](https://github.com/user-attachments/assets/6c2404f8-565d-4f6e-be51-52d2aa68da52) ### ✔️ Expected Behavior Help solve and update the nginx file every time feel very unfriendly, hope to solve all problems in one fell swoop. ### ❌ Actual Behavior Help solve and update the nginx file every time feel very unfriendly, hope to solve all problems in one fell swoop.
yindo added the 🐞 bug label 2026-02-21 18:16:20 -05:00
yindo closed this issue 2026-02-21 18:16:20 -05:00
Author
Owner

@dosubot[bot] commented on GitHub (Nov 5, 2024):

Hey @leild! 👋 I'm here to help you with any bugs, questions, or contributions you have for the Dify project. Feel free to ask anything while we wait for a human maintainer to assist you.

If the dify docker-api-1 container disappears, you can follow these steps to resolve the issue:

  1. Ensure that the container is running by executing the following command:

    docker ps -q | xargs -n 1 docker inspect --format '{{ .Name }}: {{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}'
    
  2. Look for the line corresponding to /docker-api-1 in the output to find its IP address.

  3. Open the location where you stored the dify source code, navigate to dify/docker/nginx/conf.d, and replace http://api:5001 with the IP address you found, followed by :5001.

  4. Restart the Nginx container or reload the configuration to apply the changes.

These steps will help you reconfigure the Nginx settings to point to the correct IP address of the docker-api-1 container [1].

To continue talking to Dosu, mention @dosu.

@dosubot[bot] commented on GitHub (Nov 5, 2024): <!-- Greeting --> Hey @leild! 👋 I'm here to help you with any bugs, questions, or contributions you have for the Dify project. Feel free to ask anything while we wait for a human maintainer to assist you. <!-- Answer --> If the `dify docker-api-1` container disappears, you can follow these steps to resolve the issue: 1. Ensure that the container is running by executing the following command: ```bash docker ps -q | xargs -n 1 docker inspect --format '{{ .Name }}: {{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}' ``` 2. Look for the line corresponding to `/docker-api-1` in the output to find its IP address. 3. Open the location where you stored the dify source code, navigate to `dify/docker/nginx/conf.d`, and replace `http://api:5001` with the IP address you found, followed by `:5001`. 4. Restart the Nginx container or reload the configuration to apply the changes. These steps will help you reconfigure the Nginx settings to point to the correct IP address of the `docker-api-1` container <sup>[[1]](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.*
Author
Owner

@crazywoola commented on GitHub (Nov 5, 2024):

I don't think this problem is related to our project to be frank.

@crazywoola commented on GitHub (Nov 5, 2024): I don't think this problem is related to our project to be frank.
Author
Owner

@leild commented on GitHub (Nov 7, 2024):

The container keeps restarting because privileged: true is not added to the docker-api-1 container. As a result, the IP address cannot be changed. After privileged: true is added to langgenius/dify-api:0.10.2 and langgenius/dify-sandbox:0.2.10 docker-compose.yaml, the container is normal and does not restart.

@leild commented on GitHub (Nov 7, 2024): The container keeps restarting because privileged: true is not added to the docker-api-1 container. As a result, the IP address cannot be changed. After privileged: true is added to langgenius/dify-api:0.10.2 and langgenius/dify-sandbox:0.2.10 docker-compose.yaml, the container is normal and does not restart.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langgenius/dify#6562