-
Notifications
You must be signed in to change notification settings - Fork 9.7k
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
Etcdctl error message may confuse users #17332
Comments
@huanghj78 what value are you using for context timeout? And can you increase the context timeout to avoid context deadline errors? |
@rittikdasgupta Thank you for your reply! I use the default context.
My concern is that there will inevitably be occurrences of timeout errors at certain times. In such situations, the inconsistency between the server and client handling logic may lead to user confusion. |
The data displayed in the 'target' field is inconsistent with what actually occurs. |
@huanghj78 I have seen these logs many times before but never bothered to investigate. Do you have any clues on when this occurs/how to reproduce this? |
Try debugging a test case such as Replacing an etcd member and you'll come across this error. However, if you run the test case directly, you won't be encountering this error since time to complete the operation didn't exceed the time allotted to complete the operation. |
@nitishfy is there any AI left for this issue? |
Bug report criteria
What happened?
When etcdserver takes a long time to process requests, etcdctl reports an timeout error:
For this error message, from the user's perspective, this request may have failed, but in reality, it is still possible for it to execute successfully.
![image](https://private-user-images.githubusercontent.com/55356089/300372258-630e916b-e631-4c36-86af-3f79f7432acb.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjE5MDY4NjEsIm5iZiI6MTcyMTkwNjU2MSwicGF0aCI6Ii81NTM1NjA4OS8zMDAzNzIyNTgtNjMwZTkxNmItZTYzMS00YzM2LTg2YWYtM2Y3OWY3NDMyYWNiLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA3MjUlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwNzI1VDExMjI0MVomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTFmOWRmMjk0YTZkY2RlMmZmMzU0N2JkNWQ0OTIzMTNjZGYzM2EwZjFmNWI2YzYyNWE4YTcyNDczYjQ0MDZkOGYmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.II7xP2UAdCfUzqQn1GJwa-1xemyE6x0_d1BEs2daPT4)
What did you expect to happen?
Ensure consistency in logic between the server and client, or refine client-side error messages.
How can we reproduce it (as minimally and precisely as possible)?
Injecting network latency or simply inserting sleep into the source code
Anything else we need to know?
No response
Etcd version (please run commands below)
Etcd configuration (command line flags or environment variables)
paste your configuration here
version: "3.6"
services:
node1:
image: etcd:debug1
volumes:
- node1-data:/etcd-data
expose:
- 2379
- 2380
networks:
debug_etcd:
ipv4_address: 172.16.238.100
environment:
- ETCDCTL_API=3
command:
- /usr/local/bin/etcd
- --data-dir=/etcd-data
- --name
- node1
- --initial-advertise-peer-urls
- http://172.16.238.100:2380
- --listen-peer-urls
- http://0.0.0.0:2380
- --advertise-client-urls
- http://172.16.238.100:2379
- --listen-client-urls
- http://0.0.0.0:2379
- --initial-cluster
- node1=http://172.16.238.100:2380,node2=http://172.16.238.101:2380,node3=http://172.16.238.102:2380
- --initial-cluster-state
- new
- --initial-cluster-token
- docker-etcd
node2:
image: etcd:debug1
volumes:
- node2-data:/etcd-data
networks:
debug_etcd:
ipv4_address: 172.16.238.101
environment:
- ETCDCTL_API=3
expose:
- 2379
- 2380
command:
- /usr/local/bin/etcd
- --data-dir=/etcd-data
- --name
- node2
- --initial-advertise-peer-urls
- http://172.16.238.101:2380
- --listen-peer-urls
- http://0.0.0.0:2380
- --advertise-client-urls
- http://172.16.238.101:2379
- --listen-client-urls
- http://0.0.0.0:2379
- --initial-cluster
- node1=http://172.16.238.100:2380,node2=http://172.16.238.101:2380,node3=http://172.16.238.102:2380
- --initial-cluster-state
- new
- --initial-cluster-token
- docker-etcd
node3:
image: etcd:debug1
volumes:
- node3-data:/etcd-data
networks:
debug_etcd:
ipv4_address: 172.16.238.102
environment:
- ETCDCTL_API=3
expose:
- 2379
- 2380
command:
- /usr/local/bin/etcd
- --data-dir=/etcd-data
- --name
- node3
- --initial-advertise-peer-urls
- http://172.16.238.102:2380
- --listen-peer-urls
- http://0.0.0.0:2380
- --advertise-client-urls
- http://172.16.238.102:2379
- --listen-client-urls
- http://0.0.0.0:2379
- --initial-cluster
- node1=http://172.16.238.100:2380,node2=http://172.16.238.101:2380,node3=http://172.16.238.102:2380
- --initial-cluster-state
- new
- --initial-cluster-token
- docker-etcd
volumes:
node1-data:
node2-data:
node3-data:
networks:
debug_etcd:
driver: bridge
ipam:
driver: default
config:
-
subnet: 172.16.238.0/24
Etcd debug information (please run commands below, feel free to obfuscate the IP address or FQDN in the output)
Relevant log output
No response
The text was updated successfully, but these errors were encountered: