ng-monitoring icon indicating copy to clipboard operation
ng-monitoring copied to clipboard

Advertise address in topology is invalid when IP is changed

Open breezewish opened this issue 3 years ago • 0 comments

When network connection is re-established (so that local IP is changed), TiDB Dashboard keeps using a wrong advertise address, which makes TiDB Dashboard failed to connect to the ng-monitoring server:

$ bin/ng-monitoring-server --pd.endpoints "127.0.0.1:2379"

$ etcdctl get /topology --prefix
/topology/ng-monitoring/192.168.3.105:12020/info
{"git_hash":"1afcaa990af5c65b222e0ab59171867248645f4a","ip":"192.168.3.105","listening_port":12020,"start_timestamp":1644225105}
...

$ curl http://192.168.3.105:12020
curl: (56) Recv failure: Connection reset by peer

$ ifconfig
en0: 
...
	inet 192.168.126.218 netmask 0xfffffc00 broadcast 192.168.127.255
...

This case is pretty common in local development machines, where IP address are dynamically assigned.

Bug is introduced in https://github.com/pingcap/ng-monitoring/pull/101

breezewish avatar Feb 08 '22 06:02 breezewish