[英]java.io.IOException: Error getting access token for service account: connect timed out, iss: <>@<>.iam.gserviceaccount.com
i get this error after i change from local to docker-compose environmente, I deploy my containers with the same localtime and zone as my host using volumes:从本地更改为 docker-compose 环境后,我收到此错误,我使用卷部署容器,使用与主机相同的本地时间和区域:
volumes:
- "/etc/timezone:/etc/timezone:ro"
- "/etc/localtime:/etc/localtime:ro"
I verify it is ok and don't know why there is a connection time out error.我确认没问题,不知道为什么会出现连接超时错误。 what can be the error?
可能是什么错误? because it works fine when i run it on intellij and then it crashes in docker-compose deployment.
因为当我在 intellij 上运行它时它工作正常,然后它在 docker-compose 部署中崩溃。
This is where i get the error:这是我得到错误的地方:
this.credentials =
GoogleCredentials
.fromStream(is)
.createScoped(Collections.singletonList("https://www.googleapis.com/auth/rcsbusinessmessaging"));
this.credentials.refreshIfExpired();
Seems like a network issue but my firewall is down and i dont really know if it is allowing traffic from my container to the google's tokens endpoint.似乎是网络问题,但我的防火墙已关闭,我真的不知道它是否允许从我的容器到谷歌令牌端点的流量。 Variables "is" is an InputStream with my google credentials
变量“is”是带有我的谷歌凭据的 InputStream
Also I have a connection to pubsub as well我也和pubsub有联系
GoogleCredentials credentials =
GoogleCredentials.fromStream(is2)
.createScoped(
Collections.singletonList("https://www.googleapis.com/auth/pubsub"));
credentials.refreshIfExpired();
Where "is2" is another inputstream with my service account key.其中“is2”是我的服务帐户密钥的另一个输入流。
It was a network issue solved it in the yml file: network_mode: "bridge" or network_mode: "host"这是一个在 yml 文件中解决的网络问题:network_mode: "bridge" 或 network_mode: "host"
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.