Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sarama is not working with SASL_SSL authentication to Kafka #1944

Closed
hemanthboyina opened this issue May 13, 2021 · 4 comments
Closed

Sarama is not working with SASL_SSL authentication to Kafka #1944

hemanthboyina opened this issue May 13, 2021 · 4 comments
Labels
stale Issues and pull requests without any recent activity

Comments

@hemanthboyina
Copy link

Our Kafka cluster is authenticated with SASL_SSL

we are using Jaeger tracing with Kafka as intermediate buffer, Jaeger tracer uses Sarama as client to connect to Kafka. Jaeger Collector will connect to Kafka here

But jaeger collector is failing with
"level":"fatal","ts":1620725724.2804399,"caller":"command-line-arguments/main.go:75","msg":"Failed to init storage factory","error":"kafka: client has run out of available brokers to talk to (Is your cluster reachable?)","stacktrace":"main.main.func1\n\tcommand-line-arguments/main.go:75\ngithub.com/spf13/cobra.(*Command).execute\n\tgithub.com/spf13/cobra@v0.0.7/command.go:838\ngithub.com/spf13/cobra

Looks like Sarama doesn't support SASL/SSL.

https://godoc.org/github.com/Shopify/sarama#GSSAPIKerberosAuth.Authorize

// SASL based authentication with broker. While there are multiple SASL authentication methods

// the current implementation is limited to plaintext (SASL/PLAIN) authentication

Jaeger Collector to Kafka :

docker run --net=abcd --name jaeger-collector -e SPAN_STORAGE_TYPE=kafka -p 14267:14267 -p 14268:14268 -p 9411:9411 -p 14250:14250 hboyina/jaegercollector:latest --kafka.producer.topic=jaeger-spans --kafka.producer.brokers=:9093 --kafka.producer.authentication=kerberos --kafka.producer.kerberos.config-file=/etc/krb5.conf --kafka.producer.kerberos.keytab-file=/root/hboyina.keytab --kafka.producer.kerberos.use-keytab=true --kafka.producer.kerberos.username=hboyina --kafka.producer.kerberos.realm=*.COM

Expected behavior

Jaeger Collector should connect with Kafka , if the Kafka has SASL_SSL Authentication

Version :
OS: [e.g. Linux] Rhel
Jaeger version: 1.22
Deployment: Docker

@dnwe
Copy link
Collaborator

dnwe commented May 13, 2021

SASL_SSL is how kafka describes a network listener (SASL authentication with SSL transport). The SASL mechanism is defined via the sasl.enabled.mechanisms broker property. Possible values supported by Sarama are OAUTHBEARER, PLAIN, SCRAM-SHA-256, SCRAM-SHA-512 and GSSAPI. From your jaeger cmdline args it looks like you are trying to use GSSAPI (Kerberos)?

In the future, when raising issues, please use the provided issue template that is shown on the New issue page as that helps you provide us with version and configuration information as well as client-side debug logs. As a minimum we'd need to know what version of Sarama client is being used and what your backend Kafka cluster configuration looks like

@hemanthboyina
Copy link
Author

thanks @dnwe for the reply , sasl.enabled.mechanisms will be asked as --kafka.producer.plaintext.mechanism by Jaeger , by default the value will be PLAIN , as i haven't specified this property it is PLAIN , now even i have tried by specifying the property as GSSAPI but still the error is same

   In the future, when raising issues, please use the provided issue template that is shown on the New issue page as__ 

sorry , sure will follow the same

@github-actions

This comment was marked as outdated.

@github-actions github-actions bot added the stale Issues and pull requests without any recent activity label Aug 29, 2023
@dnwe
Copy link
Collaborator

dnwe commented Aug 29, 2023

I'm going to close this as assumed to have been fixed, as from the last comment it sounded like the broker configuration wasn't matching the client configuration. Please re-open if this is not the case

@dnwe dnwe closed this as completed Aug 29, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
stale Issues and pull requests without any recent activity
Projects
None yet
Development

No branches or pull requests

2 participants