New issue: $LAPI_HOST resolves to the wrong service name

acheong@fishy ~/P/k/ingress (master) [1]> kubectl exec -it -n crowdsec pods/crowdsec-agent-k5nxj --container wait-for-lapi-and-register -- sh
/ # ps aux
PID USER TIME COMMAND
1 root 0:00 sh -c until nc "$LAPI_HOST" "$LAPI_PORT" -z; do echo waiting for lapi to start; sleep 5; done; ln -s /staging/etc/crowdsec /etc/
8 root 0:00 nc crowdsec-service.crowdsec 8080 -z
9 root 0:00 sh
15 root 0:00 ps aux
/ #
acheong@fishy ~/P/k/ingress (master) [1]> kubectl exec -it -n crowdsec pods/crowdsec-agent-k5nxj --container wait-for-lapi-and-register -- sh
/ # ps aux
PID USER TIME COMMAND
1 root 0:00 sh -c until nc "$LAPI_HOST" "$LAPI_PORT" -z; do echo waiting for lapi to start; sleep 5; done; ln -s /staging/etc/crowdsec /etc/
8 root 0:00 nc crowdsec-service.crowdsec 8080 -z
9 root 0:00 sh
15 root 0:00 ps aux
/ #
It tries to connect to crowdsec-service.crowdsec which fails when the correct address is crowdsec-service.crowdsec.svc.cluster.local only seems to be happening on one node when all other nodes are running fine. It's been running fine for months and this just randomly popped up
6 Replies
CrowdSec
CrowdSec2mo ago
Important Information
This post has been marked as resolved. If this is a mistake please press the red button below or type /unresolve
© Created By WhyAydan for CrowdSec ❤️
Fish alt#3000
Fish alt#3000OP2mo ago
crowdsec-agent-9q64f 1/1 Running 0 23m 10.42.4.42 kube-worker-3 <none> <none>
crowdsec-agent-brx52 1/1 Running 0 25m 10.42.7.96 kube-worker-2.novalocal <none> <none>
crowdsec-agent-k5nxj 0/1 Init:0/1 0 4m54s 10.42.0.47 kube.duti.dev <none> <none>
crowdsec-agent-qjvt6 1/1 Running 0 24m 10.42.8.250 rock-3c <none> <none>
crowdsec-agent-t5m4j 1/1 Running 0 23m 10.42.2.104 kube-worker-4 <none> <none>
crowdsec-agent-vn2zh 1/1 Running 0 24m 10.42.3.47 kube-worker-1.novalocal <none> <none>
crowdsec-lapi-769559c7ff-2cbvz 1/1 Running 0 9m59s 10.42.7.97 kube-worker-2.novalocal <none> <none>
crowdsec-agent-9q64f 1/1 Running 0 23m 10.42.4.42 kube-worker-3 <none> <none>
crowdsec-agent-brx52 1/1 Running 0 25m 10.42.7.96 kube-worker-2.novalocal <none> <none>
crowdsec-agent-k5nxj 0/1 Init:0/1 0 4m54s 10.42.0.47 kube.duti.dev <none> <none>
crowdsec-agent-qjvt6 1/1 Running 0 24m 10.42.8.250 rock-3c <none> <none>
crowdsec-agent-t5m4j 1/1 Running 0 23m 10.42.2.104 kube-worker-4 <none> <none>
crowdsec-agent-vn2zh 1/1 Running 0 24m 10.42.3.47 kube-worker-1.novalocal <none> <none>
crowdsec-lapi-769559c7ff-2cbvz 1/1 Running 0 9m59s 10.42.7.97 kube-worker-2.novalocal <none> <none>
_KaszpiR_
_KaszpiR_2mo ago
it's rather that node has dns issues or has some additional things related to the DNS config added to the spawned pods
CrowdSec
CrowdSec2mo ago
Resolving New issue: $LAPI_HOST resolves to the wrong service name This has now been resolved. If you think this is a mistake please run /unresolve
Fish alt#3000
Fish alt#3000OP2mo ago
yup dns seemed to be the issue. not sure what the problem was but I just respawned the node
_KaszpiR_
_KaszpiR_2mo ago
usually systemd going mental (sticking to the other dns server and not switching back to the one it had )

Did you find this page helpful?