Closed myers-dev closed 2 years ago
ETCDCTL_API=3 etcdctl --endpoints https://127.0.0.1:2379 --cacert=/etc/kubernetes/pki/etcd/ca.crt --cert=/etc/kubernetes/pki/etcd/healthcheck-client.crt --key /etc/kubernetes/pki/etcd/healthcheck-client.key snapshot save ./snapshot.db
You need to put at the end: snapshot save ./snapshot.db
same error
vagrant@master-1:~$ sudo ETCDCTL_API=3 etcdctl member list --endpoints=https://127.0.0.1:2379 --cacert=/etc/etcd/ca.crt --cert=/etc/etcd/etcd-server.crt --key=/etc/etcd/etcd-server.key snapshot save ./snapshot.db --debug
ETCDCTL_CACERT=/etc/etcd/ca.crt
ETCDCTL_CERT=/etc/etcd/etcd-server.crt
ETCDCTL_COMMAND_TIMEOUT=5s
ETCDCTL_DEBUG=true
ETCDCTL_DIAL_TIMEOUT=2s
ETCDCTL_DISCOVERY_SRV=
ETCDCTL_ENDPOINTS=[https://127.0.0.1:2379]
ETCDCTL_HEX=false
ETCDCTL_INSECURE_DISCOVERY=true
ETCDCTL_INSECURE_SKIP_TLS_VERIFY=false
ETCDCTL_INSECURE_TRANSPORT=true
ETCDCTL_KEEPALIVE_TIME=2s
ETCDCTL_KEEPALIVE_TIMEOUT=6s
ETCDCTL_KEY=/etc/etcd/etcd-server.key
ETCDCTL_USER=
ETCDCTL_WRITE_OUT=simple
INFO: 2019/09/03 19:30:30 ccBalancerWrapper: updating state and picker called by balancer: IDLE, 0xc420137680
INFO: 2019/09/03 19:30:30 dialing to target with scheme: ""
INFO: 2019/09/03 19:30:30 could not get resolver for scheme: ""
INFO: 2019/09/03 19:30:30 balancerWrapper: is pickfirst: false
INFO: 2019/09/03 19:30:30 balancerWrapper: got update addr from Notify: [{127.0.0.1:2379
I installed ETCD on Windows, and the same problem occurred when I do this:"etcdctl put hello world".Does anyone know how to slove this problem,thanks.
I had the same issue due to a typo in my etcd certificate generation command that I didn't notice. If you "sudo systemctl stop etcd", then run "/usr/local/bin/etcd --debug $OPTIONS", where OPTIONS is all of the options listed in the systemd unit file (/etc/systemd/system/etcd), you should get some relevant output. Mine was certificate failures due to missing IP SAN information in the certificate (due to the typo).
Re-generating the certificate (properly) and copying it to the correct locations and restarting etcd fixed the issue for me.
In my case, it was the firewalld on the hosts, it worked after I turned it off.
context deadline exceeded
error is quite general. I suggest to look first the status of the etcd.service to confirm that the error is not coming due to service configuration error as such service etcd status
. If the service is not in active status most probably the problem is in the systemd unit file of the service related to misconfiguration. To confirm the bootstrap error of the service do sudo cat /var/log/syslog
If the error is couldn't find local name
change the name of the initial cluster with the hostname as such --initial-cluster ${ETCD_NAME}=https://
vagrant@master-1:~$ sudo ETCDCTL_API=3 etcdctl member list --endpoints=https://127.0.0.1:2379 --cacert=/etc/etcd/ca.crt --cert=/etc/etcd/etcd-server.crt --key=/etc/etcd/et cd-server.key Error: context deadline exceeded
What could be the reason for above error ?