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. 肉夹馍(Rougamo)4.0.1 异步方法变量调试修复与IoC系列扩展

    肉夹馍(https://github.com/inversionhourglass/Rougamo),一款编译时AOP组件,无需在应用启动时进行初始化,也无需繁琐的配置:支持所有种类方法(同步和异步. ...

  2. Typora mac激活

    typora mac版本激活 我也是第一次使用mac电脑,在安装时基本上都是付费的,在mac下载使用typora是试用一段时间后是需要付费购买的,苦无能力有限只能绕一下,感谢网上的各位大佬的分享 来源 ...

  3. C#阿里境外服务器部署企业邮箱发邮件代码

    static string accountName = "发件人邮箱"; static string password = "发件人邮箱密码"; static ...

  4. Stooges – AI 孙燕姿

    很久没有写文章了... 最近听了 AI 孙燕姿 的一首歌 <一场游戏一场梦>, 有感而发. 所以特别写一篇记入一下我的这半年很火的 AI 的想法.

  5. vscode废掉了,跳转不到函数定义,无法自动补全,重装也没用的解决办法

    1. 先卸载掉所有已安装的插件 2. 卸载vscode 3. 删除个人配置和插件配置,涉及两个文件夹 4. 需要安装C/C++组件,下载对应的vsix文件 下载地址: https://github.c ...

  6. 【赵渝强老师】Oracle数据库的存储结构

    Oracle的存储结构分为:物理存储结构和逻辑存储结构. 一.物理存储结构:指硬盘上存在的文件 数据文件(data file) 一个数据库可以由多个数据文件组成的,数据文件是真正存放数据库数据的.一个 ...

  7. 《WebGL 编程指南》读书笔记(2、3章)

    完整 demo 和 lib 文件可以在 https://github.com/tengge1/webgl-guide-code 中找到. 第 2 章 第一个 WebGL 程序 function mai ...

  8. DevNow: Search with Lunrjs

    前言 假期真快,转眼国庆假期已经到了最后一天.这次国庆没有出去玩,在北京看了看房子,原先的房子快要到期了,找了个更加通透一点的房子,采光也很好. 闲暇时间准备优化下 DevNow 的搜索组件,经过上一 ...

  9. Cache和DMA一致性

    DMA应该多多少少知道点吧.DMA(Direct Memory Access)是指在外接可以不用CPU干预,直接把数据传输到内存的技术.这个过程中可以把CPU解放出来,可以很好的提升系统性能.那么DM ...

  10. /proc/pids/maps

    本实例中的用户空间地址从 0x00000000 到 0x80000000,从地址空间划分可知,从低到高依次是: 可执行文件的代码段.数据段.BSS段. 堆heap. 文件映射和匿名映射,包括vdso. ...