Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

com.amazonaws.services.sqs.model.AmazonSQSException #2613

Closed
xianqiangzhao opened this issue Jul 19, 2021 · 3 comments
Closed

com.amazonaws.services.sqs.model.AmazonSQSException #2613

xianqiangzhao opened this issue Jul 19, 2021 · 3 comments
Labels
guidance Question that needs advice or information.

Comments

@xianqiangzhao
Copy link

I am using jms to receive sqs,
The concurrency setting is factory.setConcurrency("30-50");

Now always report the following log

com.amazon.sqs.javamessaging.AmazonSQSMessagingClientWrapper.logAndGetAmazonServiceException-AmazonServiceException: receiveMessage. RequestId: 2d5045b5-157b-5792-aa96-1cdbd910125f
HTTPStatusCode: 400 AmazonErrorCode: InvalidParameterValue
com.amazonaws.services.sqs.model.AmazonSQSException: Value 423b81f5-7f49-4d29-8911-bac1a1e139e2 for parameter ReceiveRequestAttemptId is invalid. Reason: The receiveRequestAttemptId is not valid anymore since the receive call is not retryable. (Service: AmazonSQS; Status Code: 400; Error Code: InvalidParameterValue; Request ID: 2d5045b5-157b-5792-aa96-1cdbd910125f; Proxy: null)
at com.amazonaws.http.AmazonHttpClient$RequestExecutor.handleErrorResponse(AmazonHttpClient.java:1811) ~[aws-java-sdk-core-1.11.790.jar!/:?]
at com.amazonaws.http.AmazonHttpClient$RequestExecutor.handleServiceErrorResponse(AmazonHttpClient.java:1395) ~[aws-java-sdk-core-1.11.790.jar!/:?]
at com.amazonaws.http.AmazonHttpClient$RequestExecutor.executeOneRequest(AmazonHttpClient.java:1371) ~[aws-java-sdk-core-1.11.790.jar!/:?]
at com.amazonaws.http.AmazonHttpClient$RequestExecutor.executeHelper(AmazonHttpClient.java:1145) ~[aws-java-sdk-core-1.11.790.jar!/:?]
at com.amazonaws.http.AmazonHttpClient$RequestExecutor.doExecute(AmazonHttpClient.java:802) ~[aws-java-sdk-core-1.11.790.jar!/:?]
at com.amazonaws.http.AmazonHttpClient$RequestExecutor.executeWithTimer(AmazonHttpClient.java:770) ~[aws-java-sdk-core-1.11.790.jar!/:?]
at com.amazonaws.http.AmazonHttpClient$RequestExecutor.execute(AmazonHttpClient.java:744) ~[aws-java-sdk-core-1.11.790.jar!/:?]
at com.amazonaws.http.AmazonHttpClient$RequestExecutor.access$500(AmazonHttpClient.java:704) ~[aws-java-sdk-core-1.11.790.jar!/:?]
at com.amazonaws.http.AmazonHttpClient$RequestExecutionBuilderImpl.execute(AmazonHttpClient.java:686) ~[aws-java-sdk-core-1.11.790.jar!/:?]
at com.amazonaws.http.AmazonHttpClient.execute(AmazonHttpClient.java:550) ~[aws-java-sdk-core-1.11.790.jar!/:?]
at com.amazonaws.http.AmazonHttpClient.execute(AmazonHttpClient.java:530) ~[aws-java-sdk-core-1.11.790.jar!/:?]
at com.amazonaws.services.sqs.AmazonSQSClient.doInvoke(AmazonSQSClient.java:2207) ~[aws-java-sdk-sqs-1.11.790.jar!/:?]
at com.amazonaws.services.sqs.AmazonSQSClient.invoke(AmazonSQSClient.java:2174) ~[aws-java-sdk-sqs-1.11.790.jar!/:?]
at com.amazonaws.services.sqs.AmazonSQSClient.invoke(AmazonSQSClient.java:2163) ~[aws-java-sdk-sqs-1.11.790.jar!/:?]
at com.amazonaws.services.sqs.AmazonSQSClient.executeReceiveMessage(AmazonSQSClient.java:1607) ~[aws-java-sdk-sqs-1.11.790.jar!/:?]
at com.amazonaws.services.sqs.AmazonSQSClient.receiveMessage(AmazonSQSClient.java:1578) ~[aws-java-sdk-sqs-1.11.790.jar!/:?]
at com.amazon.sqs.javamessaging.AmazonSQSMessagingClientWrapper.receiveMessage(AmazonSQSMessagingClientWrapper.java:351) [amazon-sqs-java-messaging-lib-1.0.8.jar!/:?]
at com.amazon.sqs.javamessaging.SQSMessageConsumerPrefetch.getMessages(SQSMessageConsumerPrefetch.java:259) [amazon-sqs-java-messaging-lib-1.0.8.jar!/:?]
at com.amazon.sqs.javamessaging.SQSMessageConsumerPrefetch.getMessagesWithBackoff(SQSMessageConsumerPrefetch.java:303) [amazon-sqs-java-messaging-lib-1.0.8.jar!/:?]
at com.amazon.sqs.javamessaging.SQSMessageConsumerPrefetch.run(SQSMessageConsumerPrefetch.java:221) [amazon-sqs-java-messaging-lib-1.0.8.jar!/:?]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) [?:?]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) [?:?]
at java.lang.Thread.run(Thread.java:834) [?:?]
2021/07/19 09:41:15.874,toughness.local-armg-service.com,[WARN ],,,com.amazon.sqs.javamessaging.SQSMessageConsumerPrefetch.getMessagesWithBackoff-Encountered exception during receive in ConsumerPrefetch thread
javax.jms.JMSException: AmazonServiceException: receiveMessage. RequestId: 2d5045b5-157b-5792-aa96-1cdbd910125f
HTTPStatusCode: 400 AmazonErrorCode: InvalidParameterValue
at com.amazon.sqs.javamessaging.AmazonSQSMessagingClientWrapper.handleException(AmazonSQSMessagingClientWrapper.java:432) ~[amazon-sqs-java-messaging-lib-1.0.8.jar!/:?]
at com.amazon.sqs.javamessaging.AmazonSQSMessagingClientWrapper.receiveMessage(AmazonSQSMessagingClientWrapper.java:353) ~[amazon-sqs-java-messaging-lib-1.0.8.jar!/:?]
at com.amazon.sqs.javamessaging.SQSMessageConsumerPrefetch.getMessages(SQSMessageConsumerPrefetch.java:259) ~[amazon-sqs-java-messaging-lib-1.0.8.jar!/:?]
at com.amazon.sqs.javamessaging.SQSMessageConsumerPrefetch.getMessagesWithBackoff(SQSMessageConsumerPrefetch.java:303) [amazon-sqs-java-messaging-lib-1.0.8.jar!/:?]
at com.amazon.sqs.javamessaging.SQSMessageConsumerPrefetch.run(SQSMessageConsumerPrefetch.java:221) [amazon-sqs-java-messaging-lib-1.0.8.jar!/:?]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) [?:?]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java

What is the reason? I look forward to your answer

@debora-ito debora-ito added the guidance Question that needs advice or information. label Jul 19, 2021
@debora-ito
Copy link
Member

Hi @xianqiangzhao the error message is saying that the ReceiveRequestAttemptId provided is not valid anymore:

Value 423b81f5-7f49-4d29-8911-bac1a1e139e2 for parameter ReceiveRequestAttemptId is invalid. Reason: The receiveRequestAttemptId is not valid anymore since the receive call is not retryable.

Take a look at the ReceiveMessage API docs to read more about the ReceiveRequestAttemptId parameter. The SQS Developer Guide also contains some info about ReceiveMessage in the Visibility Timeout section.

I see you are using the amazon-sqs-java-messaging-lib so if you need further help I recommend you open an issue in their repo: https://github.com/awslabs/amazon-sqs-java-messaging-lib. The lib is maintained by the folks of the SQS team and they'll be able to help you with more expertise.

@debora-ito debora-ito added the closing-soon This issue will close in 2 days unless further comments are made. label Jul 19, 2021
@xianqiangzhao
Copy link
Author

Hi @xianqiangzhao the error message is saying that the ReceiveRequestAttemptId provided is not valid anymore:

Value 423b81f5-7f49-4d29-8911-bac1a1e139e2 for parameter ReceiveRequestAttemptId is invalid. Reason: The receiveRequestAttemptId is not valid anymore since the receive call is not retryable.

Take a look at the ReceiveMessage API docs to read more about the ReceiveRequestAttemptId parameter. The SQS Developer Guide also contains some info about ReceiveMessage in the Visibility Timeout section.

I see you are using the amazon-sqs-java-messaging-lib so if you need further help I recommend you open an issue in their repo: https://github.com/awslabs/amazon-sqs-java-messaging-lib. The lib is maintained by the folks of the SQS team and they'll be able to help you with more expertise.

Thank you very much for your reply

@github-actions github-actions bot removed the closing-soon This issue will close in 2 days unless further comments are made. label Jul 21, 2021
@debora-ito
Copy link
Member

Closing this, feel free to reach out if you have other questions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
guidance Question that needs advice or information.
Projects
None yet
Development

No branches or pull requests

2 participants