When Kafka Connect is configured like this:
apiVersion: kafka.strimzi.io/v1beta1 kind: KafkaConnect metadata: annotations: strimzi.io/use-connector-resources: "true" labels: app: cxp-connect managedFields: - apiVersion: kafka.strimzi.io/v1beta1 fieldsType: FieldsV1 fieldsV1: f:spec: f:logging: f:name: {} f:type: {} manager: kubectl operation: Update time: "2020-12-04T10:51:30Z" - apiVersion: kafka.strimzi.io/v1beta1 fieldsType: FieldsV1 fieldsV1: f:spec: f:jvmOptions: f:-XX: f:ExplicitGCInvokesConcurrent: {} f:InitiatingHeapOccupancyPercent: {} f:MaxGCPauseMillis: {} f:UseContainerSupport: {} f:UseG1GC: {} f:UseStringDeduplication: {} f:status: f:conditions: {} f:labelSelector: {} f:observedGeneration: {} manager: okhttp operation: Update time: "2020-12-04T10:51:46Z" name: cxp-connect namespace: cxp resourceVersion: "223917255" selfLink: /apis/kafka.strimzi.io/v1beta1/namespaces/cxp/kafkaconnects/cxp-connect uid: 68ae7a55-b94d-4e93-8bd5-a7818bdfcc0d spec: bootstrapServers: REDACTED config: config.storage.replication.factor: 3 config.storage.topic: cxp-connect-configs connector.client.config.override.policy: All group.id: cxp-connect internal.key.converter: org.apache.kafka.connect.json.JsonConverter internal.key.converter.schemas.enable: false internal.value.converter: org.apache.kafka.connect.json.JsonConverter internal.value.converter.schemas.enable: false key.converter: org.apache.kafka.connect.json.JsonConverter offset.flush.interval.ms: 20000 offset.flush.timeout.ms: 50000 offset.storage.partitions: 3 offset.storage.replication.factor: 3 offset.storage.topic: cxp-connect-offsets replication.factor: 3 status.storage.partitions: 3 status.storage.replication.factor: 3 status.storage.topic: cxp-connect-status task.shutdown.graceful.timeout.ms: 60000 value.converter: org.apache.kafka.connect.json.JsonConverter image: strimzi/kafka:0.20.0-kafka-2.5.0 jvmOptions: -XX: ExplicitGCInvokesConcurrent: true InitiatingHeapOccupancyPercent: 35 MaxGCPauseMillis: 20 MaxRAMPercentage: "75.0" UseContainerSupport: true UseG1GC: true UseStringDeduplication: true -server: true javaSystemProperties: - name: java.awt.headless value: "true" livenessProbe: initialDelaySeconds: 10 timeoutSeconds: 30 logging: name: cxp-connect-log4j-json type: external metrics: lowercaseOutputLabelNames: true lowercaseOutputName: true rules: - help: Kafka $1 JMX metric start time seconds labels: clientId: $2 name: kafka_$1_start_time_seconds pattern: kafka.(.+)<type=app-info, client-id=(.+)><>start-time-ms type: GAUGE valueFactor: 0.001 - help: Kafka $1 JMX metric info version and commit-id labels: $3: $4 clientId: $2 name: kafka_$1_$3_info pattern: 'kafka.(.+)<type=app-info, client-id=(.+)><>(commit-id|version): (.+)' type: GAUGE value: 1 - help: Kafka $1 JMX metric type $2 labels: clientId: $3 partition: $5 topic: $4 name: kafka_$2_$6 pattern: kafka.(.+)<type=(.+)-metrics, client-id=(.+), topic=(.+), partition=(.+)><>(.+-total|compression-rate|.+-avg|.+-replica|.+-lag|.+-lead) type: GAUGE - help: Kafka $1 JMX metric type $2 labels: clientId: $3 topic: $4 name: kafka_$2_$5 pattern: kafka.(.+)<type=(.+)-metrics, client-id=(.+), topic=(.+)><>(.+-total|compression-rate|.+-avg) type: GAUGE - help: Kafka $1 JMX metric type $2 labels: clientId: $3 nodeId: $4 name: kafka_$2_$5 pattern: kafka.(.+)<type=(.+)-metrics, client-id=(.+), node-id=(.+)><>(.+-total|.+-avg) type: UNTYPED - help: Kafka $1 JMX metric type $2 labels: clientId: $3 name: kafka_$2_$4 pattern: kafka.(.+)<type=(.+)-metrics, client-id=(.*)><>(.+-total|.+-avg|.+-bytes|.+-count|.+-ratio|.+-age|.+-flight|.+-threads|.+-connectors|.+-tasks|.+-ago) type: GAUGE - help: Kafka Connect JMX Connector status labels: connector: $1 status: $3 task: $2 name: kafka_connect_connector_status pattern: 'kafka.connect<type=connector-task-metrics, connector=(.+), task=(.+)><>status: ([a-z-]+)' type: GAUGE value: 1 - help: Kafka Connect JMX metric type $1 labels: connector: $2 task: $3 name: kafka_connect_$1_$4 pattern: kafka.connect<type=(.+)-metrics, connector=(.+), task=(.+)><>(.+-total|.+-count|.+-ms|.+-ratio|.+-avg|.+-failures|.+-requests|.+-timestamp|.+-logged|.+-errors|.+-retries|.+-skipped) type: GAUGE - help: Kafka Connect JMX metric $1 labels: connector: $1 name: kafka_connect_worker_$2 pattern: kafka.connect<type=connect-worker-metrics, connector=(.+)><>([a-z-]+) type: GAUGE - help: Kafka Connect JMX metric worker name: kafka_connect_worker_$1 pattern: kafka.connect<type=connect-worker-metrics><>([a-z-]+) type: GAUGE - help: Kafka Connect JMX metric rebalance information name: kafka_connect_worker_rebalance_$1 pattern: kafka.connect<type=connect-worker-rebalance-metrics><>([a-z-]+) type: GAUGE - labels: context: $2 name: $3 plugin: $1 name: debezium_metrics_$4 pattern: debezium.([^:]+)<type=connector-metrics, context=([^,]+), server=([^>]+)><>((?!RowsScanned)[^:]+) readinessProbe: initialDelaySeconds: 10 timeoutSeconds: 30 replicas: 1 resources: limits: cpu: 2000m memory: 3Gi requests: cpu: 1000m memory: 3Gi template: pod: metadata: labels: kafka-cluster: kafka1 terminationGracePeriodSeconds: 120 tls: trustedCertificates: [] version: 2.5.0 status: conditions: - lastTransitionTime: "2020-12-04T10:51:46.897533Z" message: 'PUT /admin/loggers/root returned 404 (Not Found): Unexpected status code' reason: ConnectRestException status: "True" type: NotReady labelSelector: strimzi.io/cluster=cxp-connect,strimzi.io/name=cxp-connect-connect,strimzi.io/kind=KafkaConnect observedGeneration: 44 replicas: 1 url: http://cxp-connect-connect-api.cxp.svc:8083
with the following logging ConfigMap:
apiVersion: v1 data: log4j.properties: | log4j.rootCategory = WARN, stdout log4j.appender.stdout=org.apache.log4j.ConsoleAppender log4j.appender.stdout.layout=net.logstash.log4j.JSONEventLayoutV1 log4j.appender.stdout.layout.includedFields=location log4j.logger.org.reflections=ERROR log4j.logger.org.apache.zookeeper=ERROR log4j.logger.org.I0Itec.zkclient=ERROR log4j.logger.org.reflections=ERROR log4j.logger.io.debezium.connector.mysql.MySqlSchema=ERROR log4j.logger.io.debezium.connector.mysql.MySqlValueConverters=ERROR kind: ConfigMap metadata: annotations: creationTimestamp: "2020-09-25T09:28:13Z" labels: app: cxp-connect cleanup: "true" deployed-with: skaffold docker-api-version: "1.40" profiles: k8s-usw2-dev-skaffold skaffold-builder: local skaffold-deployer: kustomize skaffold-tag-policy: envTemplateTagger tail: "true" name: cxp-connect-log4j-json namespace: cxp
The reconciliation fails because
{PUT /admin/loggers/root}returns wrong error code.
This was raised as Strimzi#4053