Windows: Docker API ignores Connection: close, so a body-less 204 (container start) hangs Testcontainers for .NET
I maintainer di solito rispondono entro 1 giorno
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 3/5
- Tempo stimato
- 1-2 giorni
- Idoneità per principianti
- 68/100
- Tipo di issue
- Bug
- Chiarezza
- Specificata chiaramente
- Stato di attività
- Attiva
- Stack tecnologico
- docker, rust
- Ambito
- backend-api-design
Direzione di ricerca
Start by tracing how Kiri handles Docker Engine API requests over named pipes and how it writes HTTP responses for container start. Check whether the server honors the request's Connection: close header after sending a body-less 204 response. Reproduce with the PowerShell request in the issue; done when the client receives EOF after the 204.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Kiri version and system
Kiri 0.2.0 on Windows 11 Pro 10.0.26200 (x64), Docker API over \\.\pipe\kiri (also reached through \\.\pipe\docker_engine).
What you did
Sent Docker Engine API requests with the header Connection: close over the named pipe, as Docker.DotNet does on every request (it is the client under Testcontainers for .NET 4.11). Minimal repro in PowerShell, no Docker client involved:
$p = [IO.Pipes.NamedPipeClientStream]::new('.', 'kiri', [IO.Pipes.PipeDirection]::InOut); $p.Connect(3000)
$req = "POST /containers/<id>/start HTTP/1.1`r`nHost: docker`r`nConnection: close`r`nContent-Length: 0`r`n`r`n"
$b = [Text.Encoding]::ASCII.GetBytes($req); $p.Write($b, 0, $b.Length); $p.Flush()
# read until EOF, with a 5 s timeout
(<id> from a plain POST /containers/create with {"Image":"alpine:3.20","Cmd":["sleep","30"]}.)
What happened
Kiri answers, but never closes the connection. After 5 s the pipe is still open with no EOF:
HTTP/1.1 204 No Content
Api-Version: 1.47
Docker-Experimental: false
Ostype: linux
Server: Kiri/0.2.0 (linux)
The 204 carries neither Connection: close nor Content-Length. The 201 from create also stays open after its body; clients cope there because it carries a body length, but a body-less 204 leaves them waiting for the end of the response.
Effect: Testcontainers for .NET hangs forever right after POST /containers/{id}/start returns 204 (Docker.DotNet waits for the connection to end before it completes the response). A test run sat 16 minutes with no further API call.
What you expected instead
What dockerd does: when the request says Connection: close, the server closes the connection after sending the response (RFC 9112 §9.6), so the client sees EOF right after the 204.
Anything else
- Happens every time.
- Workaround: a small named-pipe relay in front of
\\.\pipe\kirithat closes the client connection after a 204/304 response, withdocker.host=npipe://./pipe/<relay>in~/.testcontainers.properties. With that (plus rewriting"Cmd":[]tonull, which is the separate #121 / #222 problem: Ryuk fails with400 no command specified, andmcr.microsoft.com/mssql/serverruns its entrypoint with no arguments and exits), Testcontainers for .NET with Ryuk enabled and SQL Server works on Kiri. - Related: #121, #222.
- Lingua principale
- Rust
- Stelle
- 7.5k
- Fork
- 329
- Merge medio
- 7h 48m
- PR unite (30g)
- 105
Preparare l'ambiente
Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di libracoder/kiri
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
libracoder/kiri#364 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
libracoder/kiri#289 ·
I maintainer di solito rispondono entro 1 giorno
-
bug
Difficoltà 4/5 3-5 giorni Idoneità per principianti 47/100
libracoder/kiri#365 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 35/100
libracoder/kiri#362 ·
I maintainer di solito rispondono entro 1 giorno
-
bug
Difficoltà 3/5 1-2 giorni Idoneità per principianti 47/100
libracoder/kiri#359 ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di libracoder/kiri
Issue simili
-
benchmark-review
Difficoltà 2/5 1-3 ore Idoneità per principianti 63/100
I maintainer di solito rispondono entro 1 giorno
-
area:filesystem bug need-triage
Difficoltà 2/5 1-3 ore Idoneità per principianti 85/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
I maintainer di solito rispondono entro 1 giorno
-
Captions panel does not offer to show an existing transcriptForse già presa @thedavidweng l’ha presa oggi. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
CapSoftware/Cap#4276 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
matrix-org/matrix-rust-sdk#7495 ·
I maintainer di solito rispondono entro 1 giorno