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. LaTeX 三种短横线的区别

    在 LaTeX 中,有三种基本的短横线,它们各自的长度和用法都有所不同.这三种短横线分别是连字符.短划线(或数字短横)和长划线.下面是它们的具体描述和用法: 连字符 (Hyphen, '-') 用法: ...

  2. python configparser 创建ini文件,动态读取与修改配置文件,以及保存与读取字符串与QColor类型的配置

    # 动态配置所需 from import ConfigParser # 获取系统语系所需 import locale # QColor 类型的传参所需 from PyQt6.QtGui import ...

  3. OpenFeign深入学习笔记

    OpenFeign 是一个声明式的 Web 服务客户端,它使得编写 Web 服务客户端变得更加容易.OpenFeign 是在 Spring Cloud 生态系统中的一个组件,它整合了 Ribbon(客 ...

  4. 淘宝打单发货接口,淘宝打单发货API

    许多做系统功能的小伙伴经常面对的一个功能是对接淘宝开放平台,在自己系统中进行打单发货. 但是,目前淘宝开放平台,已经关闭了相关的相关的权限申请,具体可查看相关公告.有需要这个权限的,可以站内信联系我, ...

  5. Openstack-创建实例错误

    创建实例错误 实例执行所请求操作失败,实例处于错误状态.: 请稍后再试 [错误: Build of instance beaeb5e0-26eb-4044-ae14-bb87d509886d abor ...

  6. hexo使用小技巧

    1.在博客中加入图片 使用语法 {% asset_img 1.jpg %} 这样hexo会自动渲染1.jpg.,然后1.jpg的位置需要放在同文件名的文件夹中,比如这篇博客叫hexo使用小技巧,那么这 ...

  7. .NET 的 Native AOT 现在是什么样的?

    今天要写的这篇文章源自昨天在朋友圈发的文章<UWP 通过 .NET 9 和Native AOT 的支持实现 UWP 应用的现代化>[1],一位小伙伴的对话让我想全面梳理下Native AO ...

  8. Java 之跨docker容器备份数据库

    Java 之跨docker容器备份数据库 摘] java中执行数据库备份,每隔10分钟备份一次,保留四份备份文件,项目在windows系统下运行备份命令没问题.项目采用docker部署后,jar部署在 ...

  9. 官方 | 征集 Flutter 桌面端应用程序的构建案例

    亲爱的社区成员们,大家好! Google Flutter 团队希望了解开发者们使用 Flutter 构建的桌面端应用程序,以提高 Flutter 桌面端的测试覆盖率,邀请大家通过表单的形式提交征集和反 ...

  10. 一,初始 MyBatis-Plus

    一,初始 MyBatis-Plus @ 目录 一,初始 MyBatis-Plus 1. MyBatis-Plus 的概述 2. 入门配置第一个 MyBatis-Plus 案例 3. 补充说明: 3.1 ...