go-zero
go-zero copied to clipboard
rpc not discovered after ETCD down and restarted
etcd崩溃的原因有可能是因为服务压力大造成的 重启之后,发现已经启动的rpc服务无法自动在etcd注册 然后手动重新启动所有rpc服务就可以了
I tried many times, didn't get it reproduced.
What's the steps to reproduce it?
我们这边也出现了这种情况,复现步骤如下:
- 开启一个服务,正常注册到etcd 中,观察etcd的节点 etcdctl get xxx_service --prefix=true,可以观察到注册成功
- 切掉服务和etcd的网络,然后观察 注册的数据还在,但是租约到期之后节点就没了
- 恢复网络,这时候是没法再次注册上去的,这样的话consumer会一直找不到注册的节点,这种情况下只能手动去重启服务,才能再次注册上去 @kevwan
Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑🤝🧑👫🧑🏿🤝🧑🏻👩🏾🤝👨🏿👬🏿
We also have this situation here, and the steps to reproduce are as follows:
- Start a service, register with etcd normally, observe etcd's node etcdctl get xxx_service --prefix=true, you can observe that the registration is successful
- Cut off the network of services and etcd, and then observe that the registered data is still there, but the node is gone after the lease expires
- To restore the network, it is impossible to register again at this time. In this case, the consumer will never find the registered node. In this case, you can only manually restart the service to register again @kevwan
I have the same problem,follow the steps:
- I have host A and host B
- host A run etcd and rpc service
- host B run the same rpc service
- restart etcd
- run etcdctl get --prefix "" the rpc service on host A have registed,but the one on host B not