我有一个Hasicorp Vault服务器正在运行,当我使用下面的命令在本地对它进行卷曲请求时,出现错误(如下)。
当我运行命令curl -H "X-Vault-Token: $VAULT_TOKEN" $VAULT_ADDR/v1/secret/keys
时,它在Vault服务器上运行良好,但是当我从笔记本电脑上运行时,会出现错误。
$VAULT_TOKEN
和$VAULT_ADDR
均在本地计算机上正确设置。
错误
curl: (7) Failed to connect to example.com port 8200: Operation timed out
/etc/vault.hcl
backend "file" {
path = "/var/lib/vault"
scheme = "http"
redirect_addr = "http://example.com:8200"
VAULT_ADDR = "http://example.com:8200"
}
listener "tcp" {
address = "0.0.0.0:8200"
tls_disable = 0
tls_cert_file = "/etc/letsencrypt/live/example.com/fullchain.pem"
tls_key_file = "/etc/letsencrypt/live/example.com/privkey.pem"
}
答案 0 :(得分:1)
问题最终与库无关,而是与Azure上的端口8200
被阻止的防火墙问题有关。