Closed Fluxay-666 closed 1 year ago
已解决,kuboard-etcd默认端口是2381,端口用错了
ETCDCTL_API=3 etcdctl --endpoints="http://127.0.0.1:2381" --write-out=table endpoint status
etcdctl --endpoints="http://127.0.0.1:2381" snapshot save /data/backup.db
ETCDCTL_API=3 etcdctl --endpoints="http://127.0.0.1:2381" compact $(ETCDCTL_API=3 etcdctl --endpoints="http://127.0.0.1:2381" endpoint status --write-out="json" | egrep -o '"revision":[0-9]*' | egrep -o '[0-9].*')
ETCDCTL_API=3 etcdctl --endpoints="http://127.0.0.1:2381" defrag
ETCDCTL_API=3 etcdctl --endpoints=http://127.0.0.1:2381 alarm disarm
已解决,kuboard-etcd默认端口是2381,端口用错了
ETCDCTL_API=3 etcdctl --endpoints="http://127.0.0.1:2381" --write-out=table endpoint status
etcdctl --endpoints="http://127.0.0.1:2381" snapshot save /data/backup.db
ETCDCTL_API=3 etcdctl --endpoints="http://127.0.0.1:2381" compact $(ETCDCTL_API=3 etcdctl --endpoints="http://127.0.0.1:2381" endpoint status --write-out="json" | egrep -o '"revision":[0-9]*' | egrep -o '[0-9].*')
ETCDCTL_API=3 etcdctl --endpoints="http://127.0.0.1:2381" defrag
ETCDCTL_API=3 etcdctl --endpoints=http://127.0.0.1:2381 alarm disarm
直接登录不了,大佬怎么解决的啊
[root@k8s-master ~]# ETCDCTL_API=3 etcdctl --endpoints="http://127.0.0.1:2381" --write-out=table endpoint status {"level":"warn","ts":"2024-05-10T17:13:47.952+0800","caller":"clientv3/retry_interceptor.go:62","msg":"retrying of unary invoker failed","target":"passthrough:///http://127.0.0.1:2381","attempt":0,"error":"rpc error: code = DeadlineExceeded desc = latest balancer error: connection closed"} Failed to get the status of endpoint http://127.0.0.1:2381 (context deadline exceeded) +----------+----+---------+---------+-----------+------------+-----------+------------+--------------------+--------+ | ENDPOINT | ID | VERSION | DB SIZE | IS LEADER | IS LEARNER | RAFT TERM | RAFT INDEX | RAFT APPLIED INDEX | ERRORS | +----------+----+---------+---------+-----------+------------+-----------+------------+--------------------+--------+ +----------+----+---------+---------+-----------+------------+-----------+------------+--------------------+--------+
@xianhuadezhuren 看看yaml文件里的端口对吗
du -h -d 0 /usr/share/kuboard/etcd/
2.5G /usr/share/kuboard/etcd/
我想手动压缩etcd数据发现etcd没有办法正常访问
使用命令压缩历史之前需注意etcdserver监听地址
{"level":"info","ts":"2024-06-19T07:08:05.047Z","caller":"embed/etcd.go:245","msg":"now serving peer/client/metrics","local-member-id":"18793330f04e826a","initial-advertise-peer-urls":["http://192.168.102.30:2382"],"listen-peer-urls":["http://192.168.102.30:2382"],"advertise-client-urls":["http://192.168.102.30:2381"],"listen-client-urls":["http://192.168.102.30:2381"],"listen-metrics-urls":[]}
我使用 2381 和 2382 都不行。主要是现在etcd起不来,怎么才能连接内部清理数据?
{“level”:“info”,“ts”:“2024-06-19T07:08:05.047Z”,“caller”:“embed/etcd.go:245”,“msg”:“现在服务peer/client/metrics”,“local-member-id”:“18793330f04e826a”,“initial-advertise-peer-urls”:[“http://192.168.102.30:2382”],“listen-peer-urls”:[“http://192.168.102.30:2382”],“advertise-client-urls”:[“http://192.168.102.30:2381”],“listen-client-urls”:[“http://192.168.102.30:2381”],“listen-metrics-urls”:[]}
我使用 2381 和 2382 都不行。主要是现在etcd起不来,怎么才能连接内部清理数据?
我看你监听的事192的IP,用这个试试。 是在k8s集群吗
哎,不行,感觉还是etcd有问题导致。没起来,所以连不上。
ETCDCTL_API=3 ./etcdctl --endpoints="http://192.168.102.30:2381" --write-out=table endpoint status
成功访问一次,后续访问失败,这是运气吗(狗头保命)
哎,不行,感觉还是etcd有问题导致。没起来,所以连不上。
ETCDCTL_API=3 ./etcdctl --endpoints="http://192.168.102.30:2381" --write-out=table endpoint status
成功访问一次,后续访问失败,这是运气吗(狗头保命)
是在k8s集群里吗?他会有健康检测,我把健康检测注释之后就可以了
哎,不行,感觉还是etcd有问题导致。没起来,所以连不上。 ETCDCTL_API=3 ./etcdctl --endpoints="http://192.168.102.30:2381" --write-out=table endpoint status
成功访问一次,后续访问失败,这是运气吗(狗头保命)
ETCDCTL_API=3 ./etcdctl --endpoints=“http://192.168.102.30:2381” --write-out=table endpoint status 成功访问一次,后续访问失败,这是运气吗(狗头保命)
是在k8s集群里吗?他会有健康检测,我把健康检测注释之后就可以了
我注销了健康检测,现在pod不会重启。然后执行就可以了,大佬牛逼
@xianhuadezhuren 看看yaml文件里的端口对吗
嗯嗯 可以了 感谢大佬
du -h -d 0 /usr/share/kuboard/etcd/
2.5G /usr/share/kuboard/etcd/
我想手动压缩etcd数据发现etcd没有办法正常访问