Closed subhasisbanik closed 2 years ago
any update on this?
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
This issue has been automatically closed because it had not recent activity during the stale period.
Description I am trying to set up a Hashicorp Vault cluster with docker-compose and passing the config file as a parameter in the "command" section like:
command: "server -config=/vault/config/vault.hcl"
But it fails with the error line below: Error initializing listener of type tcp: listen tcp 127.0.0.1:8200: bind: address already in use
Steps to reproduce the issue:
version: "3.8" services: consul1: image: consul:1.8.0 user: root ports:
docker stack deploy -c docker-compose.yml vcs
Describe the results you received: The consul services started up as expected. But for the vault below is the error log:
Error initializing listener of type tcp: listen tcp 127.0.0.1:8200: bind: address already in use
Describe the results you expected:
The below log was expected after the vault started up:
Vault server started! Log data will stream in below:
Additional information you deem important (e.g. issue happens only occasionally): The above error of address binding was resolved when the -config paramter was removed. Even when a docker run was tried with the -config parameter was tried on the same docker image(vault:latest). So this can be expected that the issue is persistin in docker-compose
Output of
docker compose version
:Output of
docker info
:Additional environment details:
2 files were used to run the vault image. Attached below:
"default_lease_ttl" = "24h" "disable_mlock" = "true" "max_lease_ttl" = "24h"
// Enable UI "ui" = "true"
// Consul Backend storage "consul" { address = "consul1:8500" path = "vault/" }
"api_addr" = "127.0.0.1:8200"
// TCP Listener "listener" "tcp" { "address" = "127.0.0.1:8200" "cluster_address" = "vault1:8200" "tls_disable" = true "tls_cert_file" = "/vault/certs/vault.crt" "tls_client_ca_file" = "/vault/certs/ca.crt" "tls_key_file" = "/vault/certs/vault.key"
} "plugin_directory" = "/vault/plugin"
[req] default_bits = 2048 encrypt_key = no default_md = sha256 prompt = no utf8 = yes
Speify the DN here so we aren't prompted (along with prompt = no above).
distinguished_name = req_distinguished_name
Extensions for SAN IP and SAN DNS
req_extensions = v3_req
Be sure to update the subject to match your organization.
[req_distinguished_name] C = GE ST = Test L = Test O = Test CN = 1.2.3.4
Allow client and server auth. You may want to only allow server auth.
Link to SAN names.
[v3_req] basicConstraints = CA:FALSE subjectKeyIdentifier = hash keyUsage = digitalSignature, keyEncipherment extendedKeyUsage = clientAuth, serverAuth subjectAltName = @alt_names
Alternative names are specified as IP.# and DNS.# for IP addresses and
DNS accordingly.
[alt_names] IP.1 = 127.0.0.7 IP.2 = 1.2.3.4 IP.3 = 1.2.3.4 IP.4 = 127.0.0.1 DNS.1 = localhost
Kindly help in this