bitnami / charts

Bitnami Helm Charts
https://bitnami.com
Other
9.06k stars 9.23k forks source link

[bitnami/kafka] kafka_jaas.conf not being generated #21896

Closed alisre closed 10 months ago

alisre commented 10 months ago

Name and Version

bitnami/kafka 22.1.6

What architecture are you using?

None

What steps will reproduce the bug?

  1. Install the chart with the values below,the old docker image is ok but the latest is not fine
  2. It fails because kafak_jaas.conf is not being generated
  3. It also the bug report link

Are you using any custom parameters or values?

global:
  storageClass: "local-storage-kafka"
fullnameOverride: "kafka"
image:
  registry: docker.io
  repository: bitnami/kafka
  tag: 3.4.1-debian-11-r117
  debug: true
heapOpts: -Xmx1024m -Xms1024m
authorizerClassName: kafka.security.authorizer.AclAuthorizer
config: |-
  zookeeper.connect=zookeeper.svc.cluster.local:2181
auth:
  clientProtocol: sasl_tls
  externalClientProtocol: sasl_tls
  interBrokerProtocol: plaintext
  controllerProtocol: plaintext
  sasl:
    mechanisms: plain,scram-sha-256,scram-sha-512
    interBrokerMechanism: plain
    jaas:
      clientUsers:
        - kafkauser
      clientPasswords: 
        - yRGxGV0Y
  tls:
    type: jks
    existingSecrets: 
      - kafka-secret-0
    password: "litedev"
replicaCount: 1
externalAccess:
  enabled: true
  autoDiscovery:
    enabled: true
    image:
      registry: docker.io
      repository: bitnami/kubectl
      tag: 1.25.8-debian-11-r2
      pullPolicy: IfNotPresent
  service:
    type: NodePort
    nodePorts:
      - 31090
persistence:
  enabled: true
  storageClass: ""
  accessModes:
    - ReadWriteOnce
  size: 50Gi
  mountPath: /bitnami/kafka
volumePermissions:
  enabled: true
  image:
    registry: docker.io
    repository: bitnami/bitnami-shell
    tag: 11-debian-11-r109
    pullPolicy: IfNotPresent
rbac:
  create: true

kraft:
  enabled: false
zookeeper:
  enabled: false
  replicaCount: 1
  auth:
    client:
      enabled: false
  persistence:
    enabled: true
    storageClass: ""
    accessModes:
      - ReadWriteOnce
    size: 8Gi

externalZookeeper:
  servers: ["zookeeper.svc.cluster.local:2181"]

What is the expected behavior?

No response

What do you see instead?

[2024-01-09 01:25:47,081] INFO Setting -D jdk.tls.rejectClientInitiatedRenegotiation=true to disable client-initiated TLS renegotiation (org.apache.zookeeper.common.X509Util)
[2024-01-09 01:25:47,155] ERROR Exiting Kafka due to fatal exception (kafka.Kafka$)
org.apache.kafka.common.KafkaException: Exception while loading Zookeeper JAAS login context [java.security.auth.login.config=/opt/bitnami/kafka/config/kafka_jaas.conf, zookeeper.sasl.client=default:true, zookeeper.sasl.clientconfig=default:Client]
        at org.apache.kafka.common.security.JaasUtils.isZkSaslEnabled(JaasUtils.java:68)
        at kafka.server.KafkaServer$.zkClientConfigFromKafkaConfig(KafkaServer.scala:84)
        at kafka.server.KafkaServer.<init>(KafkaServer.scala:155)
        at kafka.Kafka$.buildServer(Kafka.scala:79)
        at kafka.Kafka$.main(Kafka.scala:93)
        at kafka.Kafka.main(Kafka.scala)
Caused by: java.lang.SecurityException: java.io.IOException: /opt/bitnami/kafka/config/kafka_jaas.conf (No such file or directory)
        at java.base/sun.security.provider.ConfigFile$Spi.<init>(ConfigFile.java:139)
        at java.base/sun.security.provider.ConfigFile.<init>(ConfigFile.java:104)
        at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
        at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:77)
        at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
        at java.base/java.lang.reflect.Constructor.newInstanceWithCaller(Constructor.java:499)
        at java.base/java.lang.reflect.ReflectAccess.newInstance(ReflectAccess.java:128)
        at java.base/jdk.internal.reflect.ReflectionFactory.newInstance(ReflectionFactory.java:347)
        at java.base/java.lang.Class.newInstance(Class.java:645)
        at java.base/javax.security.auth.login.Configuration$2.run(Configuration.java:258)
        at java.base/javax.security.auth.login.Configuration$2.run(Configuration.java:249)
        at java.base/java.security.AccessController.doPrivileged(AccessController.java:569)
        at java.base/javax.security.auth.login.Configuration.getConfiguration(Configuration.java:248)
        at org.apache.kafka.common.security.JaasUtils.isZkSaslEnabled(JaasUtils.java:64)
        ... 5 more
Caused by: java.io.IOException: /opt/bitnami/kafka/config/kafka_jaas.conf (No such file or directory)
        at java.base/sun.security.provider.ConfigFile$Spi.ioException(ConfigFile.java:669)
        at java.base/sun.security.provider.ConfigFile$Spi.init(ConfigFile.java:265)
        at java.base/sun.security.provider.ConfigFile$Spi.<init>(ConfigFile.java:137)
        ... 18 more

Additional information

how to fix it

joancafom commented 10 months ago

As you stated, this is already reported in https://github.com/bitnami/charts/issues/15133. Please, use that thread for the same topic, as this avoid having duplicates and prevents have information scattered across issues.

alisre commented 10 months ago

ok i will try it