Open 1511563371 opened 2 years ago
I'm not sure if it's your formatting issue. Check your yaml format first please.
i meet this problem too. and i do this: fmt.Println("has etcd ?", c.HasEtcd()) fmt.Println("etcd hosts:", c.Etcd.Hosts) fmt.Println("validator etcd", c.Etcd.Validate())
i get:
has etcd ? true
etcd hosts: [etcd:2379]
validator etcd
the Validate code is : func (c EtcdConf) Validate() error { if len(c.Hosts) == 0 { return errEmptyEtcdHosts } else if len(c.Key) == 0 { return errEmptyEtcdKey } else { return nil } }
so, I print key and hosts fmt.Println("has etcd ?", c.HasEtcd()) fmt.Println("etcd hosts:", c.Etcd.Hosts) fmt.Println("etcd Key:", c.Etcd.Key) fmt.Println("validator etcd", c.Etcd.Validate())
i got
has etcd ? true
etcd hosts: [etcd:2379]
etcd Key: order.rpc
validator etcd
i found is my yaml xxxRpc config is nil, but the error is so simple
I meet the same error..
I meet the same error..
I wrote wrong config, after correction it's ok.
empty etcd hosts Name: identify.rpc ListenOn: 0.0.0.0:9004
Etcd: Hosts:
Mysql: DataSource: root:123456@tcp(mysql:3306)/mall?charset=utf8mb4&parseTime=true&loc=Asia%2FShanghai
CacheRedis:
Salt: HWVOFkGgPTryzICwd7qnJaZR9KQ2i8xe
ymal里面如何配置
Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑🤝🧑👫🧑🏿🤝🧑🏻👩🏾🤝👨🏿👬🏿
empty etcd hosts Name: identify.rpc ListenOn: 0.0.0.0:9004
Etcd: Hosts:
Mysql: DataSource: root:123456@tcp(mysql:3306)/mall?charset=utf8mb4&parseTime=true&loc=Asia%2FShanghai
CacheRedis:
Salt: HWVOFkGgPTryzICwd7qnJaZR9KQ2i8xe
ymal里面如何配置
i found is my yaml xxxRpc config is nil, but the error is so simple
i found my yaml property name(xxxRpc) must be the same as in the config.go
遇到同样的问题。 漏配置了 xxxRPC, 结果报错内容是 etcd 配置不存在。 这种问题很难怀疑到框架身上,排查了半天,抱着侥幸心理查到这里,结果真的是框架问题。
@kevwan
Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑🤝🧑👫🧑🏿🤝🧑🏻👩🏾🤝👨🏿👬🏿
Encountered the same problem. A was not configured, and the error message was that the etcd configuration does not exist.
Describe the bug A clear and concise description of what the bug is.