<Loggers>
...
<AsyncLogger name="org.mule.extension.sqs" level="DEBUG"/>
...
</Loggers>
Troubleshooting Amazon SQS Connector 5.11 - Mule 4
To troubleshoot Anypoint Connector for Amazon SQS (Amazon SQS Connector), become familiar with the information about interpreting commonly thrown exception messages.
Enable SSL Logging
Enable SSL logs to investigate an issue related to TLS communications.
Set your SSL log level depending on your required level of detail:
-
Enable only SSL log details:
javax.net.debug=ssl
-
Enable only handshaking details. (The handshake protocol is a series of messages exchanged over the record protocol.)
javax.net.debug=ssl:handshake
-
Enable handshaking details and SSL details at the same time:
javax.net.debug=ssl, handshake
-
Enable the dumping of all details and traffic data:
javax.net.debug=all
This option is very verbose and under normal circumstances is not necessary.
SSL logging results in a performance impact for HTTPS or other TLS connections. Enable SSL logging only to troubleshoot a specific issue and do not enable it for extended periods. SSL logging produces a significant amount of log messages and can inundate your log file if it is left enabled and unattended. |
To enable SSL logs:
Set the debug parameter as an argument in the runtime configuration for the application.
-
In Studio, right-click on the project and select Run > Run Configurations.
-
Go to the Arguments tab and add
-M-Djavax.net.debug=ssl
in the VM arguments section.
Enable Verbose Exception Logging
Enable verbose exception logs to show a complete stack trace of the error instead of the default truncated output:
-
In Studio, right-click on the project and select Run > Run Configurations.
-
Go to the Arguments tab and append the arguments in the VM arguments section to add the
mule.verbose.exceptions
property. For example:-XX:PermSize=128M -XX:MaxPermSize=256M -Dmule.verbose.exceptions=true
Enable Verbose Logging
To get a better understanding of why an application’s interaction with Amazon SQS Connector is failing, temporarily enable verbose logging for the connector.
Remember to always disable enhanced verbosity after troubleshooting, because it can affect your Mule application’s performance.
To enable verbose logging in the configuration file:
-
Access Anypoint Studio and navigate to the Package Explorer view.
-
Open your application’s project name.
-
Open the
src/main/resources
folder. -
Open the
log4j2.xml
file inside the folder. -
Add an
<AsyncLogger>
tag inside the<Loggers>
tag: -
Save your application changes.
-
Click the project name in Package Explorer and then click Run > Run As > Mule Application.
Troubleshoot AWS STS Regionalized Endpoints
In AWS SDK v2, the endpoint that the STS client of the AssumeRoleConnectionProvider
uses to get session tokens is now regionalized instead of global. See the AWS STS Regionalized endpoints documentation for details.
As explained in the AWS Security Token Service endpoints and quotas documentation, regionalized endpoints shouldn’t cause changes in the connector’s functionality.
AWS recommends using Regional STS endpoints to reduce latency, build in redundancy, and increase session token validation.
If you encounter any issues as a result of the change in endpoints to regionalized, you can force Amazon SQS Connector to use the global endpoint by specifying the URL endpoint https://sts.amazonaws.com
in the Custom STS Endpoint field located in the Advanced tab of the Global Elements properties configuration window of the connector.
Understand Commonly Thrown Exceptions
Here is a list of commonly thrown exception messages and how to interpret them:
-
SQS:ACCESS_DENIED
The user does not have permission to execute this operation.
-
SQS:CONNECTIVITY
The connection to the Amazon SQS server is interrupted.
-
SQS:INTERNAL_FAILURE
The request fails due to an unknown error, exception, or failure.
-
SQS:INVALID_CREDENTIALS
Authentication against the Amazon SQS server fails due to invalid credentials.
-
SQS:INVALID_DATA
The test connection cannot be performed because the Test Queue ARN parameter is not set.
-
SQS:MESSAGE_NOT_IN_FLIGHT
The specified message is not in flight.
-
SQS:MESSAGE_SIZE_THRESHOLD_OUT_OF_RANGE
The message threshold size is not between 0 and 256 KB.
-
SQS:OPT_IN_REQUIRED
The AWS access key ID requires a subscription for the service.
-
SQS:OVER_LIMIT
The attempted action exceeds a limit, for example, if the Recieve Messages source receives the maximum number of inflight messages or if the Add Permission operation reaches the maximum number of permissions for the queue.
-
SQS:PARAMETER_OUT_RANGE
The value is not within the specified range.
-
SQS:PURGE_QUEUE_IN_PROGRESS
The specified queue receives a Purge Queue request within the last 60 seconds.
-
SQS:QUEUE_ALREADY_EXISTS
There is a queue with this name already and the request includes different attributes from the existing queue with this name.
-
SQS:QUEUE_DELETED_RECENTLY
A queue with the same name is deleted within the last 60 seconds.
-
SQS:REQUEST_EXPIRED
The request reaches the service more than 15 minutes after the request date stamp or the request expiration date, or the request date stamp is more than 15 minutes in the future.
-
SQS:RETRY_EXHAUSTED
The retries of a certain execution block are exhausted.
-
SQS:S3_BUCKET_ACCESS_DENIED
The server returns an AmazonSQSException with a 403 HTTP status code.
-
SQS:S3_BUCKET_NOT_FOUND
The server returns an AmazonSQSException with a 404 HTTP status code.
-
SQS:SERVICE_UNAVAILABLE
The server is experiencing a temporary failure.
-
SQS:THROTTLING_EXCEPTION
The request fails due to request throttling.