while testing redshift connection from glue i am getting below error


ERROR StatusLogger Unrecognized conversion specifier [n] starting at position 56 in conversion pattern. Note: i have already created s3 endpoint in same vpc i am currently working on, also created glue endpoint as well.

  • please accept the answer if it was useful

asked 2 months ago210 views
1 Answer

The error message you're encountering typically relates to the logging configuration used by the Apache Log4j logging utility. This error doesn't directly relate to the connection between AWS Glue and Amazon Redshift but to how logging is configured within your Glue job's environment.

In Log4j, a conversion pattern specifies the format of log messages. The message suggests that a part of the logging configuration includes a specifier [n] that Log4j does not recognize.

Steps to Resolve the Issue To resolve this issue, consider the following steps:

  1. Review Logging Configuration If you have direct access to the Log4j configuration file (typically named log4j.properties or log4j2.xml, depending on the version of Log4j you're using), check for any conversion patterns that include [n]. If you're using custom logging settings, the configuration might be part of your AWS Glue job setup.

A standard conversion pattern might look something like %d{yyyy-MM-dd HH:mm:ss} %-5p %c{1}:%L - %m%n, where each % directive specifies a different type of information to include in the log (date, priority, class name, line number, message, etc.). The %n at the end represents a platform-independent newline character.

  1. Correct or Remove the Unrecognized Specifier If you find [n] in your conversion pattern, it's likely a typo or misplaced character. Ensure that any newline specifiers are correctly represented as %n (not [n]) or adjust the pattern according to your logging requirements.

  2. Update AWS Glue Job (if applicable) If you specify custom Log4j properties for your AWS Glue job through a script or additional options, update these settings with the corrected logging configuration.

  3. Redeploy or Rerun Your Glue Job After adjusting the logging configuration, redeploy or rerun your AWS Glue job to verify that the error has been resolved.

profile picture
answered 2 months ago
profile picture
reviewed 2 months ago
  • i did not used any custom logging, i got above error message from cloudwatch logs, while testing the connection, I have created for redshift

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions