so i installed kafka server and confirmed that they work when i just plainly test them
then i have to set up SASL_PLAINTEXT for the kafka so i followed the instruction from here
which basically created
then add configuration to
- zookeeper.properties
zookeeper.sasl.client=true
authProvider.1=org.apache.zookeeper.server.auth.SASLAuthenticationProvider
requireClientAuthScheme=sasl
- server.properties
super.users=User:admin
security.inter.broker.protocol=SASL_PLAINTEXT
sasl.mechanism.inter.broker.protocol=PLAIN
sasl.enabled.mechanisms=PLAIN
authorizer.class.name=kafka.security.authorizer.AclAuthorizer
allow.everyone.if.no.acl.found=true
listeners=SASL_PLAINTEXT://my_ip:9092
advertised.listeners=SASL_PLAINTEXT://my_ip:9092
and then adding the line export KAFKA_OPTS="-Djava.security.auth.login.config=file:$base_dir/../config/zookeeper_jaas.conf"
and "kafka_jaas.conf"
accordingly in their ...-start.sh
then after starting zookeeper and kafka, i tried
but the consumer shows nothing
this is the consumer.properties
What am i missing?
kafka: version 3.5.0 zookeeper: version 3.6.4 ubuntu: Linux 5.15.0-82-generic
I'm not exactly sure what I did, but I think I just reinstall things with different approach and it works
This is what I do:
and then I just start and stop it as a service
My testing Configuration
My Kafka is in my vm and I need to connect to it from outside the vm
Configuration File:
kafka2/config/server.properties
options (auth mechanism)
Additional Configuration
options (sasl mechanism)