英文:
Upgraded aws.java.sdk.version from 1.11.510 to 1.11.825 , now getting error - com.amazonaws.SdkClientException: Failed to connect to service endpoint
问题
在我的 Spring Boot 应用中,我将 aws.java.sdk.version 从 1.11.510 升级到 1.11.825,现在遇到错误:
com.amazonaws.SdkClientException: 无法连接到服务端点 -
2020-08-18 16:58:22 [main] INFO o.s.b.w.s.c.AnnotationConfigServletWebServerApplicationContext - 正在刷新 org.springframework.boot.web.servlet.context.AnnotationConfigServletWebServerApplicationContext@247bddad:启动日期 [Tue Aug 18 16:58:22 CDT 2020];上下文层次结构的根
2020-08-18 16:58:23 [main] WARN c.a.i.InstanceMetadataServiceResourceFetcher - 无法检索令牌
com.amazonaws.SdkClientException: 无法连接到服务端点:
在 com.amazonaws.internal.EC2ResourceFetcher.doReadResource(EC2ResourceFetcher.java:100) 处
在 com.amazonaws.internal.InstanceMetadataServiceResourceFetcher.getToken(InstanceMetadataServiceResourceFetcher.java:91) 处
Pom 使用:
<dependencyManagement>
<dependencies>
<dependency>
<groupId>com.amazonaws</groupId>
<artifactId>aws-java-sdk-bom</artifactId>
<version>${aws.java.sdk.version}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-aws</artifactId>
<version>${spring.cloud.aws.version}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
</dependencies>
</dependencyManagement>
<dependency>
<groupId>com.amazonaws</groupId>
<artifactId>aws-java-sdk-secretsmanager</artifactId>
</dependency>
英文:
In my Spring Boot App, I upgraded aws.java.sdk.version from 1.11.510 to 1.11.825 ,now getting error:
com.amazonaws.SdkClientException: Failed to connect to service endpoint -
2020-08-18 16:58:22 [main] INFO o.s.b.w.s.c.AnnotationConfigServletWebServerApplicationContext - Refreshing org.springframework.boot.web.servlet.context.AnnotationConfigServletWebServerApplicationContext@247bddad: startup date [Tue Aug 18 16:58:22 CDT 2020]; root of context hierarchy
2020-08-18 16:58:23 [main] WARN c.a.i.InstanceMetadataServiceResourceFetcher - Fail to retrieve token
com.amazonaws.SdkClientException: Failed to connect to service endpoint:
at com.amazonaws.internal.EC2ResourceFetcher.doReadResource(EC2ResourceFetcher.java:100)
at com.amazonaws.internal.InstanceMetadataServiceResourceFetcher.getToken(InstanceMetadataServiceResourceFetcher.java:91)
Pom uses:
<dependencyManagement>
<dependencies>
<dependency>
<groupId>com.amazonaws</groupId>
<artifactId>aws-java-sdk-bom</artifactId>
<version>${aws.java.sdk.version}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-aws</artifactId>
<version>${spring.cloud.aws.version}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
</dependencies>
</dependencyManagement>
<dependency>
<groupId>com.amazonaws</groupId>
<artifactId>aws-java-sdk-secretsmanager</artifactId>
</dependency>
答案1
得分: 3
This issue has already been discussed at GitHub.
But in my case, I changed the log level as follows. In the file application.yml, I added
logging:
level:
com.amazonaws.util.EC2MetadataUtils: error
com.amazonaws.internal.InstanceMetadataServiceResourceFetcher: error
英文:
This issue has already been discussed at GitHub.
But in my case, I changed the log level as follows. In the file application.yml, I added
logging:
level:
com.amazonaws.util.EC2MetadataUtils: error
com.amazonaws.internal.InstanceMetadataServiceResourceFetcher: error
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论