yahoo / CMAK

CMAK is a tool for managing Apache Kafka clusters
Apache License 2.0
11.8k stars 2.5k forks source link

SASL_PLAINTEXT can't get the Latest Offset and Leader Size for each topic & Consumers can not get LogSize and lag #477

Open saup007 opened 6 years ago

saup007 commented 6 years ago

Can not get the Latest Offset and Leader Size for each topic Consumers can not get LogSize and lag

111 222

3333

conf/my-jaas.conf

KafkaClient {
  org.apache.kafka.common.security.plain.PlainLoginModule required
  username="adminuser"
  password="adminpassword";
};

conf/consumer.properties

security.protocol=SASL_PLAINTEXT
sasl.mechanism=PLAIN

conf/application.conf

# Copyright 2015 Yahoo Inc. Licensed under the Apache License, Version 2.0
# See accompanying LICENSE file.

# This is the main configuration file for the application.
# ~~~~~

# Secret key
# ~~~~~
# The secret key is used to secure cryptographics functions.
# If you deploy your application to several instances be sure to use the same key!
play.crypto.secret="^<csmm5Fx4d=r2HEX8pelM3iBkFVv?k[mc;IZE<_Qoq8EkX_/7@Zt6dP05Pzea3U"
play.crypto.secret=${?APPLICATION_SECRET}

# The application languages
# ~~~~~
play.i18n.langs=["en"]

play.http.requestHandler = "play.http.DefaultHttpRequestHandler"
play.http.context = "/"
play.application.loader=loader.KafkaManagerLoader

kafka-manager.zkhosts="zk01:1950,zk02:1950,zk03:1950"
#kafka-manager.zkhosts=${?ZK_HOSTS}
pinned-dispatcher.type="PinnedDispatcher"
pinned-dispatcher.executor="thread-pool-executor"
application.features=["KMClusterManagerFeature","KMTopicManagerFeature","KMPreferredReplicaElectionFeature","KMReassignPartitionsFeature"]

akka {
  loggers = ["akka.event.slf4j.Slf4jLogger"]
  loglevel = "INFO"
}

#basicAuthentication.enabled=false
basicAuthentication.enabled=true
basicAuthentication.enabled=${?KAFKA_MANAGER_AUTH_ENABLED}
basicAuthentication.username="admin"
#basicAuthentication.username=${?KAFKA_MANAGER_USERNAME}
basicAuthentication.password="password"
#basicAuthentication.password=${?KAFKA_MANAGER_PASSWORD}
basicAuthentication.realm="Kafka-Manager"
basicAuthentication.excluded=["/api/health"] # ping the health of your instance without authentification

#kafka-manager.consumer.properties.file=${?CONSUMER_PROPERTIES_FILE}
kafka-manager.consumer.properties.file=/data1/kafka-manager-1.3.3.15/conf/consumer.properties

config/server.properties

authorizer.class.name=kafka.security.auth.SimpleAclAuthorizer  
#principal.builder.class=org.apache.kafka.common.security.auth.DefaultPrincipalBuilder  
listeners=SASL_PLAINTEXT://zkserver01:1901
security.inter.broker.protocol= SASL_PLAINTEXT
sasl.mechanism.inter.broker.protocol=PLAIN
sasl.enabled.mechanisms=PLAIN
super.users=User:adminuser
thammuio commented 6 years ago

I have the same issue with SASL_SSL in Kafka 0.10.2.0

saup007 commented 5 years ago

@kingmorning but, kafka-manager 1.3.3.21, 0.8、0.9 Security Protocol PLAIN_TEXT can't get the Latest Offset image