Closed arun1ram closed 9 months ago
Hey @arun1ram.
The error message says SdkClientException: Unable to execute HTTP request: The connection was closed during the request. The request will usually succeed on a retry, but if it does not: consider disabling any proxies you have configured, enabling debug logging, or performing a TCP dump to identify the root cause. If this is a streaming operation, validate that data is being read or written in a timely manner. Channel Information: ChannelDiagnostics(channel=[id: 0xcd0de04a, L:/10.18.154.91:65237 ! R:sqs.us-east-1.amazonaws.com/3.236.169.67:443], channelAge=PT5.006756S, requestCount=1, responseCount=0, lastIdleDuration=PT0.000103875S)
Have your tried the suggested troubleshooting?
Another suspect would be if the application is shutting down unexpectedly due to some error on startup or similar.
Hi @tomazfernandes Thanks for your feedback. After much troubleshooting, I found that the root cause was the default connection timeout used by the Netty client used by AWS SDK. When I increased the connection timeout as below, it started working:
@Configuration
public class SqsConfig {
@Bean
public SqsAsyncClient sqsAsyncClient() {
return SqsAsyncClient.builder().httpClientBuilder(NettyNioAsyncHttpClient.builder()
.connectionTimeout(Duration.ofMinutes(5))).build();
}
}
A note could be added to the "Getting Started" manual to ask the user to configure the defaults. Also, the current error message is very generic and I could not get any more information by enabling debug logs. The thing that helped me was the stack trace and being able to look at the open source code and see that there was a timeout issue going on.
Hi @arun1ram, unfortunately the log message you see is from AWS SDK, so you could ask them :)
I don't see anything the framework could do to help there, and this is related to AWS configuration and not the framework.
Since you solved the issue, I'll close this, but we can reopen if necessary.
Thanks.
Type: Bug
Component: SQS
Describe the bug Spring Boot Version: 3.2.0 Spring Cloud Version: 3.1.0 I created a very simple Spring Boot application as described in https://docs.awspring.io/spring-cloud-aws/docs/3.1.0/reference/html/index.html#sqs-integration Maven pom file Contents:
The code is as follows:
Sample
Running this application on a Mac M1 machine produces an error as below: