go-zero出现retrying of unary invoker failed或者Auto sync endpoints failed

go-zero出现retrying of unary invoker failed或者Auto sync endpoints failed,第1张

1. Auto sync endpoints failed

看看是不是docker-compose.yaml 的环境变量ETCD_ADVERTISE_CLIENT_URLS=http://etcd:2399这个配置错了,这个端口要跟对外暴露端口一致。etcd指服务ip,可以配置一个主机名etcd

{
    "level":"warn",
    "ts":"2022-01-29T10:51:48.408+0800",
    "logger":"etcd-client",
    "caller":"v3@v3.5.1/retry_interceptor.go:62",
    "msg":"retrying of unary invoker failed",
    "target":"etcd-endpoints://0xc0003c0000/etcd:2399",
    "attempt":0,
    "error":"rpc error: code = DeadlineExceeded desc = latest balancer error: last connection error: connection closed before server preface received"
}
{
    "level":"info",
    "ts":"2022-01-29T10:51:48.409+0800",
    "logger":"etcd-client",
    "caller":"v3@v3.5.1/client.go:207",
    "msg":"Auto sync endpoints failed.",
    "error":"context deadline exceeded"
}

参考:https://shenbaise9527.com/etcd-configure-error/

欢迎分享,转载请注明来源:内存溢出

原文地址: http://outofmemory.cn/langs/989903.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2022-05-21
下一篇 2022-05-21

发表评论

登录后才能评论

评论列表(0条)

保存