cscli hub update: intermittent 'connection reset' on HEAD via IPv6 to cdn-hub.crowdsec.net
Los mantenedores suelen responder en 2 días
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 3/5
- Tiempo estimado
- 1-2 días
- Aptitud para principiantes
- 45/100
Línea de trabajo
Comienza buscando en el repositorio el texto de advertencia 'Failed to check last modified' para encontrar dónde cscli emite la solicitud HEAD para el archivo .index.json del hub durante cscli hub update. Determina si el fallo del sondeo HEAD puede degradarse a registro debug/verbose (mitigación 1 en el issue) manteniendo el fallback GET existente, y comprueba si ya existe una ruta de código o un flag para preferir IPv4. Se considera terminado cuando: al ejecutar cscli hub update ya no se imprime la WARNING alarmante ante un fallo del HEAD, y el fallback sigue funcionando; ten en cuenta que el issue lleva 141 días inactivo con solo 2 comentarios, así que confirma con los maintainers qué mitigación quieren antes de codificar.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Description
cscli hub update consistently logs a warning about a failed HEAD request to cdn-hub.crowdsec.net when the host has dual-stack (IPv4 + IPv6) connectivity. The HEAD request is sent over IPv6 to a CloudFront edge node and gets read: connection reset by peer. The update still succeeds because cscli falls back to GET, but the warning is noisy and confusing.
Reproduction
Server with working dual-stack IPv4/IPv6 connectivity.
$ cscli hub update
WARNING Failed to check last modified: failed to make HEAD request for https://cdn-hub.crowdsec.net/crowdsecurity/master/.index.json:
Head "https://cdn-hub.crowdsec.net/crowdsecurity/master/.index.json":
read tcp [2a02:121f:1dd:8001::2000]:58536->[2600:9000:202a:4800:b:9c87:4c80:93a1]:443: read: connection reset by peer
Downloading /etc/crowdsec/hub/.index.json
Nothing to do, the hub index is up to date.
Isolated test
# IPv6 HEAD — fails intermittently (~2/3 attempts timeout/RST)
$ for i in 1 2 3; do curl -6 -sI --max-time 5 -X HEAD https://cdn-hub.crowdsec.net/crowdsecurity/master/.index.json | head -1; done
(empty)
(empty)
HTTP/2 200
# IPv4 HEAD — always succeeds
$ curl -4 -sI --max-time 5 -X HEAD https://cdn-hub.crowdsec.net/crowdsecurity/master/.index.json | head -1
HTTP/2 200
# IPv6 GET — always succeeds
$ curl -6 -sI --max-time 5 https://cdn-hub.crowdsec.net/crowdsecurity/master/.index.json | head -1
HTTP/2 200
So the failure is specific to HEAD requests over IPv6 hitting certain CloudFront edges. Different edge nodes are contacted on each retry (different /48 prefixes within 2600:9000:*), and only some respond correctly to HEAD over IPv6.
Environment
- CrowdSec:
v1.7.8-debian-pragmatic-amd64-63227459(codenamealphaga, GoVersion 1.26.2) - OS: Ubuntu 24.04.4 LTS, kernel 6.8.0-111-generic
- Network: dual-stack, MTU 1500 on
enp6s18, no firewall blocking outbound IPv6
Suspected cause
CloudFront edge configuration inconsistency on IPv6: some edges return HTTP/2 200 for HEAD, others reset the connection. This is upstream (AWS/CloudFront or CrowdSec's CDN config), not a CrowdSec code bug per se.
Suggested mitigations on the cscli side
- Treat HEAD failures as a soft error and fall back to GET silently (current behavior already falls back, but logs a
WARNINGthat confuses operators). - Add a
--prefer-ipv4flag, or document the workaround (/etc/gai.confprecedence override, or/etc/hostspin to an IPv4 CloudFront address). - Open an upstream ticket with the CDN provider to fix the inconsistent HEAD-over-IPv6 behavior.
Happy to provide more traces (tcpdump, etc.) if useful.
- Lenguaje dominante
- Go
- Estrellas
- 15.1k
- Forks
- 726
- Merge medio
- 2 d 51 min
- PR fusionados (30 d)
- 18
Preparar el entorno
Este proyecto no incluye contenedor de desarrollo, Dockerfile ni guía de contribución, así que la configuración corre por tu cuenta: empieza por su README y consulta nuestra guía para la primera contribución para los pasos generales.
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de crowdsecurity/crowdsec
-
[docker] Align build and debian releasePosiblemente ocupada @albundy83 la tomó hace 2 días. Abiertokind/enhancement needs/triage
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
crowdsecurity/crowdsec#4803 · 3 comentarios ·
Los mantenedores suelen responder en 2 días
-
Bucket queues preallocate all their slots when the bucket is createdPosiblemente ocupada @AdzerKI la tomó hace 4 días. Abiertokind/bug needs/triage os/linux
Dificultad 2/5 1-3 horas Aptitud para principiantes 83/100
crowdsecurity/crowdsec#4799 · 3 comentarios ·
Los mantenedores suelen responder en 2 días
-
kind/bug needs/triage os/linux
Dificultad 3/5 1-2 días Aptitud para principiantes 25/100
crowdsecurity/crowdsec#4797 · 1 comentario ·
Los mantenedores suelen responder en 2 días
-
needs/kind needs/triage
Dificultad 5/5 Más de una semana Aptitud para principiantes 38/100
crowdsecurity/crowdsec#4795 · 2 comentarios ·
Los mantenedores suelen responder en 2 días
-
kind/bug needs/triage os/linux
Dificultad 4/5 3-5 días Aptitud para principiantes 45/100
crowdsecurity/crowdsec#4790 · 1 comentario ·
Los mantenedores suelen responder en 2 días
Todos los issues de crowdsecurity/crowdsec
Issues similares
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100
Los mantenedores suelen responder en 1 día
-
agent-butler-finding chore
Dificultad 1/5 Menos de una hora Aptitud para principiantes 88/100
jordansmall/spindrift#6695 ·
Los mantenedores suelen responder en 1 día
-
skills-init: commit-SHA skill refs never start (git checkout -- <sha> reads the SHA as a pathspec)Posiblemente ocupada Un pull request vinculado a esta issue está abierto o ya se fusionó. Abierto
Dificultad 1/5 Menos de una hora Aptitud para principiantes 84/100
kagent-dev/kagent#3571 ·
Los mantenedores suelen responder en 1 día
-
book-layout.spec fails when the similar-books rail holds other projects' booksPosiblemente ocupada @praetorianer777 la tomó hoy. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
praetorianer777/GoTome#373 ·
Los mantenedores suelen responder en 1 día
-
bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 80/100