Hi there! I am currently facing some issue with th...
# troubleshoot
b
Hi there! I am currently facing some issue with the frontend and the connection to AWS-MSK. I am greeted in the frontend-logs by:
Copy code
failed authentication due to: An error: (java.security.PrivilegedActionException: javax.security.sasl.SaslException: Exception while evaluating challenge [Caused by javax.security.auth.callback.UnsupportedCallbackException: Unrecognized SASL ClientCallback]) occurred when evaluating SASL token received from the Kafka Broker. Kafka Client will go to AUTHENTICATION_FAILED state.
I configured the helm-chart via
springKafkaConfigurationOverrides
for AWS-MSK and I don’t see similar errors in the backend-logs - everything related to MSK works fine for the backend. So I assume the configuration itself is fine. The environment variables in the frontend-pod/container seem to be also fine. All SASL/MSK related stuff that we configured gets routed to the envs correctly. However, in the frontend-logs i also find
Copy code
sasl.client.callback.handler.class = null
in the part where the kafka-producer config is logged. All other SASL/MSK related stuff is set correctly in the producer config though. So it seems that the application is not correctly reading / passing to the producer what is stated in the environment variable
KAFKA_PROPERTIES_SASL_CLIENT_CALLBACK_HANDLER_CLASS=software.amazon.msk.auth.iam.IAMClientCallbackHandler
. The only interesting thing I noticed compared to the backend is that the relevant kafka-environment variables are prefixed with
SPRING_
whereas the envs in the frontend start with
KAFKA_
. not sure whether that’s an issue / related here. Both frontend and backend are on v0.9.5, helm-chart version is 0.2.119 Thanks in advance for any pointers!
✅ 1
b
Hey Dominik, Thanks for sharing this with the channel. Will get back to you with this.
b
@bulky-electrician-72362 after some investigation i found that the frontend
application.conf
uses another/the wrong environment variable:
Copy code
analytics.kafka.sasl.login.callback.handler.class = ${?KAFKA_PROPERTIES_SASL_LOGIN_CALLBACK_HANDLER_CLASS}
but what’s set in the env is called
KAFKA_PROPERTIES_SASL_CLIENT_CALLBACK_HANDLER_CLASS
i think we could rename this in
springKafkaConfigurationOverrides
since afaik the helm-chart simply uses the config-key as env-key/name with some prefix but then it probably won’t work in the backend anymore?! Could you maybe confirm / double-check this? Thanks!
b
hey,
helm-chart simply uses the config-key as env-key/name with some prefix
it's true helm, just prefexies and convert the the values provided in the values.yaml
KAFKA_PROPERTIES_{{ $configName | replace "." "_" | upper }}
so to set
KAFKA_PROPERTIES_SASL_LOGIN_CALLBACK_HANDLER_CLASS
you need to set
sasl.login.callback.handler.class
under
springKafkaConfigurationOverrides
it probably won’t work in the backend anymore?
why do you think that?
b
why do you think that?
because it currently works for the backend with
sasl.client.callback.handler.class
. of course we could set both but this had no effect for the frontend as i just tested it. in the frontend logs the producer now has:
Copy code
sasl.client.callback.handler.class = null
sasl.login.callback.handler.class = class software.amazon.msk.auth.iam.IAMClientCallbackHandler
so it needs
sasl.client.callback.handler.class
instead of
sasl.login.callback.handler.class
however the
application.conf
file only accounts for
Copy code
analytics.kafka.sasl.login.callback.handler.class = ${?KAFKA_PROPERTIES_SASL_LOGIN_CALLBACK_HANDLER_CLASS}
Looks to me that we instead need
Copy code
analytics.kafka.sasl.client.callback.handler.class = ${?KAFKA_PROPERTIES_SASL_CLIENT_CALLBACK_HANDLER_CLASS}
in the
application.conf
?!
b
this was recently added: https://github.com/datahub-project/datahub/blob/master/datahub-frontend/app/client/KafkaTrackingProducer.java#L96 by @brainy-tent-14503 he might have more context here
open PR to address this issue
c
thanks a lot 🙏
b
thanks @bulky-electrician-72362
b
It's been merged, you can try build your own image, or wait for the next release (next week), anyhow interested in your feedback
b
@bulky-electrician-72362 thanks! we just deployed one of your development tags and no errors in the frontend-logs anymore 🙌