An error occurred setting up the container

@revant_one
I’m using Docker Development Environment. I tried to open the Development Containers I’m getting this error.

Note: Im using ERPNext-15

[2023-11-09T14:20:17.208Z] [+] Running 3/4
 ✔ Container frappe_docker_erp15_1_devcontainer-mariadb-1      Started     0.6s 
 ✔ Container frappe_docker_erp15_1_devcontainer-redis-cache-1  Started     0.8s 
 ✔ Container frappe_docker_erp15_1_devcontainer-redis-queue-1  Started     0.6s 
 ⠿ Container frappe_docker_erp15_1_devcontainer-frappe-1       Starting    0.8s 
Error response from daemon: driver failed programming external connectivity on endpoint frappe_docker_erp15_1_devcontainer-frappe-1 (78728ad51f7b484967e2d96905075bcb7396ad16b9eb1de8f5e2a18331b0c3d1): Error starting userland proxy: listen tcp4 0.0.0.0:9004: bind: address already in use
[2023-11-09T14:20:17.211Z] Stop (867 ms): Run: docker compose --project-name frappe_docker_erp15_1_devcontainer -f /home/softsuave/_practice/erp/erp15/frappe_docker_erp15_1/.devcontainer/docker-compose.yml -f /home/softsuave/.config/Code/User/globalStorage/ms-vscode-remote.remote-containers/data/docker-compose/docker-compose.devcontainer.containerFeatures-1699539616344.yml up -d
[2023-11-09T14:20:17.211Z] Error: Command failed: docker compose --project-name frappe_docker_erp15_1_devcontainer -f /home/softsuave/_practice/erp/erp15/frappe_docker_erp15_1/.devcontainer/docker-compose.yml -f /home/softsuave/.config/Code/User/globalStorage/ms-vscode-remote.remote-containers/data/docker-compose/docker-compose.devcontainer.containerFeatures-1699539616344.yml up -d
[2023-11-09T14:20:17.211Z]     at sAA (/home/softsuave/.vscode/extensions/ms-vscode-remote.remote-containers-0.321.0/dist/spec-node/devContainersSpecCLI.js:427:3165)
[2023-11-09T14:20:17.211Z]     at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
[2023-11-09T14:20:17.211Z]     at async oAA (/home/softsuave/.vscode/extensions/ms-vscode-remote.remote-containers-0.321.0/dist/spec-node/devContainersSpecCLI.js:409:3170)
[2023-11-09T14:20:17.211Z]     at async NAA (/home/softsuave/.vscode/extensions/ms-vscode-remote.remote-containers-0.321.0/dist/spec-node/devContainersSpecCLI.js:479:3833)
[2023-11-09T14:20:17.211Z]     at async vC (/home/softsuave/.vscode/extensions/ms-vscode-remote.remote-containers-0.321.0/dist/spec-node/devContainersSpecCLI.js:479:4775)
[2023-11-09T14:20:17.212Z]     at async etA (/home/softsuave/.vscode/extensions/ms-vscode-remote.remote-containers-0.321.0/dist/spec-node/devContainersSpecCLI.js:613:10941)
[2023-11-09T14:20:17.212Z]     at async AtA (/home/softsuave/.vscode/extensions/ms-vscode-remote.remote-containers-0.321.0/dist/spec-node/devContainersSpecCLI.js:613:10682)
[2023-11-09T14:20:17.214Z] Stop (212594 ms): Run: /usr/share/code/code --ms-enable-electron-run-as-node /home/softsuave/.vscode/extensions/ms-vscode-remote.remote-containers-0.321.0/dist/spec-node/devContainersSpecCLI.js up --user-data-folder /home/softsuave/.config/Code/User/globalStorage/ms-vscode-remote.remote-containers/data --container-session-data-folder /tmp/devcontainers-60d292ad-04f4-4948-96d6-91a02cc7bfa11699539403963 --workspace-folder /home/softsuave/_practice/erp/erp15/frappe_docker_erp15_1 --workspace-mount-consistency cached --id-label devcontainer.local_folder=/home/softsuave/_practice/erp/erp15/frappe_docker_erp15_1 --id-label devcontainer.config_file=/home/softsuave/_practice/erp/erp15/frappe_docker_erp15_1/.devcontainer/devcontainer.json --log-level debug --log-format json --config /home/softsuave/_practice/erp/erp15/frappe_docker_erp15_1/.devcontainer/devcontainer.json --default-user-env-probe loginInteractiveShell --mount type=volume,source=vscode,target=/vscode,external=true --skip-post-create --update-remote-user-uid-default on --mount-workspace-git-root
[2023-11-09T14:20:17.214Z] Exit code 1
[2023-11-09T14:20:17.217Z] Command failed: /usr/share/code/code --ms-enable-electron-run-as-node /home/softsuave/.vscode/extensions/ms-vscode-remote.remote-containers-0.321.0/dist/spec-node/devContainersSpecCLI.js up --user-data-folder /home/softsuave/.config/Code/User/globalStorage/ms-vscode-remote.remote-containers/data --container-session-data-folder /tmp/devcontainers-60d292ad-04f4-4948-96d6-91a02cc7bfa11699539403963 --workspace-folder /home/softsuave/_practice/erp/erp15/frappe_docker_erp15_1 --workspace-mount-consistency cached --id-label devcontainer.local_folder=/home/softsuave/_practice/erp/erp15/frappe_docker_erp15_1 --id-label devcontainer.config_file=/home/softsuave/_practice/erp/erp15/frappe_docker_erp15_1/.devcontainer/devcontainer.json --log-level debug --log-format json --config /home/softsuave/_practice/erp/erp15/frappe_docker_erp15_1/.devcontainer/devcontainer.json --default-user-env-probe loginInteractiveShell --mount type=volume,source=vscode,target=/vscode,external=true --skip-post-create --update-remote-user-uid-default on --mount-workspace-git-root
[2023-11-09T14:20:17.217Z] Exit code 1

use different ports or stop anything else running on same port

1 Like

Thank you, I Killed the service using this command

sudo fuser -k 9004/tcp

After restarting the container its working

1 Like