Why does CoreOS etcd documentation show using port 8080 when creating an etcd proxy?

56 views
Skip to first unread message

John Masseria

unread,
Jun 22, 2016, 5:28:52 PM6/22/16
to CoreOS User
All of the documentation I've found on setting up an etcd proxy shows using port 8080 for `--listen-client-urls`?

This causes `etcdctl` running on the proxy host to not find the endpoint.  It appears to try ports 2379 and 4001 by default instead of 8080 which the proxy etcd is listening on.  See below:

core@giscoreos4 ~ $ etcdctl member list
Error:  dial tcp 127.0.0.1:2379: connection refused
core@giscoreos4
~ $ etcdctl member list
Error:  dial tcp 127.0.0.1:4001: connection refused
core@giscoreos4
~ $ etcdctl member list
Error:  dial tcp 127.0.0.1:4001: connection refused
core@giscoreos4
~ $ etcdctl member list
Error:  dial tcp 127.0.0.1:4001: connection refused
core@giscoreos4
~ $ etcdctl member list
Error:  dial tcp 127.0.0.1:2379: connection refused


I changed my `cloud-init` to use port 2379 as shown below.  This permits `etcdctl` to work on the proxy node.  

Is there any downside to doing this?

coreos:
  etcd2
:
    proxy
: on
#   listen-client-urls: "http://127.0.0.1:8080"
    listen
-client-urls: "http://127.0.0.1:2379"







Start an etcd proxy with a static configuration

To start a proxy that will connect to a statically defined etcd cluster, specify the initial-cluster flag:

etcd --proxy on \
--listen-client-urls http://127.0.0.1:8080 \
--initial-cluster infra0=http://10.0.1.10:2380,infra1=http://10.0.1.11:2380,infra2=http://10.0.1.12:2380

Start an etcd proxy with the discovery service

If you bootstrap an etcd cluster using the discovery service, you can also start the proxy with the same discovery.

To start a proxy using the discovery service, specify the discovery flag. The proxy will wait until the etcd cluster defined at the discovery url finishes bootstrapping, and then start to forward the requests.

Brandon Philips

unread,
Jun 22, 2016, 11:36:50 PM6/22/16
to John Masseria, CoreOS User, Gyu-Ho Lee, Josh Wood
I don't know why the docs work this way. Proxy should probably just use 2379. We should fix it; can you send a PR?

Brandon

--
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.

Josh Wood

unread,
Jun 23, 2016, 3:00:17 AM6/23/16
to Gyu-Ho Lee, Brandon Philips, John Masseria, CoreOS User
This has been fixed in etcd master (v3 track), as Gyu-Ho points out, in https://github.com/coreos/etcd/pull/5693.

Fix to 2.3 release branch in https://github.com/coreos/etcd/pull/5756.

Fix "backported" from there to published docs for etcd v2.3.7 in https://github.com/coreos-inc/coreos-pages/pull/747.

The docs on coreos.com will be updated soon.

Thanks for the report.

-Josh


On Wed, Jun 22, 2016 at 11:38 PM, Gyu-Ho Lee <gyu_h...@coreos.com> wrote:
I think someone already contributed to fix this here https://github.com/coreos/etcd/pull/5693.

We just need to stage this to our production documentation site?

--
Sincerely,
Gyu-Ho Lee

Reply all
Reply to author
Forward
0 new messages