[root@VM-0-9-centos docker]# docker-compose up -d
WARNING: The CERTBOT_EMAIL variable is not set. Defaulting to a blank string.
WARNING: The CERTBOT_DOMAIN variable is not set. Defaulting to a blank string.
Creating docker_web_1 ...
Creating docker_sandbox_1 ... error
Creating docker_ssrf_proxy_1 ...
Creating docker_redis_1 ...
Creating docker_db_1 ...
Creating docker_weaviate_1 ...
Creating docker_web_1 ... error
container process: error during container init: error running hook #0: error running hook: exit status 1, stdout: , stderr: time="2024-08-28T13:41:45+08:00" level=fatal msg="no such file or directory": unknown
ERROR: for docker_redis_1 Cannot start service redis: failed to create shim task: OCI runtime create failed: runc create failed: unable to start container process: error during container init: %!w(<nil>): unknown
ERROR: for docker_web_1 Cannot start service web: failed to create shim task: OCI runtime create failed: runc create failed: unable to start containeCreating docker_db_1 ... error
evel=fatal msg="no such file or directory": unknown
ERROR: for docker_db_1 Cannot start service db: failed to create shim task: OCI runtime create failed: runc create failed: unable to start container process: error during container init: error running hook #0: error running hook: exit status 1, stdout: , stderr: time="2024-08-28T13:41:46+08:00" levCreating docker_ssrf_proxy_1 ... error
ERROR: for docker_weaviate_1 Cannot start service weaviate: failed to create shim task: OCI runtime create failed: runc create failed: unable to start container process: error during container init: writing syncT "procResume": write init-p: broken pipe: unknown
ERROR: for docker_ssrf_proxy_1 Cannot start service ssrf_proxy: failed to create shim task: OCI runtime create failed: runc create failed: unable to start container process: error during container init: writing syncT "procResume": write init-p: broken pipe: unknown
ERROR: for sandbox Cannot start service sandbox: failed to create shim task: OCI runtime create failed: runc create failed: unable to start container process: error during container init: error running hook #0: error running hook: exit status 1, stdout: , stderr: time="2024-08-28T13:41:45+08:00" level=fatal msg="no such file or directory": unknown
ERROR: for redis Cannot start service redis: failed to create shim task: OCI runtime create failed: runc create failed: unable to start container process: error during container init: %!w(<nil>): unknown
ERROR: for web Cannot start service web: failed to create shim task: OCI runtime create failed: runc create failed: unable to start container process: error during container init: error running hook #0: error running hook: exit status 1, stdout: , stderr: time="2024-08-28T13:41:45+08:00" level=fatal msg="no such file or directory": unknown
ERROR: for db Cannot start service db: failed to create shim task: OCI runtime create failed: runc create failed: unable to start container process: error during container init: error running hook #0: error running hook: exit status 1, stdout: , stderr: time="2024-08-28T13:41:46+08:00" level=fatal msg="no such file or directory": unknown
ERROR: for weaviate Cannot start service weaviate: failed to create shim task: OCI runtime create failed: runc create failed: unable to start container process: error during container init: writing syncT "procResume": write init-p: broken pipe: unknown
ERROR: for ssrf_proxy Cannot start service ssrf_proxy: failed to create shim task: OCI runtime create failed: runc create failed: unable to start container process: error during container init: writing syncT "procResume": write init-p: broken pipe: unknown
ERROR: Encountered errors while bringing up the project.
✔️ Expected Behavior
normally work
❌ Actual Behavior
cause error
@qq253498229 Hello! I'm here to help you with any bugs, questions, or contributions you may have. Let's work together to solve this issue.
I found some similar issues that might help you resolve the "failed to create shim task: OCI runtime create failed" errors:
Code execution service is unavailable (closed):
The issue was related to network access problems caused by proxy settings. The solution was to add sandbox
to the NO_PROXY
environment variable in the docker-compose.yaml
file:
NO_PROXY: 'localhost,127.0.0.1,172.17.*.*, .local, weaviate, sandbox'
Start Dify:
Navigate to the docker directory in the Dify source code and execute the following commands:
cd dify/docker
cp .env.example .env
docker compose up -d
Check Docker Compose Version:
If your system has Docker Compose V2 installed, use docker compose
instead of docker-compose
. Verify this by running:
Ensure All Containers Are Running Successfully:
After running docker compose up -d
, check the status of all containers:
If the issue persists, it may be related to system resource constraints or specific Docker runtime configurations. Ensure that your Docker environment has sufficient resources allocated and that there are no conflicting configurations [1][2][3][4].
To continue talking to Dosu, mention @dosu.
@qq253498229 Hello! I'm here to help you with any bugs, questions, or contributions you may have. Let's work together to solve this issue.
I found some similar issues that might help you resolve the "failed to create shim task: OCI runtime create failed" errors:
Code execution service is unavailable (closed):
The issue was related to network access problems caused by proxy settings. The solution was to add sandbox
to the NO_PROXY
environment variable in the docker-compose.yaml
file:
NO_PROXY: 'localhost,127.0.0.1,172.17.*.*, .local, weaviate, sandbox'
Start Dify:
Navigate to the docker directory in the Dify source code and execute the following commands:
cd dify/docker
cp .env.example .env
docker compose up -d
Check Docker Compose Version:
If your system has Docker Compose V2 installed, use docker compose
instead of docker-compose
. Verify this by running:
Ensure All Containers Are Running Successfully:
After running docker compose up -d
, check the status of all containers:
If the issue persists, it may be related to system resource constraints or specific Docker runtime configurations. Ensure that your Docker environment has sufficient resources allocated and that there are no conflicting configurations [1][2][3][4].
To continue talking to Dosu, mention @dosu.
@crazywoola I'm sorry, but none of these solutions solve my problem
You need the whole docker/ directory to run the application.
What exactly do you mean by that statement?
I tried to start the db app individually, and the console reported the following error:
[root@VM-0-9-centos docker]# docker-compose up -d db
WARNING: The CERTBOT_EMAIL variable is not set. Defaulting to a blank string.
WARNING: The CERTBOT_DOMAIN variable is not set. Defaulting to a blank string.
Creating docker_db_1 ... error
ERROR: for docker_db_1 Cannot start service db: failed to create shim task: OCI runtime create failed: runc create failed: unable to start container process: error during container init: %!w(<nil>): unknown
ERROR: for db Cannot start service db: failed to create shim task: OCI runtime create failed: runc create failed: unable to start container process: error during container init: %!w(<nil>): unknown
ERROR: Encountered errors while bringing up the project.
This is system information:
[root@VM-0-9-centos docker]# uname -a
Linux VM-0-9-centos 4.18.0-348.7.1.el8_5.x86_64 #1 SMP Wed Dec 22 13:25:12 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux
[root@VM-0-9-centos docker]# cat /etc/os-release
NAME="CentOS Linux"
VERSION="8"
ID="centos"
ID_LIKE="rhel fedora"
VERSION_ID="8"
PLATFORM_ID="platform:el8"
PRETTY_NAME="CentOS Linux 8"
ANSI_COLOR="0;31"
CPE_NAME="cpe:/o:centos:centos:8"
HOME_URL="https://centos.org/"
BUG_REPORT_URL="https://bugs.centos.org/"
CENTOS_MANTISBT_PROJECT="CentOS-8"
CENTOS_MANTISBT_PROJECT_VERSION="8"
[root@VM-0-9-centos docker]# arch
x86_64
I have updated Docker, but there are still issues after using Docker Compose.
What else would you call a bug if this isn't one? I don't understand why you are ignoring user issues, which is very disappointing.
[root@VM-0-9-centos docker]# docker compose version
Docker Compose version v2.27.0
[root@VM-0-9-centos docker]# docker version
Client: Docker Engine - Community
Version: 26.1.3
API version: 1.45
Go version: go1.21.10
Git commit: b72abbb
Built: Thu May 16 08:34:39 2024
OS/Arch: linux/amd64
Context: default
Server: Docker Engine - Community
Engine:
Version: 26.1.3
API version: 1.45 (minimum version 1.24)
Go version: go1.21.10
Git commit: 8e96db1
Built: Thu May 16 08:33:34 2024
OS/Arch: linux/amd64
Experimental: false
containerd:
Version: 1.6.32
GitCommit: 8b3b7ca2e5ce38e8f31a34f35b2b68ceb8470d89
runc:
Version: 1.1.12
GitCommit: v1.1.12-0-g51d5e94
docker-init:
Version: 0.19.0
GitCommit: de40ad0
[root@VM-0-9-centos docker]# docker compose up -d db
WARN[0000] The "CERTBOT_EMAIL" variable is not set. Defaulting to a blank string.
WARN[0000] The "CERTBOT_DOMAIN" variable is not set. Defaulting to a blank string.
[+] Running 0/1
⠴ Container docker-db-1 Starting 2.5s
Error response from daemon: 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 running hook #0: error running hook: exit status 1, stdout: , stderr: bind-mount /proc/2672746/ns/net -> /var/run/docker/netns/44c39b124b47: no such file or directory: unknown
I am very disappointed with you, and you don't need to answer my question anymore.
I still believe that your problem is specific to your environment and not a bug in the Dify.
Since Dify uses the official PostgreSQL image from Docker without any special tweaks, it is very unlikely that it is the Dify implementation that is causing the db container to fail to boot.
If it really is a bug, but even in that case it would be a bug in Docker or the container runtime, not in Dify.
stderr: bind-mount /proc/2672746/ns/net -> /var/run/docker/netns/44c39b124b47: no such file or directory: unknown
This behavior is performed internally by the container runtime when creating a container or a container network, and has nothing to do with the Dify implementation.
I reccomend you to:
Stop all containers in your docker host
Reboot your docker host
Ensure you have dify/docker/.env
file by copying dify/docker/.env.example
file
docker compose up -d db
Open new discussion topic if your issue persists