etcd cannot start with lone `-name` flag

Created on 28 Oct 2014  路  6Comments  路  Source: etcd-io/etcd

I expect etcd to start up with the default configuration if I override the name from "default" to something else. Here, I tried to start etcd as "node1", but it refused to proceed:

% ./src/etcd/bin/etcd -name=node1
2014/10/28 08:23:09 etcd: no data-dir provided, using default data-dir ./node1.etcd
2014/10/28 08:23:09 etcdserver: couldn't find local name node1 in the initial cluster configuration
arebug

All 6 comments

That is expected. Since the name node1 does not match the name in the default initial-cluster-configuration default=xxx. What we should do is to print out what the current initial-cluster-configuration is to show why they are unmatched.

Maybe we should be harsher. Give user a warning/panic/exit if it sets name without setting peer-url, client-url and initial-stuff/data-dir

I'm trying to setup a cluster using the Dockerized version of etcd. Those error messages are still too hard for very simple concepts. I hope it does give insights to users in how to solve the problem, just described by @xiang90...

I still need to dig deeper into the documentation just to understand what else it is needed... Any pointers? Not to mention that, when running inside the container, etcd should bind to "0.0.0.0" as the default ip address, so that it is reachable by other cluster members.

[root@pppdc9prd3ga mdesales]# docker run -ti -p 7001:7001 -p 4001:4001 quay.io/coreos/etcd:v0.5.0_alpha.2 /etcd -name registry-index
2014/11/09 18:15:58 etcd: listening for peers on http://localhost:2380
2014/11/09 18:15:58 etcd: listening for peers on http://localhost:7001
2014/11/09 18:15:58 etcd: listening for client requests on http://localhost:2379
2014/11/09 18:15:58 etcd: listening for client requests on http://localhost:4001
2014/11/09 18:15:58 etcd: stopping listening for client requests on http://localhost:4001
2014/11/09 18:15:58 etcd: stopping listening for client requests on http://localhost:2379
2014/11/09 18:15:58 etcd: stopping listening for peers on http://localhost:7001
2014/11/09 18:15:58 etcd: stopping listening for peers on http://localhost:2380
2014/11/09 18:15:58 etcd: couldn't find local name registry-index in the initial cluster configuration

at least, it should work if i follow the official doc:
https://github.com/coreos/etcd/blob/master/Documentation/clustering.md

@marcellodesales etcd listens to localhost by default.
We expect our users to read the clustering doc very carefully if they want to set up a clustered etcd.
And we set "barriers" intentionally for the clustering case.
Avoiding the "wrong" behavior early is much better than later.

@xiang90, @wangyumi, thanks for the info... I will look at this later...

Was this page helpful?
0 / 5 - 0 ratings