Hello. I try to start with vault. I try to run it in developer mode from docker container. Here is my last docker command:
docker run --cap-add=IPC_LOCK --name=dev-vault -e 'VAULT_LOCAL_CONFIG={\"ui\":\"true\" }' -e 'VAULT_DEV_ROOT_TOKEN_ID=myroot' -e 'VAULT_DEV_LISTEN_ADDRESS=127.0.0.1:8200' -e 'VAULT_ADDR=http://localhost:8200' -p 8200:8200 vault
Container starts without errors, I get vault status from CLI.
But attempt to open UI in Chrome results in ERR_EMPTY_RESPONSE error, Firefox reports connection dropped.
I have another docker containers (for example Grafana) and their UI is reachable, so doesn’t seem to be a network problem or firewall, etc.
same with this command:
docker run --cap-add=IPC_LOCK --name=dev-vault -e 'VAULT_DEV_LISTEN_ADDRESS=127.0.0.1:8200' -p 8200:8200 vault
If I try to use Transit engine to encode some data using Python:
client = hvac.Client(url='http://127.0.0.1:8200')
encrypt_data_response = client.secrets.transit.encrypt_data(name='hvac-key', plaintext='hi its me hvac')
i get ‘Connection aborted.’ error:
raise ConnectionError(err, request=request)
requests.exceptions.ConnectionError: ('Connection aborted.', RemoteDisconnected('Remote end closed connection without response'))
If I stop the container and run above commands, then I get connection time-out response (as expected), so in the above case, there is a connection with an engine. I wonder why I can’t reach UI.
What am I missing?
some details:
host OS: windows 10
Key Value
--- -----
Seal Type shamir
Initialized true
Sealed false
Total Shares 1
Threshold 1
Version 1.11.0
Build Date 2022-06-17T15:48:44Z
Storage Type inmem
Cluster Name vault-cluster-2f2a5189
Cluster ID 4f18 ..... 7ca74
HA Enabled false
==> Vault server configuration:
Api Address: http://127.0.0.1:8200
Cgo: disabled
Cluster Address: https://127.0.0.1:8201
Go Version: go1.17.11
Listener 1: tcp (addr: "127.0.0.1:8200", cluster address: "127.0.0.1:8201", max_request_duration: "1m30s", max_request_size: "33554432", tls: "disabled")
Log Level: info
Mlock: supported: true, enabled: false
Recovery Mode: false
Storage: inmem
Version: Vault v1.11.0, built 2022-06-17T15:48:44Z
Version Sha: ea296 ..... eb2f1
==> Vault server started! Log data will stream in below: