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

Cannot set "--registry_address" #10

Closed
averrin opened this issue Jan 4, 2016 · 8 comments
Closed

Cannot set "--registry_address" #10

averrin opened this issue Jan 4, 2016 · 8 comments

Comments

@averrin
Copy link

averrin commented Jan 4, 2016

root@f6f37458c0a8:/go# micro list services --registry "consul" --registry_address "consul:8500"
Incorrect Usage.

NAME:
micro list services - List services in registry

USAGE:
micro list services [arguments...]

OR ignore it:

root@f6f37458c0a8:/go# micro --registry "consul" --registry_address "consul:8500" list services
Get http://127.0.0.1:8500/v1/catalog/services: dial tcp 127.0.0.1:8500: getsockopt: connection refused

even from env

root@f6f37458c0a8:/go# env | grep MICRO
MICRO_REGISTRY_ADDRESS=consul:8500
MICRO_REGISTRY=consul
root@f6f37458c0a8:/go# micro list services
Get http://127.0.0.1:8500/v1/catalog/services: dial tcp 127.0.0.1:8500: getsockopt: connection refused

but

server --registry "consul" --registry_address "consul:8500"

works

@asim
Copy link
Member

asim commented Jan 4, 2016

Micro is a command line executable that has sub commands whereas the server binary does not. The expectation is that global flags such as registry and registry_address be set after execution of the binary and any further commands. So your second method of use micro --registry "consul" --registry_address "consul:8500" list services is correct.

@averrin
Copy link
Author

averrin commented Jan 4, 2016

so
micro --registry "consul" --registry_address "consul:8500" list services

ignore it=(

@asim
Copy link
Member

asim commented Jan 4, 2016

Indeed. Sorry if there's any confusion. I can update the docs to make it more clear.

@averrin
Copy link
Author

averrin commented Jan 4, 2016

But how i can force new registry_address ?

root@f6f37458c0a8:/go# micro --registry "consul" --registry_address "consul:8500" list services
Get http://127.0.0.1:8500/v1/catalog/services: dial tcp 127.0.0.1:8500: getsockopt: connection refused

Why micro still trying 127.0.0.1?

@asim
Copy link
Member

asim commented Jan 4, 2016

Ah yea I see what you're saying. It's a bug. I'm looking at it now. Give me a few minutes.

@asim
Copy link
Member

asim commented Jan 4, 2016

Ok this should be fixed. Please try again and let me know.

@averrin
Copy link
Author

averrin commented Jan 4, 2016

yeah, now works. thanks!

@asim
Copy link
Member

asim commented Jan 4, 2016

No worries. Thanks for trying out micro!

@asim asim closed this as completed Jan 4, 2016
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