获取oauth2令牌时TLS握手超时

问题描述 投票:1回答:1

[尝试删除Google云实例时,我一直收到以下错误。创建VM时看到相同的错误。几分钟前,在创建实例时,我的Google chrome浏览器已经挂了很长时间了,许多应用程序无法按预期运行。我重新启动系统后,一直出现此错误。如何摆脱这个错误?

* google_compute_instance.default: google_compute_instance.default: Error reading Instance kubewithssh: Get https://www.googleapis.com/compute/v1/projects/crucial-bonsai-109417/zones/us-central1-a/instances/kubewithssh?alt=json: oauth2: can not fetch token: Post https://accounts.google.com/o/oauth2/token: net/http: TLS handshake timeout
google-chrome google-cloud-platform terraform
1个回答
0
投票

在我们的案例中,根本原因是资源不足。增加Kubernetes清单中的部署限制后,问题已解决。

但是,Google建议采取一些步骤来调查此问题。参见最新文档Troubleshooting | Connect documentation

oauth2:无法获取令牌错误

症状

您可能会遇到这样的错误:

...  dialer: dial: connection to gkeconnect.googleapis.com:443 failed
after 388.080605ms: serve: egress call failed: rpc error: code =
Unauthenticated desc = transport: oauth2: cannot fetch token: Post
https://oauth2.googleapis.com/token: read tcp 192.168.1.40:5570->1.1.1.1:80
read: connection reset by peer

可能的原因

这可能意味着上游HTTP代理重置了连接,这很可能是因为HTTP代理不允许使用此特定的URL。在上面的示例中,1.1.1.1:80是HTTP代理地址。

分辨率

检查您的HTTP代理白名单是否包含以下URL /域:

gkeconnect.googleapis.com
oauth2.googleapis.com/token
www.googleapis.com/oauth2/v1/certs
© www.soinside.com 2019 - 2024. All rights reserved.