docker-compose restart fails #609

Closed
opened 2026-02-21 17:27:45 -05:00 by yindo · 4 comments
Owner

Originally created by @yangboz on GitHub (Oct 21, 2023).

Originally assigned to: @takatost, @crazywoola on GitHub.

Dify version

0.3.28

Cloud or Self Hosted

Cloud

Steps to reproduce

while testing docker-compose up. on AWS Linux on EC2 instance after docker-compose restart,

image

docker logs of dify_nginx_1

it output as following:

ERROR: for dify_nginx_1  Cannot start service nginx: failed to create task for container: failed to create shim task: OCI runtime create failed: runc create failed: unable to start container process: error during container init: error mounting "/home/ec2-user/dify/nginx/nginx.conf" to rootfs at "/etc/nginx/nginx.conf": mount /home/ec2-user/dify/nginx/nginx.conf:/etc/nginx/nginx.conf (via /proc/self/fd/6), flags: 0x5000: not a directory: unknown: Are you trying to mount a directory onto a file (or vice-versa)? Check if the specified host path exists and is the expected type

ERROR: for nginx  Cannot start service nginx: failed to create task for container: failed to create shim task: OCI runtime create failed: runc create failed: unable to start container process: error during container init: error mounting "/home/ec2-user/dify/nginx/nginx.conf" to rootfs at "/etc/nginx/nginx.conf": mount /home/ec2-user/dify/nginx/nginx.conf:/etc/nginx/nginx.conf (via /proc/self/fd/6), flags: 0x5000: not a directory: unknown: Are you trying to mount a directory onto a file (or vice-versa)? Check if the specified host path exists and is the expected type

any idea ?thanks.

✔️ Expected Behavior

all service get ready as local Macosx 13+ works.

Actual Behavior

image

Originally created by @yangboz on GitHub (Oct 21, 2023). Originally assigned to: @takatost, @crazywoola on GitHub. ### Dify version 0.3.28 ### Cloud or Self Hosted Cloud ### Steps to reproduce while testing docker-compose up. on AWS Linux on EC2 instance after docker-compose restart, ![image](https://github.com/langgenius/dify/assets/481954/e6fc8825-e75e-453b-b8f9-e28f7770596e) docker logs of dify_nginx_1 it output as following: ``` ERROR: for dify_nginx_1 Cannot start service nginx: failed to create task for container: failed to create shim task: OCI runtime create failed: runc create failed: unable to start container process: error during container init: error mounting "/home/ec2-user/dify/nginx/nginx.conf" to rootfs at "/etc/nginx/nginx.conf": mount /home/ec2-user/dify/nginx/nginx.conf:/etc/nginx/nginx.conf (via /proc/self/fd/6), flags: 0x5000: not a directory: unknown: Are you trying to mount a directory onto a file (or vice-versa)? Check if the specified host path exists and is the expected type ERROR: for nginx Cannot start service nginx: failed to create task for container: failed to create shim task: OCI runtime create failed: runc create failed: unable to start container process: error during container init: error mounting "/home/ec2-user/dify/nginx/nginx.conf" to rootfs at "/etc/nginx/nginx.conf": mount /home/ec2-user/dify/nginx/nginx.conf:/etc/nginx/nginx.conf (via /proc/self/fd/6), flags: 0x5000: not a directory: unknown: Are you trying to mount a directory onto a file (or vice-versa)? Check if the specified host path exists and is the expected type ``` any idea ?thanks. ### ✔️ Expected Behavior all service get ready as local Macosx 13+ works. ### ❌ Actual Behavior ![image](https://github.com/langgenius/dify/assets/481954/d66adf3a-88fb-43fc-8990-ee6bf52fa9c1)
yindo added the 🐞 bug label 2026-02-21 17:27:45 -05:00
yindo closed this issue 2026-02-21 17:27:45 -05:00
Author
Owner

@yangboz commented on GitHub (Oct 22, 2023):

Dify version

0.3.28

Cloud or Self Hosted

Cloud

Steps to reproduce

while testing docker-compose up. on AWS Linux on EC2 instance after docker-compose restart,

image

docker logs of dify_nginx_1

it output as following:

ERROR: for dify_nginx_1  Cannot start service nginx: failed to create task for container: failed to create shim task: OCI runtime create failed: runc create failed: unable to start container process: error during container init: error mounting "/home/ec2-user/dify/nginx/nginx.conf" to rootfs at "/etc/nginx/nginx.conf": mount /home/ec2-user/dify/nginx/nginx.conf:/etc/nginx/nginx.conf (via /proc/self/fd/6), flags: 0x5000: not a directory: unknown: Are you trying to mount a directory onto a file (or vice-versa)? Check if the specified host path exists and is the expected type

ERROR: for nginx  Cannot start service nginx: failed to create task for container: failed to create shim task: OCI runtime create failed: runc create failed: unable to start container process: error during container init: error mounting "/home/ec2-user/dify/nginx/nginx.conf" to rootfs at "/etc/nginx/nginx.conf": mount /home/ec2-user/dify/nginx/nginx.conf:/etc/nginx/nginx.conf (via /proc/self/fd/6), flags: 0x5000: not a directory: unknown: Are you trying to mount a directory onto a file (or vice-versa)? Check if the specified host path exists and is the expected type

any idea ?thanks.

✔️ Expected Behavior

all service get ready as local Macosx 13+ works.

Actual Behavior

image

maybe related to https://stackoverflow.com/questions/35009682/amazon-linux-cannot-access-nginx-on-port-80 ?

@yangboz commented on GitHub (Oct 22, 2023): > ### Dify version > 0.3.28 > > ### Cloud or Self Hosted > Cloud > > ### Steps to reproduce > while testing docker-compose up. on AWS Linux on EC2 instance after docker-compose restart, > > ![image](https://user-images.githubusercontent.com/481954/277104372-e6fc8825-e75e-453b-b8f9-e28f7770596e.png) > > docker logs of dify_nginx_1 > > it output as following: > > ``` > ERROR: for dify_nginx_1 Cannot start service nginx: failed to create task for container: failed to create shim task: OCI runtime create failed: runc create failed: unable to start container process: error during container init: error mounting "/home/ec2-user/dify/nginx/nginx.conf" to rootfs at "/etc/nginx/nginx.conf": mount /home/ec2-user/dify/nginx/nginx.conf:/etc/nginx/nginx.conf (via /proc/self/fd/6), flags: 0x5000: not a directory: unknown: Are you trying to mount a directory onto a file (or vice-versa)? Check if the specified host path exists and is the expected type > > ERROR: for nginx Cannot start service nginx: failed to create task for container: failed to create shim task: OCI runtime create failed: runc create failed: unable to start container process: error during container init: error mounting "/home/ec2-user/dify/nginx/nginx.conf" to rootfs at "/etc/nginx/nginx.conf": mount /home/ec2-user/dify/nginx/nginx.conf:/etc/nginx/nginx.conf (via /proc/self/fd/6), flags: 0x5000: not a directory: unknown: Are you trying to mount a directory onto a file (or vice-versa)? Check if the specified host path exists and is the expected type > ``` > > any idea ?thanks. > > ### ✔️ Expected Behavior > all service get ready as local Macosx 13+ works. > > ### ❌ Actual Behavior > ![image](https://user-images.githubusercontent.com/481954/277104464-d66adf3a-88fb-43fc-8990-ee6bf52fa9c1.png) maybe related to https://stackoverflow.com/questions/35009682/amazon-linux-cannot-access-nginx-on-port-80 ?
Author
Owner

@QB-Chen commented on GitHub (Feb 9, 2024):

how to solve this problem, I meet the same problem

@QB-Chen commented on GitHub (Feb 9, 2024): how to solve this problem, I meet the same problem
Author
Owner

@QB-Chen commented on GitHub (Feb 9, 2024):

when i restart the docker container, the nginx container can not run.

@QB-Chen commented on GitHub (Feb 9, 2024): when i restart the docker container, the nginx container can not run.
Author
Owner

@QB-Chen commented on GitHub (Feb 9, 2024):

I found that it was because I put the repository in wsl, and wsl runs slower than docker containers, which caused the nginx container to not find the corresponding saved nginx.conf when it was running, so it reported this error. Later, I put the repository in the windows directory and redeployed the project to solve the problem.

@QB-Chen commented on GitHub (Feb 9, 2024): I found that it was because I put the repository in wsl, and wsl runs slower than docker containers, which caused the nginx container to not find the corresponding saved nginx.conf when it was running, so it reported this error. Later, I put the repository in the windows directory and redeployed the project to solve the problem.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langgenius/dify#609