etcd 版本

# etcdctl version
etcdctl version: 3.5.1
API version: 3.5

问题

在 执行 etcdctl --endpoints=http://127.0.0.1:2379 defrag命令时,可能遇到错误:

{"level":"warn","ts":"2024-06-12T18:20:17.444+0800","logger":"etcd-client","caller":"v3/retry_interceptor.go:62","msg":"retrying of unary invoker failed","target":"etcd-endpoints://0xc00037c540/127.0.0.1:2379","attempt":0,"error":"rpc error: code = DeadlineExceeded desc = context deadline exceeded"}
Failed to defragment etcd member[http://127.0.0.1:2379] (context deadline exceeded)

错误原因

etcdctl 的默认命令超时为 5 秒,但碎片整理花费的时间比这更长。

解决方案

指定超时时间 --command-timeout

etcdctl --endpoints=http://127.0.0.1:2379 --command-timeout=30s defrag

参数

GLOBAL OPTIONS:
--cacert="" verify certificates of TLS-enabled secure servers using this CA bundle
--cert="" identify secure client using this TLS certificate file
--command-timeout=5s timeout for short running command (excluding dial timeout)
--debug[=false] enable client-side debug logging
--dial-timeout=2s dial timeout for client connections
-d, --discovery-srv="" domain name to query for SRV records describing cluster endpoints
--discovery-srv-name="" service name to query when using DNS discovery
--endpoints=[127.0.0.1:2379] gRPC endpoints
--hex[=false] print byte strings as hex encoded strings
--insecure-discovery[=true] accept insecure SRV records describing cluster endpoints
--insecure-skip-tls-verify[=false] skip server certificate verification (CAUTION: this option should be enabled only for testing purposes)
--insecure-transport[=true] disable transport security for client connections
--keepalive-time=2s keepalive time for client connections
--keepalive-timeout=6s keepalive timeout for client connections
--key="" identify secure client using this TLS key file
--password="" password for authentication (if this option is used, --user option shouldn't include password)
--user="" username[:password] for authentication (prompt if password is not supplied)
-w, --write-out="simple" set the output format (fields, json, protobuf, simple, table)

参考链接:https://github.com/etcd-io/etcd/issues/8260

清理集群 etcdctl defrag --cluster

etcd错误:Failed to defragment etcd member[127.0.0.1:2379] (context deadline exceeded)的更多相关文章

  1. Error: client: etcd cluster is unavailable or misconfigured; error #0: dial tcp 127.0.0.1:4001: getsockopt: connection refused

    配置docker网络flannel时,配置etcd的key的时候出现以下错误 Error:  client: etcd cluster is unavailable or misconfigured; ...

  2. 1.MongoDB报错 Failed to connect 127.0.0.1:27017 Mongo运行错误

    1.Mongo运行错误:Failed to connect 127.0.0.1:27017 Mongo运行错误:Failed to connect 127.0.0.1:27017,reason:err ...

  3. 开启mongod服务(Mongo运行错误:Failed to connect 127.0.0.1:27017,reason:errno:10061由于目标计算机积极拒绝,无法连接)

    问题:Mongo运行错误:Failed to connect 127.0.0.1:27017,reason:errno:10061由于目标计算机积极拒绝,无法连接 在Mongodb的安装过程中碰到的问 ...

  4. This server is in the failed servers list: localhost/127.0.0.1:16000 启动hbase api调用错误

    api 调用发现错误 Mon Nov 18 23:04:31 CST 2019, RpcRetryingCaller{globalStartTime=1574089469858, pause=100, ...

  5. 我遇到的错误curl: (7) Failed to connect to 127.0.0.1 port 1086: Connection refused

    今天我用curl命令,无论如何都是出现: curl: (7) Failed to connect to 127.0.0.1 port 1086: Connection refused 找了很久,不知道 ...

  6. 什么是Etcd,如何运维Etcd ?

    介绍 ETCD 是一个分布式.可靠的 key-value 存储的分布式系统,用于存储分布式系统中的关键数据:当然,它不仅仅用于存储,还提供配置共享及服务发现:基于Go语言实现. ETCD的特点 简单: ...

  7. etcd学习(3)-grpc使用etcd做服务发现

    grpc通过etcd实现服务发现 前言 服务注册 服务发现 负载均衡 集中式LB(Proxy Model) 进程内LB(Balancing-aware Client) 独立 LB 进程(Externa ...

  8. rndc: connect failed: 127.0.0.1#953: connection refused

    [root@localhost sbin]# ./named -v bind 9.5.1-p3-v3.0.9 问题现象: [root@localhost sbin]# ./rndc flush -p ...

  9. Nginx 错误处理方法: bind() to 0.0.0.0:80 failed

    Nginx 错误处理方法: bind() to 0.0.0.0:80 failed 今天启动window上的nginx总是报错 错误信息是bind() to 0.0.0.0:80 failed (10 ...

  10. Call to localhost/127.0.0.1:9000 failed on connection exception:java.net.ConnectException的解决方案

    Call to localhost/127.0.0.1:9000 failed on connection exception:java.net.ConnectException的解决方案 作者:凯鲁 ...

随机推荐

  1. Python新手爬虫二:爬取搜狗图片(动态)

    经过上一期爬取豆瓣影评成功后,感觉爬虫还不错,于是想爬点图片来玩玩... 搜狗图片地址:https://pic.sogou.com/?from=category 先上最后成功的源码(在D盘下创建sou ...

  2. Centos8下搭建私人开源网盘NextCloud步骤及使用(基于LAMP)

    简介:Nextcloud是一款开源免费的私有云存储网盘项目,可以让你快速便捷地搭建一套属于自己或团队的云同步网盘,从而实现跨平台跨设备文件同步.共享.版本控制.团队协作等功能.它的客户端覆盖了Wind ...

  3. 最小化安装killall不可用

    最小化安装killall不可用 最小化安装Centos7.4后,发现killall命令不可用 使用了以下命令,查看软件包名: yum search killall 查找后发现应使用这个安装包 yum ...

  4. C++ shared_ptr是线程安全的吗?

    导读:C++面试中有时会有这样一个问题,shared_ptr是线程安全的吗?对此问题,我们需要从三个并发场景进行考虑,拷贝shared_ptr的安全性.对shared_ptr赋值的安全性和读写shar ...

  5. 合合信息通过ISO/IEC国际标准双认证,为全球用户提供高合规标准AI服务

    互联网.AI等技术的全球普及为人们提供便捷服务的同时,也带来了信息安全领域的诸多挑战.保护用户隐私及数据安全,是科技企业规范.健康发展的重心.近期,上海合合信息科技股份有限公司(简称"合合信 ...

  6. Libevent学习-源码下载和交叉编译,示例代码运行

    1. 官网 2. 交叉编译 我的当前环境 mips平台交叉编译说明 先解压下载后的libevent源码压缩包然后cd进入解压后的文件夹libevent-2.1.11-stable: <1. ./ ...

  7. Swift查看变量内存地址

    withUnsafePointer 不说话,先放代码 withUnsafeBufferPointer(to: a) { point in let address = UnsafeRawPointer( ...

  8. [OI] 莫比乌斯函数与莫比乌斯反演

    9. 莫比乌斯函数与莫比乌斯反演 9.1 莫比乌斯函数 9.1.1 定义 设 \(\mu\) 为莫比乌斯函数,则有: \[\mu(x)=\begin{cases}1\qquad (n=1)\\ 0\q ...

  9. 能用到“退休”的 600条 Linux 命令,可以解决日常99%的问题~

    1.基本命令 uname -m 显示机器的处理器架构 uname -r 显示正在使用的内核版本 dmidecode -q 显示硬件系统部件 (SMBIOS / DMI) hdparm -i /dev/ ...

  10. LinearRegression线性回归

    1.LinearRegression将方程分为两个部分存放,coef_存放回归系数,intercept_则存放截距,因此要查看方程,就是查看这两个变量的取值. 2.回归系数(regression co ...