简体   繁体   English

java.io.IOException:获取服务帐户的访问令牌时出错:连接超时,ISS:<>@<>.iam.gserviceaccount.Z4D236D9A2D102C5Z006AD1C50DA4BEC5

[英]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.

相关问题 获取 java.io.IOException:获取服务帐户的访问令牌时出错:调用数据存储时连接超时 - Getting java.io.IOException: Error getting access token for service account: connect timed out while making a call to datastore GCP 从 googleapis.com/robot/v1/metadata/x509/my-service@**-**.iam.gserviceaccount.com 签名的 JWT 孩子不存在(消失),Z1D3ZFADBD9150349C 无效。 - GCP signed JWT kid does not exist (disappeared) from googleapis.com/robot/v1/metadata/x509/my-service@**-**.iam.gserviceaccount.com, JWT is invalid java.io.IOException:GCM 客户端中的 SERVICE_NOT_AVAILABLE - java.io.IOException: SERVICE_NOT_AVAILABLE in GCM Client Flutter java.io.IOException:FIS_AUTH_ERROR - Flutter java.io.IOException: FIS_AUTH_ERROR 密钥工具错误:java.io.IOException:密钥库格式无效 - keytool error: java.io.IOException: Invalid keystore format java.io.IOException: FIS_AUTH_ERROR in Android Z03548EZFF48D09214119934 - java.io.IOException: FIS_AUTH_ERROR in Android Firebase React Native:错误:[消息/未知] java.io.IOException:java.util.concurrent.ExecutionException:java.io.IOException:FIS_AUTH_ERROR - React Native : Error: [messaging/unknown] java.io.IOException: java.util.concurrent.ExecutionException: java.io.IOException: FIS_AUTH_ERROR java.io.IOException:AUTHENTICATION_FAILED 在 Android Firebase(和 SERVICE_NOT_AVAILABLE) - java.io.IOException: AUTHENTICATION_FAILED in Android Firebase (and SERVICE_NOT_AVAILABLE) java.io.IOException:应用程序默认凭据不可用 - java.io.IOException: The Application Default Credentials are not available 如何创建 AI Platform 自定义代码服务代理“service-xxxx@gcp-sa-aiplatform-cc.iam.gserviceaccount.com”? - How to create a AI Platform Custom Code Service Agent "service-xxxx@gcp-sa-aiplatform-cc.iam.gserviceaccount.com"?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM