calico-node异常:error=open /var/lib/calico/nodename

来源:5-9 集群冒烟测试

烟火的光芒

2022-05-03

[root@node-1 ~]# kubectl get pod -n kube-system -o wide
NAME READY STATUS RESTARTS AGE IP NODE NOMINATED NODE READINESS GATES
calico-kube-controllers-6fcb5c5bcf-z9dr8 1/1 Running 0 27m 10.200.247.2 node-2
calico-node-q66p6 0/1 CrashLoopBackOff 10 26m 192.168.216.102 node-2
calico-node-wdmv6 0/1 CrashLoopBackOff 10 26m 192.168.216.103 node-3

[root@node-1 ~]# kubectl -n kube-system logs calico-node-q66p6
2022-05-03 15:17:25.806 [INFO][9] startup/startup.go 425: Early log level set to info
2022-05-03 15:17:25.806 [INFO][9] startup/utils.go 127: Using NODENAME environment for node name node-2
2022-05-03 15:17:25.806 [INFO][9] startup/utils.go 139: Determined node name: node-2
2022-05-03 15:17:25.806 [INFO][9] startup/startup.go 94: Starting node node-2 with version v3.22.2
2022-05-03 15:17:25.807 [INFO][9] startup/startup.go 430: Checking datastore connection
2022-05-03 15:17:25.822 [INFO][9] startup/startup.go 454: Datastore connection verified
2022-05-03 15:17:25.822 [INFO][9] startup/startup.go 104: Datastore is ready
2022-05-03 15:17:25.837 [INFO][9] startup/autodetection_methods.go 225: Including CIDR information from host interface. CIDR="192.168.216.102/24"
2022-05-03 15:17:25.837 [INFO][9] startup/startup.go 583: Using IPv4 address from environment: IP=192.168.216.102/24
2022-05-03 15:17:25.838 [INFO][9] startup/startup.go 699: No AS number configured on node resource, using global value
2022-05-03 15:17:25.848 [INFO][9] startup/startup.go 674: FELIX_IPV6SUPPORT is false through environment variable
2022-05-03 15:17:25.853 [ERROR][9] startup/utils.go 180: Unable to write to /var/lib/calico/nodename error=open /var/lib/calico/nodename: is a directory
2022-05-03 15:17:25.853 [WARNING][9] startup/utils.go 49: Terminating
Calico node failed to start

看到error了,但不知道如何处理,求教

写回答

1回答

刘果国

2022-05-05

关注:open /var/lib/calico/nodename: is a directory。

检查本地文件系统

0
1
烟火的光芒
好了,刚开始提示没有/var/lib/calico/nodename目录,然后我新建了一个nodename目录,重启机器后提示上述错误,根据老师提示,又删掉了nodename目录,就好了,虽然还是一脸闷逼,感谢老师
2022-05-06
共1条回复

Kubernetes生产落地全程实践

一个互联网公司落地Kubernetes全过程点点滴滴

2293 学习 · 2216 问题

查看课程