Contact Us 1-800-596-4880

Troubleshooting Amazon S3 Connector 6.2 - Mule 4

To troubleshoot Anypoint Connector for Amazon S3 (Amazon S3 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:

  1. Enable only SSL log details:

    javax.net.debug=ssl

  2. Enable only handshaking details. (The handshake protocol is a series of messages exchanged over the record protocol.)

    javax.net.debug=ssl:handshake

  3. Enable handshaking details and SSL details at the same time:

    javax.net.debug=ssl, handshake

  4. 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.

  1. In Studio, right-click on the project and select Run > Run Configurations.

  2. 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:

  1. In Studio, right-click on the project and select Run > Run Configurations.

  2. 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 S3 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:

  1. Access Anypoint Studio and navigate to the Package Explorer view.

  2. Open your application’s project name.

  3. Open the src/main/resources folder.

  4. Open the log4j2.xml file inside the folder.

  5. Add an <AsyncLogger> tag inside the <Loggers> tag:

    			<Loggers>
    				...
    				<AsyncLogger name="org.mule.extension.s3" level="DEBUG"/>
    				...
    			</Loggers>
  6. Save your application changes.

  7. Click the project name in Package Explorer and then click Run > Run As > Mule Application.

Understand Commonly Thrown Exceptions

Here is a list of commonly thrown exception messages and how to interpret them:

  • S3:BAD_REQUEST

    The input or payload is invalid.
  • S3:BUCKET_ALREADY_EXISTS

    The bucket name you specify already exists.
  • S3:BUCKET_ALREADY_OWNED_BY_YOU

    The bucket you create already exists and is owned by you.
  • S3:CONNECTIVITY

    A connection cannot be established.
  • S3:FORBIDDEN

    There is a `403` forbidden error, for example, there are missing permissions.
  • S3:GLACIER_EXPEDITED_RETRIEVAL_NOT_AVAILABLE

    Expedited retrieval is not available.
  • S3:INTERNAL_ERROR

    There is an internal error, such as a server issue or a temporary glitch.
  • S3:INVALID_OBJECT_STATE

    The object state is invalid with the action.
  • S3:MALFORMED_XML

    The XML you send is malformed.
  • S3:NO_SUCH_KEY

    The key you specify does not exist.
  • S3:NO_SUCH_LIFECYCLE_CONFIGURATION

    The lifecycle configuration you specify does not exist.
  • S3:NO_SUCH_TAG_SET

    The tag set you specify does not exist.
  • S3:NO_SUCH_UPLOAD

    The upload you specify does not exist.
  • S3:OBJECT_ALREADY_IN_ACTIVE_TIER

    The object is already in the active tier.
  • S3:OPERATION_ABORTED

    The operation is aborted because there is another in-progress action against the same resource.
  • S3:RESTORE_ALREADY_IN_PROGRESS

    The restore is already in progress.
  • S3:RETRY_EXHAUSTED

    The maximum number of retries for the operation is reached.
  • S3:S3_ERROR

    An error occurs in Amazon S3.
  • S3:SERVER_BUSY

    The server is busy.
  • S3:SERVICE_ERROR

    There is a service error.
  • S3:REQUEST_TIMEOUT

    The Put Object operation had a request timeout.
View on GitHub