Trying to run single-node etcd under Docker

1,954 views
Skip to first unread message

Traun Leyden

unread,
May 10, 2015, 3:39:56 PM5/10/15
to coreo...@googlegroups.com

I have an Ubuntu VM running under Virtualbox, and I'm following these instructions to run a single node etcd in a docker container.  (I know this might sound pointless, but this is just a baby step in trying to get etcd working under Kubernetes as described here)

I'm confused on what to use for the "PUBLIC_IP" mentioned in the instructions, since this Ubuntu VM doesn't have a public IP, so I'm using the ip of the eth0 interface -- 10.0.2.15 in my case.  What should I be using?

If I start a container like this:

$ export PUBLIC_IP=10.0.2.15
$ sudo docker run -d -p 8001:8001 -p 5001:5001 quay.io/coreos/etcd:v2.0.10 -peer-addr ${PUBLIC_IP}:8001 -addr ${PUBLIC_IP}:5001 -name etcd-node1

I see the following logs in the docker container:

2015/05/10 19:23:19 etcd: no data-dir provided, using default data-dir ./etcd-node1.etcd
2015/05/10 19:23:19 etcd: listening for peers on http://[::]:8001
2015/05/10 19:23:19 etcd: listening for client requests on http://[::]:5001
2015/05/10 19:23:19 etcdserver: datadir is valid for the 2.0.1 format
2015/05/10 19:23:19 etcd: stopping listening for client requests on http://[::]:5001
2015/05/10 19:23:19 etcd: stopping listening for peers on http://[::]:8001
2015/05/10 19:23:19 etcd: etcd-node1 has different advertised URLs in the cluster and advertised peer URLs list

I'm puzzled about what the "http://[::]:5001" means -- it seems like it didn't acknowledge the address I passed in.  
 
I've also tried this:

$ sudo docker run -d -p 2379:2379 -p 2380:2380 -p 4001:4001 -p 7001:7001 quay.io/coreos/etcd:v2.0.10 -name etcd-node1

and the logs don't have the same error,  but I can't issue curl requests:

curl: (52) Empty reply from server

Any ideas?



Rob Szumski

unread,
May 10, 2015, 3:46:22 PM5/10/15
to Traun Leyden, coreo...@googlegroups.com
Check out the upstream guide for running etcd in Docker conatiners: https://coreos.com/etcd/docs/2.0.8/docker_guide.html#running-etcd-in-standalone-mode

--
You received this message because you are subscribed to the Google Groups "CoreOS User" group.
To unsubscribe from this group and stop receiving emails from it, send an email to coreos-user...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Traun Leyden

unread,
May 10, 2015, 4:00:41 PM5/10/15
to coreo...@googlegroups.com, traun....@gmail.com
Thanks!  That fixed it.

Now I'm going to try to figure out what ip address I should be using under Kubernetes, so I'll create a separate thread on the Google Container group.

Traun Leyden

unread,
May 10, 2015, 4:15:00 PM5/10/15
to coreo...@googlegroups.com

I posted a comment to this thread on the Google Containers group asking how to do this in a Pod spec.
Reply all
Reply to author
Forward
0 new messages