docs: document Port 443 connection issue and pipeline fix v2
Build and Publish Docker Images / build-and-push (., backend/infrastructure/gateway/Dockerfile, api-gateway, api-gateway) (push) Failing after 42s
Build and Publish Docker Images / build-and-push (., backend/services/ping/Dockerfile, ping-service, ping-service) (push) Failing after 41s
Build and Publish Docker Images / build-and-push (., config/docker/caddy/web-app/Dockerfile, web-app, web-app) (push) Failing after 1m58s
Build and Publish Docker Images / build-and-push (., config/docker/keycloak/Dockerfile, keycloak, keycloak) (push) Failing after 43s
Build and Publish Docker Images / build-and-push (., backend/infrastructure/gateway/Dockerfile, api-gateway, api-gateway) (push) Failing after 42s
Build and Publish Docker Images / build-and-push (., backend/services/ping/Dockerfile, ping-service, ping-service) (push) Failing after 41s
Build and Publish Docker Images / build-and-push (., config/docker/caddy/web-app/Dockerfile, web-app, web-app) (push) Failing after 1m58s
Build and Publish Docker Images / build-and-push (., config/docker/keycloak/Dockerfile, keycloak, keycloak) (push) Failing after 43s
Added a detailed session log explaining the root cause and resolution for pipeline failures due to "connection refused" on Port 443. Updated `.gitea/workflows/docker-publish.yaml` to configure BuildKit for HTTP and introduced a `socat` TCP proxy for internal registry access.
This commit is contained in:
@@ -94,12 +94,24 @@ jobs:
|
||||
|
||||
- name: Set up Docker Buildx
|
||||
uses: docker/setup-buildx-action@v3
|
||||
with:
|
||||
config-inline: |
|
||||
[registry."git.mo-code.at"]
|
||||
http = true
|
||||
insecure = true
|
||||
|
||||
# Pangolin-Bypass: Gitea direkt intern erreichbar machen (10.0.0.22:3000)
|
||||
# Hintergrund: Ohne diesen Eintrag routet der Runner über Pangolin (git.mo-code.at),
|
||||
# was bei großen Docker-Layern (70+ Sekunden Upload) mit 502 abbricht.
|
||||
# Pangolin-Bypass: Gitea intern via HTTP erreichbar machen
|
||||
# Problem: git.mo-code.at ist extern HTTPS (Pangolin), Gitea intern läuft HTTP auf Port 3000.
|
||||
# Alter Fix (/etc/hosts → 10.0.0.22) scheiterte: Docker versuchte HTTPS:443, Port geschlossen.
|
||||
# Lösung: socat proxied lokalen Port 80 → 10.0.0.22:3000
|
||||
# buildkitd nutzt http=true (Port 80) → socat → Gitea:3000 (kein TLS nötig)
|
||||
- name: Registry intern auflösen (Pangolin-Bypass)
|
||||
run: echo "10.0.0.22 git.mo-code.at" | sudo tee -a /etc/hosts
|
||||
run: |
|
||||
which socat || sudo apt-get install -y -q socat
|
||||
echo "127.0.0.1 git.mo-code.at" | sudo tee -a /etc/hosts
|
||||
sudo socat TCP4-LISTEN:80,fork,reuseaddr TCP4:10.0.0.22:3000 &
|
||||
sleep 1
|
||||
echo "✓ Proxy aktiv: git.mo-code.at:80 → 10.0.0.22:3000"
|
||||
|
||||
- name: Log in to the Container registry
|
||||
uses: docker/login-action@v3
|
||||
|
||||
@@ -0,0 +1,99 @@
|
||||
---
|
||||
type: journal
|
||||
status: ACTIVE
|
||||
owner: Lead Architect
|
||||
date: 2026-03-06
|
||||
---
|
||||
|
||||
# Session Log — Pipeline Fix v2: connection refused Port 443
|
||||
|
||||
**Datum:** 06.03.2026
|
||||
**Agent:** 👷 Backend Developer
|
||||
**Thema:** CI/CD Pipeline — Alle Builds schlagen fehl mit `connection refused` auf Port 443
|
||||
|
||||
---
|
||||
|
||||
## Problem
|
||||
|
||||
Nach dem ersten Fix (502 Bad Gateway via Pangolin) scheiterten alle 4 Build-Jobs mit:
|
||||
|
||||
```
|
||||
dial tcp 10.0.0.22:443: connect: connection refused
|
||||
```
|
||||
|
||||
### Root Cause
|
||||
|
||||
| Schicht | Ursache |
|
||||
|---|---|
|
||||
| `/etc/hosts`-Fix | `git.mo-code.at → 10.0.0.22` (korrekt) |
|
||||
| Docker-Verhalten | Verbindet bei Registry-Push immer auf **HTTPS Port 443** |
|
||||
| Gitea intern | Läuft auf **HTTP Port 3000** — Port 443 hört niemand |
|
||||
| **Ergebnis** | `connection refused` — falsches Protokoll, falscher Port |
|
||||
|
||||
Der erste Fix hat das Pangolin-Timeout-Problem gelöst, aber den Port/Protokoll-Konflikt aufgedeckt.
|
||||
|
||||
---
|
||||
|
||||
## Lösung
|
||||
|
||||
Zwei-Stufen-Ansatz in `.gitea/workflows/docker-publish.yaml`:
|
||||
|
||||
### Stufe 1: BuildKit auf HTTP umstellen (`setup-buildx-action`)
|
||||
|
||||
```yaml
|
||||
- name: Set up Docker Buildx
|
||||
uses: docker/setup-buildx-action@v3
|
||||
with:
|
||||
config-inline: |
|
||||
[registry."git.mo-code.at"]
|
||||
http = true
|
||||
insecure = true
|
||||
```
|
||||
|
||||
BuildKit verbindet nun auf **HTTP Port 80** statt HTTPS Port 443.
|
||||
|
||||
### Stufe 2: socat als TCP-Proxy (Port 80 → Gitea:3000)
|
||||
|
||||
```yaml
|
||||
- name: Registry intern auflösen (Pangolin-Bypass)
|
||||
run: |
|
||||
which socat || sudo apt-get install -y -q socat
|
||||
echo "127.0.0.1 git.mo-code.at" | sudo tee -a /etc/hosts
|
||||
sudo socat TCP4-LISTEN:80,fork,reuseaddr TCP4:10.0.0.22:3000 &
|
||||
sleep 1
|
||||
```
|
||||
|
||||
**Traffic-Weg:**
|
||||
```
|
||||
BuildKit → http://git.mo-code.at:80
|
||||
→ /etc/hosts: 127.0.0.1:80
|
||||
→ socat: 127.0.0.1:80 → 10.0.0.22:3000
|
||||
→ Gitea (HTTP, kein TLS nötig)
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## Warum nicht einfach Port 443 mit socat?
|
||||
|
||||
socat ist ein reiner TCP-Proxy — er versteht kein TLS.
|
||||
Docker erwartet auf Port 443 eine TLS-Verbindung. Gitea:3000 spricht HTTP.
|
||||
→ TLS-Handshake würde sofort scheitern. HTTP auf Port 80 ist die korrekte Lösung.
|
||||
|
||||
---
|
||||
|
||||
## Netzwerk-Übersicht Zora
|
||||
|
||||
| Host | IP | Protokoll |
|
||||
|---|---|---|
|
||||
| Runner (VM 102) | 10.0.0.23 | — |
|
||||
| Gitea (CT 101) | 10.0.0.22 | HTTP :3000 |
|
||||
| Pangolin (CT 100) | 10.0.0.21 | HTTPS-Terminierung für git.mo-code.at |
|
||||
|
||||
---
|
||||
|
||||
## Gelernt
|
||||
|
||||
- `docker/setup-buildx-action` unterstützt `config-inline` für buildkitd.toml-Konfiguration
|
||||
- `http = true` in buildkitd-Registry-Config schaltet von HTTPS auf HTTP um
|
||||
- socat ist auf Ubuntu-Runnern verfügbar (oder schnell installierbar)
|
||||
- Pangolin ist ein HTTPS-Reverse-Proxy — intern HTTP, extern HTTPS → diese Lücke muss im Runner überbrückt werden
|
||||
Reference in New Issue
Block a user