awslabs/amazon-sqs-java-extended-client-lib

AmazonSQSExtendedClient: Failed to get the S3 object which contains the message payload. Message was not received.

Closed this issue · 3 comments

Team, somehow I tried to understand the flow.. but am not sure it is right or wrong.

I am using sqs extended client to support large payload on my app.

when ever payloads available in queue working super but when the queue is empty am able to see SQSMessageConsumerPrefetch warning log after few seconds am getting AmazonSQSExtendedClient error log and my console/log file is fulled with these errors only.

Please handle/ignore it.

`2019-07-23 12:13:47.161 WARN 21778 --- [refetchThread-2] c.a.s.j.SQSMessageConsumerPrefetch : Encountered exception during receive in ConsumerPrefetch thread

javax.jms.JMSException: AmazonServiceException: receiveMessage. RequestId: null
HTTPStatusCode: 0 AmazonErrorCode: null
at com.amazon.sqs.javamessaging.AmazonSQSMessagingClientWrapper.handleException(AmazonSQSMessagingClientWrapper.java:432) ~[amazon-sqs-java-messaging-lib-1.0.5.jar:na]
at com.amazon.sqs.javamessaging.AmazonSQSMessagingClientWrapper.receiveMessage(AmazonSQSMessagingClientWrapper.java:353) ~[amazon-sqs-java-messaging-lib-1.0.5.jar:na]
at com.amazon.sqs.javamessaging.SQSMessageConsumerPrefetch.getMessages(SQSMessageConsumerPrefetch.java:262) ~[amazon-sqs-java-messaging-lib-1.0.5.jar:na]
at com.amazon.sqs.javamessaging.SQSMessageConsumerPrefetch.run(SQSMessageConsumerPrefetch.java:221) ~[amazon-sqs-java-messaging-lib-1.0.5.jar:na]
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) ~[na:na]
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) ~[na:na]
at java.base/java.lang.Thread.run(Thread.java:834) ~[na:na]
Caused by: com.amazonaws.AmazonServiceException: Failed to get the S3 object which contains the message payload. Message was not received. (Service: null; Status Code: 0; Error Code: null; Request ID: null)
at com.amazon.sqs.javamessaging.AmazonSQSExtendedClient.getTextFromS3(AmazonSQSExtendedClient.java:1178) ~[amazon-sqs-java-extended-client-lib-1.0.1.jar:na]
at com.amazon.sqs.javamessaging.AmazonSQSExtendedClient.receiveMessage(AmazonSQSExtendedClient.java:351) ~[amazon-sqs-java-extended-client-lib-1.0.1.jar:na]
at com.amazon.sqs.javamessaging.AmazonSQSMessagingClientWrapper.receiveMessage(AmazonSQSMessagingClientWrapper.java:351) ~[amazon-sqs-java-messaging-lib-1.0.5.jar:na]
... 5 common frames omitted
Caused by: com.amazonaws.services.s3.model.AmazonS3Exception: The specified key does not exist. (Service: Amazon S3; Status Code: 404; Error Code: NoSuchKey; Request ID: null; S3 Extended Request ID: null)
at com.amazonaws.http.AmazonHttpClient$RequestExecutor.handleErrorResponse(AmazonHttpClient.java:1660) ~[aws-java-sdk-core-1.11.415.jar:na]
at com.amazonaws.http.AmazonHttpClient$RequestExecutor.executeOneRequest(AmazonHttpClient.java:1324) ~[aws-java-sdk-core-1.11.415.jar:na]
at com.amazonaws.http.AmazonHttpClient$RequestExecutor.executeHelper(AmazonHttpClient.java:1074) ~[aws-java-sdk-core-1.11.415.jar:na]
at com.amazonaws.http.AmazonHttpClient$RequestExecutor.doExecute(AmazonHttpClient.java:745) ~[aws-java-sdk-core-1.11.415.jar:na]
at com.amazonaws.http.AmazonHttpClient$RequestExecutor.executeWithTimer(AmazonHttpClient.java:719) ~[aws-java-sdk-core-1.11.415.jar:na]
at com.amazonaws.http.AmazonHttpClient$RequestExecutor.execute(AmazonHttpClient.java:701) ~[aws-java-sdk-core-1.11.415.jar:na]
at com.amazonaws.http.AmazonHttpClient$RequestExecutor.access$500(AmazonHttpClient.java:669) ~[aws-java-sdk-core-1.11.415.jar:na]
at com.amazonaws.http.AmazonHttpClient$RequestExecutionBuilderImpl.execute(AmazonHttpClient.java:651) ~[aws-java-sdk-core-1.11.415.jar:na]
at com.amazonaws.http.AmazonHttpClient.execute(AmazonHttpClient.java:515) ~[aws-java-sdk-core-1.11.415.jar:na]
at com.amazonaws.services.s3.AmazonS3Client.invoke(AmazonS3Client.java:4443) ~[aws-java-sdk-s3-1.11.415.jar:na]
at com.amazonaws.services.s3.AmazonS3Client.invoke(AmazonS3Client.java:4390) ~[aws-java-sdk-s3-1.11.415.jar:na]
at com.amazonaws.services.s3.AmazonS3Client.getObject(AmazonS3Client.java:1427) ~[aws-java-sdk-s3-1.11.415.jar:na]
at com.amazon.sqs.javamessaging.AmazonSQSExtendedClient.getTextFromS3(AmazonSQSExtendedClient.java:1174) ~[amazon-sqs-java-extended-client-lib-1.0.1.jar:na]
... 7 common frames omitted

2019-07-23 12:14:17.186 ERROR 21778 --- [refetchThread-2] c.a.s.j.AmazonSQSExtendedClient : Failed to get the S3 object which contains the message payload. Message was not received.

com.amazonaws.services.s3.model.AmazonS3Exception: The specified key does not exist. (Service: Amazon S3; Status Code: 404; Error Code: NoSuchKey; Request ID: null; S3 Extended Request ID: null)
at com.amazonaws.http.AmazonHttpClient$RequestExecutor.handleErrorResponse(AmazonHttpClient.java:1660) ~[aws-java-sdk-core-1.11.415.jar:na]
at com.amazonaws.http.AmazonHttpClient$RequestExecutor.executeOneRequest(AmazonHttpClient.java:1324) ~[aws-java-sdk-core-1.11.415.jar:na]
at com.amazonaws.http.AmazonHttpClient$RequestExecutor.executeHelper(AmazonHttpClient.java:1074) ~[aws-java-sdk-core-1.11.415.jar:na]
at com.amazonaws.http.AmazonHttpClient$RequestExecutor.doExecute(AmazonHttpClient.java:745) ~[aws-java-sdk-core-1.11.415.jar:na]
at com.amazonaws.http.AmazonHttpClient$RequestExecutor.executeWithTimer(AmazonHttpClient.java:719) ~[aws-java-sdk-core-1.11.415.jar:na]
at com.amazonaws.http.AmazonHttpClient$RequestExecutor.execute(AmazonHttpClient.java:701) ~[aws-java-sdk-core-1.11.415.jar:na]
at com.amazonaws.http.AmazonHttpClient$RequestExecutor.access$500(AmazonHttpClient.java:669) ~[aws-java-sdk-core-1.11.415.jar:na]
at com.amazonaws.http.AmazonHttpClient$RequestExecutionBuilderImpl.execute(AmazonHttpClient.java:651) ~[aws-java-sdk-core-1.11.415.jar:na]
at com.amazonaws.http.AmazonHttpClient.execute(AmazonHttpClient.java:515) ~[aws-java-sdk-core-1.11.415.jar:na]
at com.amazonaws.services.s3.AmazonS3Client.invoke(AmazonS3Client.java:4443) ~[aws-java-sdk-s3-1.11.415.jar:na]
at com.amazonaws.services.s3.AmazonS3Client.invoke(AmazonS3Client.java:4390) ~[aws-java-sdk-s3-1.11.415.jar:na]
at com.amazonaws.services.s3.AmazonS3Client.getObject(AmazonS3Client.java:1427) ~[aws-java-sdk-s3-1.11.415.jar:na]
at com.amazon.sqs.javamessaging.AmazonSQSExtendedClient.getTextFromS3(AmazonSQSExtendedClient.java:1174) ~[amazon-sqs-java-extended-client-lib-1.0.1.jar:na]
at com.amazon.sqs.javamessaging.AmazonSQSExtendedClient.receiveMessage(AmazonSQSExtendedClient.java:351) ~[amazon-sqs-java-extended-client-lib-1.0.1.jar:na]
at com.amazon.sqs.javamessaging.AmazonSQSMessagingClientWrapper.receiveMessage(AmazonSQSMessagingClientWrapper.java:351) ~[amazon-sqs-java-messaging-lib-1.0.5.jar:na]
at com.amazon.sqs.javamessaging.SQSMessageConsumerPrefetch.getMessages(SQSMessageConsumerPrefetch.java:262) ~[amazon-sqs-java-messaging-lib-1.0.5.jar:na]
at com.amazon.sqs.javamessaging.SQSMessageConsumerPrefetch.run(SQSMessageConsumerPrefetch.java:221) ~[amazon-sqs-java-messaging-lib-1.0.5.jar:na]
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) ~[na:na]
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) ~[na:na]
at java.base/java.lang.Thread.run(Thread.java:834) ~[na:na]

2019-07-23 12:14:17.186 ERROR 21778 --- [refetchThread-2] c.a.s.j.AmazonSQSMessagingClientWrapper : AmazonServiceException: receiveMessage. RequestId: null
HTTPStatusCode: 0 AmazonErrorCode: null

com.amazonaws.AmazonServiceException: Failed to get the S3 object which contains the message payload. Message was not received. (Service: null; Status Code: 0; Error Code: null; Request ID: null)
at com.amazon.sqs.javamessaging.AmazonSQSExtendedClient.getTextFromS3(AmazonSQSExtendedClient.java:1178) ~[amazon-sqs-java-extended-client-lib-1.0.1.jar:na]
at com.amazon.sqs.javamessaging.AmazonSQSExtendedClient.receiveMessage(AmazonSQSExtendedClient.java:351) ~[amazon-sqs-java-extended-client-lib-1.0.1.jar:na]
at com.amazon.sqs.javamessaging.AmazonSQSMessagingClientWrapper.receiveMessage(AmazonSQSMessagingClientWrapper.java:351) ~[amazon-sqs-java-messaging-lib-1.0.5.jar:na]
at com.amazon.sqs.javamessaging.SQSMessageConsumerPrefetch.getMessages(SQSMessageConsumerPrefetch.java:262) ~[amazon-sqs-java-messaging-lib-1.0.5.jar:na]
at com.amazon.sqs.javamessaging.SQSMessageConsumerPrefetch.run(SQSMessageConsumerPrefetch.java:221) ~[amazon-sqs-java-messaging-lib-1.0.5.jar:na]
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) ~[na:na]
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) ~[na:na]
at java.base/java.lang.Thread.run(Thread.java:834) ~[na:na]
Caused by: com.amazonaws.services.s3.model.AmazonS3Exception: The specified key does not exist. (Service: Amazon S3; Status Code: 404; Error Code: NoSuchKey; Request ID: null; S3 Extended Request ID: null)
at com.amazonaws.http.AmazonHttpClient$RequestExecutor.handleErrorResponse(AmazonHttpClient.java:1660) ~[aws-java-sdk-core-1.11.415.jar:na]
at com.amazonaws.http.AmazonHttpClient$RequestExecutor.executeOneRequest(AmazonHttpClient.java:1324) ~[aws-java-sdk-core-1.11.415.jar:na]
at com.amazonaws.http.AmazonHttpClient$RequestExecutor.executeHelper(AmazonHttpClient.java:1074) ~[aws-java-sdk-core-1.11.415.jar:na]
at com.amazonaws.http.AmazonHttpClient$RequestExecutor.doExecute(AmazonHttpClient.java:745) ~[aws-java-sdk-core-1.11.415.jar:na]
at com.amazonaws.http.AmazonHttpClient$RequestExecutor.executeWithTimer(AmazonHttpClient.java:719) ~[aws-java-sdk-core-1.11.415.jar:na]
at com.amazonaws.http.AmazonHttpClient$RequestExecutor.execute(AmazonHttpClient.java:701) ~[aws-java-sdk-core-1.11.415.jar:na]
at com.amazonaws.http.AmazonHttpClient$RequestExecutor.access$500(AmazonHttpClient.java:669) ~[aws-java-sdk-core-1.11.415.jar:na]
at com.amazonaws.http.AmazonHttpClient$RequestExecutionBuilderImpl.execute(AmazonHttpClient.java:651) ~[aws-java-sdk-core-1.11.415.jar:na]
at com.amazonaws.http.AmazonHttpClient.execute(AmazonHttpClient.java:515) ~[aws-java-sdk-core-1.11.415.jar:na]
at com.amazonaws.services.s3.AmazonS3Client.invoke(AmazonS3Client.java:4443) ~[aws-java-sdk-s3-1.11.415.jar:na]
at com.amazonaws.services.s3.AmazonS3Client.invoke(AmazonS3Client.java:4390) ~[aws-java-sdk-s3-1.11.415.jar:na]
at com.amazonaws.services.s3.AmazonS3Client.getObject(AmazonS3Client.java:1427) ~[aws-java-sdk-s3-1.11.415.jar:na]
at com.amazon.sqs.javamessaging.AmazonSQSExtendedClient.getTextFromS3(AmazonSQSExtendedClient.java:1174) ~[amazon-sqs-java-extended-client-lib-1.0.1.jar:na]
... 7 common frames omitted`

We are having exactly the same issue.

Same issue here.

@KostyantynPanchenko @sudattapadhye it is working fine on the production environment.