vault-ui icon indicating copy to clipboard operation
vault-ui copied to clipboard

Error: Error: connect ECONNREFUSED 127.0.0.1:8200

Open shanedasilva opened this issue 8 years ago • 7 comments

Getting this error when attempting token auth. Endpoint it's hitting is http://localhost:8000/v1/auth/token/lookup-self?vaultaddr=http:%2F%2F127.0.0.1:8200.

I do have Vault running on http://127.0.0.1:8200 so not sure how to debug this.

shanedasilva avatar Oct 16 '17 17:10 shanedasilva

Hi @shanedasilva, could you please post what version of Vault and Vault-UI you are using?

djenriquez avatar Oct 16 '17 22:10 djenriquez

Hey @djenriquez , thanks for getting back to me. Vault v0.8.3 Vault-UI: vlatest

shanedasilva avatar Oct 19 '17 16:10 shanedasilva

@shanedasilva are you running Vault-UI as a docker container? If so, can you exec into Vault-UI and see if you can hit vault from there.

Also, are you using --net host host networking? If not, Vault-UI is likely attempting to access 8200 from the virtual network it is running in, which is different than the localhost route on the host. If you can't use host networking, you'll have to use the local IP address of the host.

djenriquez avatar Oct 19 '17 20:10 djenriquez

Hi @djenriquez ,

I'm experiencing the same issue as @shanedasilva .

Vault: v0.8.3 Vault-ui: latest

Error: "Error: Error:connect ECONNREFUSED 127.0.0.1L8201"

Command: docker run --rm -it -p 8000:8000 -e VAULT_URL_DEFAULT=http://10.36.94.20:8200 -e VAULT_AUTH_DEFAULT=USERNAMEPASSWORD -e VAULT_ADDR=http://10.36.94.20:8200 -e VAULT_LOCAL_CONFIG='{"listener" : { "tcp" : {"address" : "0.0.0.0:8200", "tls_cert_file" : "/misc/devserver.crt", "tls_key_file" : "/misc/devserver.key" } } }' --net host --name vault-ui djenriquez/vault-ui

reegz avatar Nov 02 '17 11:11 reegz

The solution is to NOT use 127.0.0.1 or to use 0.0.0.0 --> use your local machines actual IP address

cloudtraining avatar Apr 20 '18 15:04 cloudtraining

Is there an actual documented fix for this? I was troubleshooting this for some time a while ago, have tried to use again and can't get it to connect on localhost, 0.0.0.0, 127.0.0.1, or my local IP.

seonixx avatar Feb 08 '19 03:02 seonixx

I'm having the same issue: cannot get server to connect to localhost, 0.0.0.0, 127.0.0.1, or my local IP. Though when I use my local IP, I am getting a timeout error as opposed to the connection refused error I see for the others.

hsw48 avatar Mar 01 '19 15:03 hsw48