首页 > 解决方案 > 保险柜无法连接超时

问题描述

我有一个 Hasicorp Vault 服务器正在运行,当我使用下面的命令在本地对其进行 curl 请求时,我收到一个错误(如下)。

当我运行该命令curl -H "X-Vault-Token: $VAULT_TOKEN" $VAULT_ADDR/v1/secret/keys时,它在保管库服务器上运行良好,但是当我从笔记本电脑执行此命令时,它给了我错误。

两者$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"

}

标签: curltimeouthashicorp-vault

解决方案


问题最终与保管库没有任何关系,而是与8200Azure 上阻止的端口有关的防火墙问题。


推荐阅读