From facf959ecfa61ccbd9ebc715b6ef230f8723b999 Mon Sep 17 00:00:00 2001 From: Viktor Barzin Date: Sun, 29 Mar 2026 22:29:27 +0300 Subject: [PATCH] fix registry healthchecks: use 127.0.0.1 instead of localhost MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit localhost resolves to IPv6 ::1 but containers bind to 0.0.0.0 (IPv4 only), causing wget to fail with "Connection refused". The nginx proxy had 18,462 consecutive health check failures because of this. Also cleared corrupted pull-through cache for mghee/novelapp — the registry had layer link files pointing to non-existent blob data, causing containerd to get 200 responses with 0 bytes (unexpected EOF). --- modules/docker-registry/docker-compose.yml | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/modules/docker-registry/docker-compose.yml b/modules/docker-registry/docker-compose.yml index 4b3d39a8..3f3537b6 100644 --- a/modules/docker-registry/docker-compose.yml +++ b/modules/docker-registry/docker-compose.yml @@ -15,7 +15,7 @@ services: ports: - "5001:5001" healthcheck: - test: ["CMD", "sh", "-c", "wget -qO- http://localhost:5000/v2/ >/dev/null 2>&1"] + test: ["CMD", "sh", "-c", "wget -qO- http://127.0.0.1:5000/v2/ >/dev/null 2>&1"] interval: 30s timeout: 10s retries: 3 @@ -31,7 +31,7 @@ services: networks: - registry healthcheck: - test: ["CMD", "sh", "-c", "wget -qO- http://localhost:5000/v2/ >/dev/null 2>&1"] + test: ["CMD", "sh", "-c", "wget -qO- http://127.0.0.1:5000/v2/ >/dev/null 2>&1"] interval: 30s timeout: 10s retries: 3 @@ -47,7 +47,7 @@ services: networks: - registry healthcheck: - test: ["CMD", "sh", "-c", "wget -qO- http://localhost:5000/v2/ >/dev/null 2>&1"] + test: ["CMD", "sh", "-c", "wget -qO- http://127.0.0.1:5000/v2/ >/dev/null 2>&1"] interval: 30s timeout: 10s retries: 3 @@ -63,7 +63,7 @@ services: networks: - registry healthcheck: - test: ["CMD", "sh", "-c", "wget -qO- http://localhost:5000/v2/ >/dev/null 2>&1"] + test: ["CMD", "sh", "-c", "wget -qO- http://127.0.0.1:5000/v2/ >/dev/null 2>&1"] interval: 30s timeout: 10s retries: 3 @@ -79,7 +79,7 @@ services: networks: - registry healthcheck: - test: ["CMD", "sh", "-c", "wget -qO- http://localhost:5000/v2/ >/dev/null 2>&1"] + test: ["CMD", "sh", "-c", "wget -qO- http://127.0.0.1:5000/v2/ >/dev/null 2>&1"] interval: 30s timeout: 10s retries: 3 @@ -97,7 +97,7 @@ services: - registry healthcheck: # 401 is expected (auth required) — any HTTP response means the registry is healthy - test: ["CMD", "sh", "-c", "wget -qS -O /dev/null http://localhost:5000/v2/ 2>&1 | grep -q 'HTTP/'"] + test: ["CMD", "sh", "-c", "wget -qS -O /dev/null http://127.0.0.1:5000/v2/ 2>&1 | grep -q 'HTTP/'"] interval: 30s timeout: 10s retries: 3 @@ -134,7 +134,7 @@ services: registry-private: condition: service_healthy healthcheck: - test: ["CMD", "sh", "-c", "wget -qO- http://localhost:5000/v2/ >/dev/null 2>&1"] + test: ["CMD", "sh", "-c", "wget -qO- http://127.0.0.1:5000/v2/ >/dev/null 2>&1"] interval: 30s timeout: 10s retries: 3