Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CONSUL_RPC_ADDR not used in 0.6.0 #1487

Closed
tzz opened this issue Dec 10, 2015 · 4 comments
Closed

CONSUL_RPC_ADDR not used in 0.6.0 #1487

tzz opened this issue Dec 10, 2015 · 4 comments

Comments

@tzz
Copy link

tzz commented Dec 10, 2015

According to the docs CONSUL_RPC_ADDR should work but it doesn't seem to:

% echo $CONSUL_RPC_ADDR
10.10.10.2:8400

% consul members
Error connecting to Consul agent: dial tcp 127.0.0.1:8400: getsockopt: connection refused

% consul members -rpc-addr=$CONSUL_RPC_ADDR
Node       Address              Status  Type    Build  Protocol  DC
myhost    10.10.10.2:8301   alive    client  0.6.0  2         mydc

% consul --version
Consul v0.6.0
Consul Protocol: 3 (Understands back to: 1)
@slackpad
Copy link
Contributor

Hi @tzz this is a weird one :-) I looked through the code and the support is there and I can't seem to reproduce this locally (it respects the environment variable). What platform are you running on? Does env show the variable?

@tzz
Copy link
Author

tzz commented Dec 10, 2015

Oh damn this was a confusion between a K=V format file (to be used by Docker) and trying to use it for environment variables, which does not export them. Sorry for the trouble, Consul is working as designed, and thanks for the quick response.

@tzz tzz closed this as completed Dec 10, 2015
@slackpad
Copy link
Contributor

np!

@tzz
Copy link
Author

tzz commented Dec 11, 2015

For anyone looking to solve this in the future, the answer is to use set -a which will auto-export all the variables defined (and then turn it off with set +a):

set -a
source /my/environment/file
set +a

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants