compose: [BUG] not possible to run two compose projects on the same machine anymore, hang
Description
When executing step 5 it just hang forever (tried leaving it for ~45min) with:
[+] Running 1/2
✔ Network stack2_default Created 0.2s
- Container stack2-service20-1 Starting
I can do CTRL-C to terminate and then the output is “exit status 130” like so:
[+] Running 1/2
✔ Network stack2_default Created 0.2s
- Container stack2-service20-1 Starting 102.2s
exit status 130
I can’t even do docker compose -p stack1 --file ./compose.stack1.yaml down or docker compose -p stack2 --file ./compose.stack2.yaml down, it will hang in “Stopping” state…
Only way to get Docker engine to respond again is to reboot the host.
If I try to do the same as in stack1 and stack2 with:
docker run --rm -d -e ASPNETCORE_HTTP_PORTS=80 -p 7001:80 mcr.microsoft.com/dotnet/samples:aspnetapp-9.0-nanoserver-ltsc2022
docker run --rm -d -e ASPNETCORE_HTTP_PORTS=80 -p 8001:80 -p 8002:8002 mcr.microsoft.com/dotnet/samples:aspnetapp-9.0-nanoserver-ltsc2022
Then everything works as expected.
If you remove the second port in stack2, it also works as expected, strangely enough…
Steps To Reproduce
- Set engine to Windows:
docker desktop engine use windows - Create ./compose.stack1.yaml with contents:
services:
service10:
image: mcr.microsoft.com/dotnet/samples:aspnetapp-9.0-nanoserver-ltsc2022
ports:
- "7001:80"
environment:
- ASPNETCORE_URLS=http://+:80
- Create ./compose.stack2.yaml with contents:
services:
service20:
image: mcr.microsoft.com/dotnet/samples:aspnetapp-9.0-nanoserver-ltsc2022
ports:
- "8001:80"
- "8002:8002"
environment:
- ASPNETCORE_URLS=http://+:80
- Start project stack1:
docker compose -p stack1 --file ./compose.stack1.yaml up -d - Start project stack1:
docker compose -p stack2 --file ./compose.stack2.yaml up -d
Compose Version
Docker Compose version v2.33.1-desktop.1
Docker Environment
Client:
Version: 28.0.1
Context: desktop-windows
Debug Mode: false
Plugins:
ai: Docker AI Agent - Ask Gordon (Docker Inc.)
Version: v0.9.4
Path: C:\Users\pberi\.docker\cli-plugins\docker-ai.exe
buildx: Docker Buildx (Docker Inc.)
Version: v0.21.1-desktop.2
Path: C:\Users\pberi\.docker\cli-plugins\docker-buildx.exe
compose: Docker Compose (Docker Inc.)
Version: v2.33.1-desktop.1
Path: C:\Users\pberi\.docker\cli-plugins\docker-compose.exe
debug: Get a shell into any image or container (Docker Inc.)
Version: 0.0.38
Path: C:\Users\pberi\.docker\cli-plugins\docker-debug.exe
desktop: Docker Desktop commands (Beta) (Docker Inc.)
Version: v0.1.5
Path: C:\Users\pberi\.docker\cli-plugins\docker-desktop.exe
dev: Docker Dev Environments (Docker Inc.)
Version: v0.1.2
Path: C:\Users\pberi\.docker\cli-plugins\docker-dev.exe
extension: Manages Docker extensions (Docker Inc.)
Version: v0.2.27
Path: C:\Users\pberi\.docker\cli-plugins\docker-extension.exe
feedback: Provide feedback, right in your terminal! (Docker Inc.)
Version: v1.0.5
Path: C:\Users\pberi\.docker\cli-plugins\docker-feedback.exe
init: Creates Docker-related starter files for your project (Docker Inc.)
Version: v1.4.0
Path: C:\Users\pberi\.docker\cli-plugins\docker-init.exe
sbom: View the packaged-based Software Bill Of Materials (SBOM) for an image (Anchore Inc.)
Version: 0.6.0
Path: C:\Users\pberi\.docker\cli-plugins\docker-sbom.exe
scout: Docker Scout (Docker Inc.)
Version: v1.16.3
Path: C:\Users\pberi\.docker\cli-plugins\docker-scout.exe
Server:
Containers: 7
Running: 5
Paused: 0
Stopped: 2
Images: 180
Server Version: 28.0.1
Storage Driver: windowsfilter
Windows:
Logging Driver: json-file
Plugins:
Volume: local
Network: ics internal l2bridge l2tunnel nat null overlay private transparent
Log: awslogs etwlogs fluentd gcplogs gelf json-file local splunk syslog
Swarm: inactive
Default Isolation: hyperv
Kernel Version: 10.0 26100 (26100.1.amd64fre.ge_release.240331-1435)
Operating System: Microsoft Windows Version 24H2 (OS Build 26100.3323)
OSType: windows
Architecture: x86_64
CPUs: 24
Total Memory: 63.92GiB
Name: amd
ID: 2588f1d0-8302-469b-935a-2dcec18226d4
Docker Root Dir: D:\Data\Docker
Debug Mode: false
Labels:
com.docker.desktop.address=npipe://\\.\pipe\docker_cli
Experimental: false
Insecure Registries:
::1/128
127.0.0.0/8
Live Restore Enabled: false
Product License: Community Engine
Anything else?
No response
About this issue
- Original URL
- State: open
- Created 2 years ago
- Reactions: 1
- Comments: 18 (6 by maintainers)
@pbering I’m not saying there’s nothing wrong with Compose and we can’t provide a fix, but if you see Docker engine stuck, this demonstrates an issue on engine side which should not be broken by some inadequate API calls. Remember compose relies on many API calls within a very short timeframe, compared to manual reproduction by
docker run ...commands. This already revealed race conditions in engine in the past.@danieletorelli please report to github.com/moby/moby. Whenever there might be something wrong with Compose, engine should not crash as client API is somehow misused. cc @thaJeztah