Linux: published ports unreachable from remote hosts — SYN arrives, LISTEN socket held by kiri, no SYN-ACK (loopback works)
I maintainer di solito rispondono entro 1 giorno
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Idoneità per principianti
- 35/100
- Tipo di issue
- Bug
- Chiarezza
- Abbastanza chiara
- Stato di attività
- Attiva
- Stack tecnologico
- docker, linux, rust
- Ambito
- networking
Direzione di ricerca
Start by reproducing on one Linux host: publish a port through the Docker API on /run/kiri/docker.sock, then compare ss -ltnp and tcpdump output for a loopback versus a remote connect. The report says the kiri process already holds the LISTEN socket in the init netns, so read the port-publishing and netns/iptables setup paths and check what the process does with accepted connections versus the kernel handshake. Also reproduce the restart and leaked-listener cases, and treat kiri diag report plus the manual MASQUERADE/FORWARD rules as the baseline for what done looks like.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Summary
On Linux, containers with published ports are reachable from the host itself (loopback and the host's LAN IP), but not from any remote machine. The SYN arrives on the host's interface, kiri holds a LISTEN socket on 0.0.0.0:<port>, yet no SYN-ACK is ever sent and the client times out. Kernel sockets (sshd, docker-proxy) on the same hosts accept remote connections normally — only sockets held by the kiri process are affected.
This made kiri 0.2.2 unusable as a dockerd replacement on our servers; we rolled the fleet back to dockerd. Reporting with full diagnostics in case it helps.
Environment
- kiri 0.2.2 (
kiri-litedeb) on multiple hosts:- Debian 13, kernel
6.12.117+deb13-cloud-amd64(VM) - Debian 13, kernel
6.12.107+deb13-cloud-amd64(VM) - Proxmox host, kernel
7.0.14-14-pve, Debian 13 trixie - Arch Linux (rolling), Hyprland laptop
- Debian 13, kernel
- Docker CE installed but disabled during testing (
systemctl disable --now docker.socket docker.service); its iptables rules flushed where present (iptables -t nat -F DOCKER) to rule out stale DNAT. - Firewalls checked: iptables INPUT policy ACCEPT, no drops on the test ports; nftables (single inet backend) shows only tailscale chains and our own test rules; no XDP/eBPF attached to interfaces; conntrack clean.
Reproduction
- Install kiri-lite on a Linux host with no other engine running.
- Run any container with a published port, e.g. the equivalent of
docker run -d -p 8888:80 nginx(via the Docker API on/run/kiri/docker.sock). - From the host itself:
curl http://127.0.0.1:8888/→ 200 OK.curl http://<host-LAN-IP>:8888/from the host also works. - From another machine on the same LAN:
curl http://<host-LAN-IP>:8888/→ connection times out.
Evidence
tcpdump on the receiving interface during a remote attempt (three curls from 192.168.1.188 to 192.168.1.55:8888):
21:34:44.167713 eth0 In IP 192.168.1.188.57454 > 192.168.1.55.8888: Flags [S], seq 2847638399, win 64240, options [mss 1460,sackOK,TS ...], length 0
21:34:45.199470 eth0 In IP 192.168.1.188.57454 > 192.168.1.55.8888: Flags [S], ... (retransmits, 4 total)
Only SYNs in, zero replies of any kind out.
At the same moment, the socket state on the host:
LISTEN 0 1024 0.0.0.0:8888 0.0.0.0:* users:(("kiri",pid=3128755,fd=84))
LISTEN 0 1024 [::]:8888 [::]:* users:(("kiri",pid=3128755,fd=85))
The kiri process (pid=3128755) is in the init network namespace (verified: /proc/1/ns/net and /proc/<pid>/ns/net both net:[4026531840]). So the kernel should complete the handshake for any matching LISTEN socket. It does not.
Outbound NAT is also absent: kiri installs no MASQUERADE/FORWARD rules for its bridge subnets, so containers have no outbound connectivity at all until rules are added manually:
iptables -t nat -A POSTROUTING -s <kiri-subnet> ! -o <kiri-bridge> -j MASQUERADE
iptables -A FORWARD -i <kiri-bridge> -j ACCEPT
iptables -A FORWARD -o <kiri-bridge> -m conntrack --ctstate ESTABLISHED,RELATED -j ACCEPT
Secondary issues found in the same rollout
- Restarting a container wedges its published ports.
docker restart <container>leaves the host ports dead afterwards (forwarding entry appears stale). Onlycompose up -d --force-recreaterestores them. - Leaked listeners. After a container publishing
127.0.0.1:443was removed, kiri kept holding127.0.0.1:443and[::1]:443listeners until the daemon was stopped — which then blocked other engines from binding those ports.
Status
Rolled back to dockerd everywhere; kiri 0.2.2 installed but disabled. Happy to re-enable kiri on a test host and run any diagnostics you need (kiri diag report, packet captures, experimental builds).
- Lingua principale
- Rust
- Stelle
- 7.5k
- Fork
- 329
- Merge medio
- 14h 18m
- PR unite (30g)
- 204
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
-
bench/api.sh exec test fails with curl exit 52, and --ignore-failure still records the timingsApertabug
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
libracoder/kiri#669 ·
I maintainer di solito rispondono entro 1 giorno
-
VM never idles to sleep while the Windows GUI is open (GUI /info polling resets the idle timer)Apertabug
Difficoltà 3/5 Mezza giornata Idoneità per principianti 68/100
libracoder/kiri#668 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 3/5 Mezza giornata Idoneità per principianti 70/100
libracoder/kiri#654 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
`kiri-nfs` exposes container `/sys` and `/proc` symlinks as directories, causing infinite directory loops and 100% CPU spikesForse già presa @talaatmagdyx l’ha presa oggi. Apertabug
Difficoltà 4/5 3-5 giorni Idoneità per principianti 28/100
libracoder/kiri#648 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 25/100
libracoder/kiri#647 ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di libracoder/kiri
Issue simili
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 84/100
antithesishq/bombadil#473 ·
I maintainer di solito rispondono entro 2 giorni
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 88/100
I maintainer di solito rispondono entro 5 giorni
-
autofixer: follow-up
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
tursodatabase/turso#12217 ·
I maintainer di solito rispondono entro 1 giorno
-
Declare the CMS schema library in the optional recipients extraForse già presa Una pull request collegata a questa issue è aperta o già unita. Apertaarea:python in-progress
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
yhay81/pyropdf#1005 · 2 commenti ·
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