在我的spring boot应用程序中,我将aws.java.sdk.version从1.11.510升级到1.11.825,现在出现错误:
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用途:
<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条答案
按热度按时间cbjzeqam1#
这个问题已经在github上讨论过了。但是在我的例子中,我改变了日志级别如下。在application.yml文件中,我添加了