-
Notifications
You must be signed in to change notification settings - Fork 10.2k
Open
Labels
Description
Bug report criteria
- This bug report is not security related, security issues should be disclosed privately via security@etcd.io.
- This is not a support request or question, support requests or questions should be raised in the etcd discussion forums.
- You have read the etcd bug reporting guidelines.
- Existing open issues along with etcd frequently asked questions have been checked and this is not a duplicate.
What happened?
Using kubeadm to initialize single-node cluster in local.
$ ➜ ~ kubeadm version
kubeadm version: &version.Info{Major:"1", Minor:"34", EmulationMajor:"", EmulationMinor:"", MinCompatibilityMajor:"", MinCompatibilityMinor:"", GitVersion:"v1.34.1", GitCommit:"93248f9ae092f571eb870b7664c534bfc7d00f03", GitTreeState:"clean", BuildDate:"2025-09-09T19:43:15Z", GoVersion:"go1.24.6", Compiler:"gc", Platform:"linux/amd64"}
$ ➜ ~ sudo kubeadm init --cri-socket /run/containerd/containerd.sock --pod-network-cidr=10.244.0.0/16There is a mirror static pod created by kubeadm
spec:
containers:
- command:
- etcd
- --advertise-client-urls=https://192.168.50.163:2379
- --cert-file=/etc/kubernetes/pki/etcd/server.crt
- --client-cert-auth=true
- --data-dir=/var/lib/etcd
- --feature-gates=InitialCorruptCheck=true
- --initial-advertise-peer-urls=https://192.168.50.163:2380
- --initial-cluster=fuweid=https://192.168.50.163:2380
- --key-file=/etc/kubernetes/pki/etcd/server.key
- --listen-client-urls=https://127.0.0.1:2379,https://192.168.50.163:2379
- --listen-metrics-urls=http://127.0.0.1:2381
- --listen-peer-urls=https://192.168.50.163:2380
- --name=fuweid
- --peer-cert-file=/etc/kubernetes/pki/etcd/peer.crt
- --peer-client-cert-auth=true
- --peer-key-file=/etc/kubernetes/pki/etcd/peer.key
- --peer-trusted-ca-file=/etc/kubernetes/pki/etcd/ca.crt
- --snapshot-count=10000
- --trusted-ca-file=/etc/kubernetes/pki/etcd/ca.crt
- --watch-progress-notify-interval=5s
image: registry.k8s.io/etcd:3.6.4-0
There is error log from ETCD
{"level":"warn","ts":"2025-10-30T01:31:29.092902Z","caller":"v3rpc/grpc.go:52","msg":"etcdserver: failed to register grpc metrics","error":"duplicate metrics collector registration attempted"}etcd/server/etcdserver/api/v3rpc/grpc.go
Lines 49 to 53 in d661826
| serverMetrics := grpc_prometheus.NewServerMetrics(mopts...) | |
| err := prometheus.Register(serverMetrics) | |
| if err != nil { | |
| s.Cfg.Logger.Warn("etcdserver: failed to register grpc metrics", zap.Error(err)) | |
| } |
Since there are multiple client urls, ETCD server registers metric into prometheus default register several times. We probably need individual register for each gRPC server instance.
What did you expect to happen?
Should not show error.
How can we reproduce it (as minimally and precisely as possible)?
ETCD listens on multiple endpoints
Anything else we need to know?
No response
Etcd version (please run commands below)
$ etcd --version
# paste output here
$ etcdctl version
# paste output hereEtcd configuration (command line flags or environment variables)
paste your configuration here
Etcd debug information (please run commands below, feel free to obfuscate the IP address or FQDN in the output)
$ etcdctl member list -w table
# paste output here
$ etcdctl --endpoints=<member list> endpoint status -w table
# paste output here