Troubleshooting JAAS Configuration Error in DataHub Actions

Original Slack Thread

my config in executor.yaml:

sasl.jaas.config: ${KAFKA_PROPERTIES_SASL_JAAS_CONFIG:-“org.apache.kafka.common.security.scram.ScramLoginModule required username=‘vhm-vinclub-stag-msk-consumer’ password=‘vhm-vinclub-stag-msk-consumerabcd!’;”}

I get this error message in datahub-action log ?what is problem with my executor.yaml ?
KafkaException: KafkaError{code=INVALID_ARG,val=-186,str="Java JAAS configuration is not supported, see

Hey there! :wave:

<@U06TM7M40RK> Can you help with the questions in this thread?

:information_source: Please continue to tag RunLLM (e.g <@U06TM7M40RK>) to have it continue generating responses!

The error message you’re encountering indicates that the Java JAAS configuration is not supported in the context of DataHub Actions, which is written in Python. This is a common issue when trying to use Java-specific configurations in a Python-based environment.

According to the <https://github.com/datahub-project/datahub/blob/master/docs/how/kafka-config.md|DataHub documentation>, DataHub Actions does not support JAAS configuration because it uses a Python client for Kafka. Instead, you should configure the SASL authentication using environment variables and the appropriate Python client configuration.

Here’s how you can adjust your executor.yaml:

  1. Remove the JAAS Configuration: Since JAAS is not supported, you should remove the sasl.jaas.config line from your configuration.

  2. Use Environment Variables: Set the necessary Kafka properties using environment variables. For example, you can use KAFKA_PROPERTIES_SASL_USERNAME and KAFKA_PROPERTIES_SASL_PASSWORD for authentication.

  3. Update executor.yaml: Configure the SASL mechanism and other properties directly in the executor.yaml using the Python client style. Here’s an example configuration:

connection:
  bootstrap: ${KAFKA_BOOTSTRAP_SERVER:-localhost:9092}
  schema_registry_url: ${SCHEMA_REGISTRY_URL:-http://localhost:8081}
  consumer_config:
    security.protocol: SASL_SSL
    sasl.mechanism: SCRAM-SHA-256
    sasl.username: ${KAFKA_PROPERTIES_SASL_USERNAME}
    sasl.password: ${KAFKA_PROPERTIES_SASL_PASSWORD}

Make sure to set the environment variables KAFKA_PROPERTIES_SASL_USERNAME and KAFKA_PROPERTIES_SASL_PASSWORD with your Kafka credentials.

Would you like more detailed step-by-step guidance on configuring these settings?

Sources:

Hi, how did my answer work out for you? Need any more assistance? You can also tag <@U07FV3UHE4D> to let your fellow community members know you’re still looking for guidance.

Hi :slight_smile: ! Did this interaction resolve your issue or do you still require assistance ?

Please tag @ RunLLM if you still need further assistance !

Or tag @Datahub Community Support if you require a person to take a look :slight_smile:

Hope this helps ! ><