Error: Error: connect ECONNREFUSED 127.0.0.1:8200
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.
Hi @shanedasilva, could you please post what version of Vault and Vault-UI you are using?
Hey @djenriquez , thanks for getting back to me. Vault v0.8.3 Vault-UI: vlatest
@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.
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
The solution is to NOT use 127.0.0.1 or to use 0.0.0.0 --> use your local machines actual IP address
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.
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.