-address not appearing to work

635 views
Skip to first unread message

cal...@well.ox.ac.uk

unread,
Jun 7, 2018, 7:49:47 AM6/7/18
to Vault
When using the vault cli on a machine not running the server, it seems that specifying the -address="https://vault:8200" has no affect, and localhost is still being called (doing vault login).

Jeff Mitchell

unread,
Jun 7, 2018, 10:35:22 AM6/7/18
to Vault
Hi there,

It's working for me:

$ unset VAULT_ADDR

$ vault login -address="http://127.0.0.1:8200" root
Success! You are now authenticated. The token information displayed below
is already stored in the token helper. You do NOT need to run "vault login"
again. Future Vault requests will automatically use this token.

Key                Value
---                -----
token              root
token_accessor     bce960c5-c918-18e7-0b43-e311801f253e
token_duration     ∞
token_renewable    false
token_policies     [root]

$ vault login -address="http://127.0.0.1:8202" root
Error authenticating: error looking up token: Get http://127.0.0.1:8202/v1/auth/token/lookup-self: dial tcp 127.0.0.1:8202: connect: connection refused

Best,
Jeff

On Thu, Jun 7, 2018 at 7:49 AM <cal...@well.ox.ac.uk> wrote:
When using the vault cli on a machine not running the server, it seems that specifying the -address="https://vault:8200" has no affect, and localhost is still being called (doing vault login).

--
This mailing list is governed under the HashiCorp Community Guidelines - https://www.hashicorp.com/community-guidelines.html. Behavior in violation of those guidelines may result in your removal from this mailing list.
 
GitHub Issues: https://github.com/hashicorp/vault/issues
IRC: #vault-tool on Freenode
---
You received this message because you are subscribed to the Google Groups "Vault" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vault-tool+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/vault-tool/d3dff4cd-a534-41a0-94b2-f7ab572855cd%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

cal...@well.ox.ac.uk

unread,
Jun 7, 2018, 11:57:05 AM6/7/18
to Vault
I think the issue was i was trying:
 vault auth

Which appears to only work on localhost. testing with the default address might not be the best option.

I'm now wrestling with certificates, but no issues with the software.

Jeff Mitchell

unread,
Jun 7, 2018, 1:30:59 PM6/7/18
to Vault
Hi Callum,

I'm not sure; vault auth works for me too:

$ unset VAULT_ADDR

$ vault auth -address="http://127.0.0.1:8200" rootWARNING! The "vault auth ARG" command is deprecated and is now a subcommand
for interacting with auth methods. To authenticate locally to Vault, use
"vault login" instead. This backwards compatibility will be removed in Vault
0.11 (or later).

Success! You are now authenticated. The token information displayed below
is already stored in the token helper. You do NOT need to run "vault login"
again. Future Vault requests will automatically use this token.

Key                Value
---                -----
token              root
token_accessor     0e698e02-ff51-99c6-b706-ae5ed6c2eaa4
token_duration     ∞
token_renewable    false
token_policies     [root]

$ vault auth -address="http://127.0.0.1:8202" rootWARNING! The "vault auth ARG" command is deprecated and is now a subcommand
for interacting with auth methods. To authenticate locally to Vault, use
"vault login" instead. This backwards compatibility will be removed in Vault
0.11 (or later).

Error authenticating: error looking up token: Get http://127.0.0.1:8202/v1/auth/token/lookup-self: dial tcp 127.0.0.1:8202: connect: connection refused

Best,
Jeff

--
This mailing list is governed under the HashiCorp Community Guidelines - https://www.hashicorp.com/community-guidelines.html. Behavior in violation of those guidelines may result in your removal from this mailing list.
 
GitHub Issues: https://github.com/hashicorp/vault/issues
IRC: #vault-tool on Freenode
---
You received this message because you are subscribed to the Google Groups "Vault" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vault-tool+...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages