confluentinc / kafka-images

Confluent Docker images for Apache Kafka
Apache License 2.0
377 stars 134 forks source link

cp-server spews errors on v6+ when only using zookeeper and cp-server #75

Open vincentjames501 opened 3 years ago

vincentjames501 commented 3 years ago

If you just boot zookeeper and cp-server (which is what most of our devs do locally), it spews these errors continuously (every minute or so)

kafka_1                    |  (org.apache.kafka.clients.admin.AdminClientConfig)
kafka_1                    | [2021-03-08 15:30:07,880] WARN The configuration 'compression.type' was supplied but isn't a known config. (org.apache.kafka.clients.admin.AdminClientConfig)
kafka_1                    | [2021-03-08 15:30:07,880] WARN The configuration 'acks' was supplied but isn't a known config. (org.apache.kafka.clients.admin.AdminClientConfig)
kafka_1                    | [2021-03-08 15:30:07,880] WARN The configuration 'key.serializer' was supplied but isn't a known config. (org.apache.kafka.clients.admin.AdminClientConfig)
kafka_1                    | [2021-03-08 15:30:07,880] WARN The configuration 'max.request.size' was supplied but isn't a known config. (org.apache.kafka.clients.admin.AdminClientConfig)
kafka_1                    | [2021-03-08 15:30:07,880] WARN The configuration 'value.serializer' was supplied but isn't a known config. (org.apache.kafka.clients.admin.AdminClientConfig)
kafka_1                    | [2021-03-08 15:30:07,880] WARN The configuration 'interceptor.classes' was supplied but isn't a known config. (org.apache.kafka.clients.admin.AdminClientConfig)
kafka_1                    | [2021-03-08 15:30:07,880] WARN The configuration 'max.in.flight.requests.per.connection' was supplied but isn't a known config. (org.apache.kafka.clients.admin.AdminClientConfig)
kafka_1                    | [2021-03-08 15:30:07,880] WARN The configuration 'linger.ms' was supplied but isn't a known config. (org.apache.kafka.clients.admin.AdminClientConfig)
kafka_1                    | [2021-03-08 15:30:07,880] INFO Kafka version: 6.1.0-ce (org.apache.kafka.common.utils.AppInfoParser)
kafka_1                    | [2021-03-08 15:30:07,880] INFO Kafka commitId: d19b95317d02f231 (org.apache.kafka.common.utils.AppInfoParser)
kafka_1                    | [2021-03-08 15:30:07,880] INFO Kafka startTimeMs: 1615217407880 (org.apache.kafka.common.utils.AppInfoParser)
kafka_1                    | [2021-03-08 15:30:07,885] INFO [Admin Manager on Broker 1]: Error processing create topic request CreatableTopic(name='_confluent-telemetry-metrics', numPartitions=12, replicationFactor=3, assignments=[], configs=[CreateableTopicConfig(name='max.message.bytes', value='10485760'), CreateableTopicConfig(name='message.timestamp.type', value='CreateTime'), CreateableTopicConfig(name='min.insync.replicas', value='1'), CreateableTopicConfig(name='retention.ms', value='259200000'), CreateableTopicConfig(name='segment.ms', value='14400000'), CreateableTopicConfig(name='retention.bytes', value='-1')], linkName=null, mirrorTopic=null) (kafka.server.AdminManager)
kafka_1                    | org.apache.kafka.common.errors.InvalidReplicationFactorException: Replication factor: 3 larger than available brokers: 1.
kafka_1                    | [2021-03-08 15:30:07,886] INFO App info kafka.admin.client for confluent-telemetry-reporter-local-producer unregistered (org.apache.kafka.common.utils.AppInfoParser)
kafka_1                    | [2021-03-08 15:30:07,887] INFO Metrics scheduler closed (org.apache.kafka.common.metrics.Metrics)
kafka_1                    | [2021-03-08 15:30:07,887] INFO Closing reporter org.apache.kafka.common.metrics.JmxReporter (org.apache.kafka.common.metrics.Metrics)
kafka_1                    | [2021-03-08 15:30:07,887] INFO Metrics reporters closed (org.apache.kafka.common.metrics.Metrics)
kafka_1                    | [2021-03-08 15:30:07,887] ERROR Error checking or creating metrics topic (io.confluent.telemetry.exporter.kafka.KafkaExporter)
kafka_1                    | org.apache.kafka.common.errors.InvalidReplicationFactorException: Replication factor: 3 larger than available brokers: 1.

I've played with the following environment variables but they don't seem to have any affect that I can find:

CONFLUENT_METRICS_REPORTER_TOPIC_REPLICAS: 1
CONFLUENT_METRICS_REPORTER_TOPIC_CREATE: 'false'
CONFLUENT_METRICS_ENABLE: 'false'
KAFKA_DEFAULT_REPLICATION_FACTOR: 1
tsuz commented 1 year ago

Adding this one env var value in the cp-server's service's environment fixed it for me.

KAFKA_CONFLUENT_LICENSE_TOPIC_REPLICATION_FACTOR: 1
nicodewet commented 1 week ago

None of the listed options worked for me.

Pretty annoying but I suspect I'm going to have to let it go, probably does not have an effect hence why this keeps happening.