-
Notifications
You must be signed in to change notification settings - Fork 10k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
etcd raftindex never consistent #19701
Comments
/assign |
Hey, can you retry your issue on the current patch version of 3.5? That is, 3.5.21? |
I see. @hongliang5316, I'll try to help with this issue 😄 . I'll try to replicate it first, I hope you don't mind if I have any inquiries. |
Hi @hongliang5316 , can you tell me the exact command you used and what you did to enable and disable auth? |
hello, |
Ok, I managed to reproduce the issue. @hongliang5316 can you confirm that this is the exact issue you mentioned? |
etcd version: v3.5.21 Create a Cluster
In the terminal:
Create User
Enable Auth
Show Status Table
Result
Disable Auth
Show Status Table
Result
cc @henrybear327 pls lmk if i did anything wrong thx! |
Hello, Yes, I do the same as you. This should be abnormal. |
Thanks for the nice write-up! ;) |
The same issue is also encountered when using
|
This isn't an issue. It's expected behaviour. When Auth is enabled, each time when client connects to the server, it will authenticate and get a token, so the raftIndex will advance by 1; and
|
Ah I see, thanks @ahrtr |
Bug report criteria
What happened?
{"level":"warn","ts":"2025-04-03T08:59:21.650442+0800","caller":"auth/store.go:1183","msg":"invalid auth token","token":"epqYPGKRnYXOGunN.50653"}
{"level":"warn","ts":"2025-04-03T08:59:28.227083+0800","caller":"auth/store.go:1183","msg":"invalid auth token","token":"JWhaPozgpsUbIhrs.50863"}
{"level":"warn","ts":"2025-04-03T08:59:48.4305+0800","caller":"auth/store.go:1183","msg":"invalid auth token","token":"LMUDarkiUhYPgYgl.51574"}
client error:
The client's watcher resp is often canceled
{"level":"warn","ts":"2025-04-03T10:24:55.036264+0800","logger":"etcd-client","caller":"v3/retry_interceptor.go:63","msg":"retrying of unary invoker failed","target":"etcd-endpoints://0xc00051a780/{ip}:12379","attempt":0,"error":"rpc error: code = Unauthenticated desc = etcdserver: invalid auth token"}
{"level":"warn","ts":"2025-04-03T10:25:02.132197+0800","logger":"etcd-client","caller":"v3/retry_interceptor.go:63","msg":"retrying of unary invoker failed","target":"etcd-endpoints://0xc00051a780/{ip}:12379","attempt":0,"error":"rpc error: code = Unauthenticated desc = etcdserver: invalid auth token"}
{"level":"warn","ts":"2025-04-03T10:25:02.217804+0800","logger":"etcd-client","caller":"v3/retry_interceptor.go:63","msg":"retrying of unary invoker failed","target":"etcd-endpoints://0xc00051a780/{ip}:12379","attempt":0,"error":"rpc error: code = Unauthenticated desc = etcdserver: invalid auth token"}
{"level":"warn","ts":"2025-04-03T10:25:07.030061+0800","logger":"etcd-client","caller":"v3/retry_interceptor.go:63","msg":"retrying of unary invoker failed","target":"etcd-endpoints://0xc00051a780/{ip}:12379","attempt":0,"error":"rpc error: code = Unauthenticated desc = etcdserver: invalid auth token"}
I am very sure that the username and password entered by the client are correct.
What did you expect to happen?
No server or client errors
How can we reproduce it (as minimally and precisely as possible)?
ETCD_NAME=etcd01
ETCD_DATA_DIR=/data/etcd
ETCD_LISTEN_CLIENT_URLS=http://0.0.0.0:12379
ETCD_LISTEN_PEER_URLS=http://0.0.0.0:2380
ETCD_ADVERTISE_CLIENT_URLS=http://{ip}:12379
ETCD_INITIAL_ADVERTISE_PEER_URLS=http://10.0.0.6:2380
ETCD_INITIAL_CLUSTER=etcd01=http://10.0.0.6:2380,etcd02=http://10.2.0.8:2380,etcd03=http://10.1.0.17:2380
ETCD_INITIAL_CLUSTER_STATE=existing
ETCD_INITIAL_CLUSTER_TOKEN=etcd-cluster
ETCD_MAX_REQUEST_BYTES=5242880
ETCD_LOG_LEVEL=info
ETCD_LOG_OUTPUTS=/data/log/etcd/etcd.log
ETCD_AUTH_TOKEN=simple
ETCD_AUTH_TOKEN_TTL=3600
ETCD_NAME=etcd02
ETCD_DATA_DIR=/data/etcd
ETCD_LISTEN_CLIENT_URLS=http://0.0.0.0:12379
ETCD_LISTEN_PEER_URLS=http://0.0.0.0:2380
ETCD_ADVERTISE_CLIENT_URLS=http://{ip}:12379
ETCD_INITIAL_ADVERTISE_PEER_URLS=http://10.2.0.8:2380
ETCD_INITIAL_CLUSTER=etcd01=http://10.0.0.6:2380,etcd02=http://10.2.0.8:2380,etcd03=http://10.1.0.17:2380
ETCD_INITIAL_CLUSTER_STATE=existing
ETCD_INITIAL_CLUSTER_TOKEN=etcd-cluster
ETCD_MAX_REQUEST_BYTES=5242880
ETCD_LOG_LEVEL=info
ETCD_LOG_OUTPUTS=/data/log/etcd/etcd.log
ETCD_AUTH_TOKEN=simple
ETCD_AUTH_TOKEN_TTL=3600
ETCD_NAME=etcd03
ETCD_DATA_DIR=/data/etcd
ETCD_LISTEN_CLIENT_URLS=http://0.0.0.0:12379
ETCD_LISTEN_PEER_URLS=http://0.0.0.0:2380
ETCD_ADVERTISE_CLIENT_URLS=http://{ip}:12379
ETCD_INITIAL_ADVERTISE_PEER_URLS=http://10.1.0.17:2380
ETCD_INITIAL_CLUSTER=etcd01=http://10.0.0.6:2380,etcd02=http://10.2.0.8:2380,etcd03=http://10.1.0.17:2380
ETCD_INITIAL_CLUSTER_STATE=existing
ETCD_INITIAL_CLUSTER_TOKEN=etcd-cluster
ETCD_MAX_REQUEST_BYTES=5242880
ETCD_LOG_LEVEL=info
ETCD_LOG_OUTPUTS=/data/log/etcd/etcd.log
ETCD_AUTH_TOKEN=simple
ETCD_AUTH_TOKEN_TTL=3600
Anything else we need to know?
No response
Etcd version (please run commands below)
etcdctl version: 3.5.19
API version: 3.5
Etcd 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)
Relevant log output
The text was updated successfully, but these errors were encountered: