etcdmain fails to start
Followed steps defined on the link but startup fails with the errors below: Probably incorrect localhost address used in startup.
2015-11-16 20:09:52.579262 I | etcdmain: setting maximum number of CPUs to 4, total number of available CPUs is 4 2015-11-16 20:09:52.579278 W | etcdmain: no data-dir provided, using default data-dir ./default.etcd 2015-11-16 20:09:52.579478 C | etcdmain: listen tcp 27.0.0.1:2380: bind: cannot assign requested address
- ./etcdctl set mykey 'this is awesome' Error: client: etcd cluster is unavailable or misconfigured error #0: dial tcp 127.0.0.1:4001: getsockopt: connection refused error #1: dial tcp 127.0.0.1:2379: getsockopt: connection refused
@ajaybhatnagar What is 27.0.0.1:2380? Should't it be 127.0.0.1:2380?
correct, binary is using 27.0.0.1:2380.
@ajaybhatnagar Can you share your command or script to start your etcd?
Script is like below, just replace the version with latest stable version 2.2.1 cd /var/tmp curl -L https://github.com/coreos/etcd/releases/download/v2.1.2/etcd-v2.1.2-linux-amd64.tar.gz -o etcd-v2.1.2-linux-amd64.tar.gz tar xzvf etcd-v2.1.2-linux-amd64.tar.gz mv etcd-v2.1.2-linux-amd64 /usr/local cd /usr/local/etcd-v2.1.2-linux-amd64
./etcd ./etcdctl set mykey "this is awesome" ./etcdctl get mykey
I cannot reproduce with 2.2.1. Did you run etcdctl first (before etcd)?
Following these instructions at this link: It does not mention to run etcdctl first.
https://github.com/coreos/etcd/releases/
curl -L https://github.com/coreos/etcd/releases/download/v2.2.1/etcd-v2.2.1-linux-amd64.tar.gz -o etcd-v2.2.1-linux-amd64.tar.gz tar xzvf etcd-v2.2.1-linux-amd64.tar.gz cd etcd-v2.2.1-linux-amd64 ./etcd
Output is below: root@calico-00:/usr/local/etcd-v2.2.1-linux-amd64# uname -r 3.16.0-52-lowlatency root@calico-00:/usr/local/etcd-v2.2.1-linux-amd64# ./etcd 2015-11-16 20:40:33.344205 I | etcdmain: etcd Version: 2.2.1 2015-11-16 20:40:33.344261 I | etcdmain: Git SHA: 75f8282 2015-11-16 20:40:33.344273 I | etcdmain: Go Version: go1.5.1 2015-11-16 20:40:33.344282 I | etcdmain: Go OS/Arch: linux/amd64 2015-11-16 20:40:33.344296 I | etcdmain: setting maximum number of CPUs to 4, total number of available CPUs is 4 2015-11-16 20:40:33.344306 W | etcdmain: no data-dir provided, using default data-dir ./default.etcd 2015-11-16 20:40:33.344465 C | etcdmain: listen tcp 27.0.0.1:2380: bind: cannot assign requested address
@ajaybhatnagar You should etcd first. Sorry if my comment made you confused. BTW are you still having this issue?
yep
Ignore the issue. Cause was /etc/hosts file with incorrect address. Thanks
Ah that makes sense. Thanks,
in my case ,i find can't ping 127.0.0.1 , so i run ifconfig lo up ,it works !