Troubleshooting
Longhorn
Longhorn namespace stuck in 'Terminating' status
k delete validatingwebhookconfigurations.admissionregistration.k8s.io longhorn-admission-webhook && \
k delete mutatingwebhookconfigurations.admissionregistration.k8s.io longhorn-admission-webhook
for crd in $(kubectl get crd -o name | grep longhorn.io); do
kubectl get $crd -n longhorn-system -o name | while read resource; do
kubectl patch $resource -n longhorn-system --type=merge -p '{"metadata":{"finalizers":[]}}'
kubectl delete $resource -n longhorn-system
done
kubectl delete $crd
done
```bash
```bash
# verify cleanup
k get ns
k get all -n longhorn-system
k get crd | grep longhorn.io
See the Longhorn uninstall guide.
Calico
Connectivity between pods in hosts connected through IPSec tunnel is not working when using VXLAN. When the source IP is the router and, therefore, a non-kubernetes node, the packets are blocked by the Calico policy (felix).
ipset list cali40all-vxlan-net
kubectl patch felixconfiguration default \
--type='merge' \
-p '{"spec": {"externalNodesList": ["192.168.35.17/32"]}}'
kubectl rollout restart daemonset calico-node -n kube-system
ipset list cali40all-vxlan-net
MetalLB
kubectl -n ingress-nginx edit svc ingress-nginx-controller
spec:
externalTrafficPolicy: Local
NotReady node
# kubectl describe node dedl45552
# curl -k https://localhost:6443/healthz
<No response>
# curl -k https://192.168.35.5:6443/healthz
ok
# curl -k https://192.168.35.6:6443/healthz
ok
# curl -k https://192.168.35.7:6443/healthz
ok
# crictl ps -a | grep nginx
# crictl logs <nginx-container-id>
Port 6443 is already in use
sudo ss -tulnp | grep ':6443\|:8081'
sudo kill -9 <PID>
systemctl restart kubelet
Worker nodes have a local reverse proxy to load balance the traffic to the master nodes. The Pod configuration is at /etc/kubernetes/manifests/ and the nginx configuration is at /etc/nginx/. It seems like the ports are already in use, just kill the processes and restart the kubelet.
OpenNebula
Sunstone error
Problem:
On OpenNebula Sunstone, you see the following error:
OpenNebula is not running of there was a server exception. Please check the server logs.
# onezone show 0
ZONE 0 INFORMATION
ID : 0
NAME : OpenNebula
ZONE SERVERS
ID NAME ENDPOINT
0 server-0 http://cloudy-front01.udl.cat:2633/RPC2
1 server-1 http://cloudy-front02.udl.cat:2633/RPC2
2 server-2 http://cloudy-front03.udl.cat:2633/RPC2
HA & FEDERATION SYNC STATUS
ID NAME STATE TERM INDEX COMMIT VOTE FED_INDEX
0 server-0 error - - - - -
1 server-1 error - - - - -
2 server-2 error - - - - -
ZONE TEMPLATE
ENDPOINT="http://localhost:2633/RPC2"
# tail -f /var/log/one/oned.log
...
Could not resolve host: cloudy-front01.udl.cat
Solution:
# cat /etc/hosts
192.168.35.5 cloudy-front01.udl.cat
192.168.35.6 cloudy-front02.udl.cat
192.168.35.7 cloudy-front03.udl.cat
NetApp volumes are not mounted
Problem:
No NetApp volumes are mounted on the nodes.
df -Th | grep nfs
Solution:
# cat /etc/fstab
...
#netapp-recerca.local:/one /var/lib/one/datastores nfs defaults 0 0
#netapp-recerca.local:/production01 /mnt/productio01 nfs defaults 0 0
#netapp-recerca.local:/production01 /var/lib/one/datastores nfs soft,intr,rsize=8192,wsize=8192,noauto
netapp-recerca.local:/production01 /var/lib/one/datastores nfs defaults 0 0
netapp-recerca.local:/production01/sunst-tmp /var/tmp/one nfs defaults 0 0
mount -a
External access is not working
Problem:
In pfSense, Status > System Logs > System > General, you see the following error:
arp: 08:f1:ea:22:0a:34 is using my IP address 193.144.12.69 on vtnet0!
arp: 80:30:e0:9c:7e:18 is using my IP address 193.144.12.69 on vtnet0!
Solution:
- Go to pfSense, Interfaces > WAN
- Uncheck and check the "Enable interface" checkbox
- Click "Save"
- Click "Apply Changes"
The problem is that other devices are replying to ARP.
ip addr | grep 193.144.12.69
ip addr del 193.144.12.69/25 dev br6
Namespace in 'Terminating' status
Problem:
kubectl get ns argo-cd
Solution:
NAMESPACE="argo-cd"
kubectl get namespace $NAMESPACE -o json \
| tr -d "\n" | sed "s/\"finalizers\": \[[^]]\+\]/\"finalizers\": []/" \
| kubectl replace --raw /api/v1/namespaces/$NAMESPACE/finalize -f -
Dangling resources
Problem:
kubectl api-resources --verbs=list --namespaced -o name | xargs -n 1 kubectl get --show-kind --ignore-not-found -n argo-cd
Solution:
kubectl patch application.argoproj.io/node-feature-discovery -n argo-cd \
--type json \
--patch='[ { "op": "remove", "path": "/metadata/finalizers" } ]'
Clean Crossplane managed resources
Problem:
kubectl get managed
Solution:
kubectl get managed -o name | awk '{print "kubectl patch " $1 " --type json --patch '\''[ { \"op\": \"remove\", \"path\": \"/metadata/finalizers\" } ]'\''"}' | sh
Argo Events
error: listing workers for Build: failed to list workers: Unavailable: connection error: desc = "transport: authentication handshake failed: tls: failed to verify certificate: x509: certificate signed by unknown authority
kubectl rollout restart statefulset -n buildkit
Fixed with:
annotations:
reloader.stakater.com/auto: 'true'
Nonce
kubectl exec -n provider -it $(kubectl get pods -n provider -l app=provider-provider -o jsonpath='{.items[0].metadata.name}') -- /bin/sh
apt update
apt install sqlite3
sqlite3 ocean-provider.db
UPDATE user_nonce
SET nonce = 1777973855
WHERE address IN (
'0xD999bAaE98AC5246568FD726be8832c49626867D'
);