首页 > 解决方案 > Hashicorp Vault + GKE 上的“java.net.SocketTimeoutException:连接超时”

问题描述

我有一个 3 节点 HA Hashicorp Vault 部署到 GKE(尝试使用 Raft 和 Consul 后端)。

带有 java 应用程序的 pod 也在 GKE 中运行。

我间歇性地看到java.net.SocketTimeoutException: connect timed out,但大多数情况下它工作正常。

我检查了 Vault 配置,没有配置资源配额,我尝试只使用内部服务而不是 ingress + google lb,它仍然是一样的。

完整的日志条目如下所示:

message:Failed executing getCredentials using address https://vault.example.com:443, open timeout 30, read timeout 30 and credentials Credentials(id=0, tenantId=1, vendorName=fortinet, values={}) @timestamp:Oct 11, 2021 @ 12:02:29.386 @version:1 logger_name:com.example.secret.service.impl.SecretStoreServiceImpl thread_name:http-nio-8080-exec-24 level:ERROR level_value:40,000 stack_trace:com.bettercloud.vault.VaultException: com.bettercloud.vault.rest.RestException: java.net.SocketTimeoutException: connect timed out at com.bettercloud.vault.api.Logical.read(Logical.java:118) at com.bettercloud.vault.api.Logical.read(Logical.java:74) at com.example.secret.service.impl.SecretStoreServiceImpl.getCredentials(SecretStoreServiceImpl.java:49) at com.example.secret.service.impl.SecretStoreServiceImpl.getCredentials(SecretStoreServiceImpl.java:77) at com.example.secret.controller.SecretStoreController.getCredentials(SecretStoreController.java:32) at jdk.internal.reflect.GeneratedMethodAccessor46.invoke(Unknown Source) at

可能是什么问题呢?

我已经启用了指标,并且没有看到资源等问题,并且审核日志中没有错误(即使审核中有很多日志并且我可能错过了smth)...

标签: javagoogle-kubernetes-enginehashicorp-vaultvaultgke-networking

解决方案


推荐阅读