meldestelle/docs/99_Journal/2026-03-06_Session_Log_Pipeline_Fix_v2.md

2.7 KiB

type status owner date last_update
Journal ACTIVE Lead Architect 2026-03-06 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)

- 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)

- 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