-
Bug
-
Resolution: Not a Bug
-
Major
-
None
-
1.5.0.Final, 1.6.0.Alpha1
-
None
-
False
-
False
-
I am very sorry there was a typo in the `KAFKA_LISTENERS` env var.
-
-
I am currently using debezium/kafka docker image inside my docker network and I am trying to connect to kafka container with an external kafka client. Moreover there are other containers inside my network such as kafdrop or debezium/connect-db that are also communicating with the kafka broker. Therefore I need two kafka listeners one to bind for requests internal of the docker network and another to connect externally.
The environment session of my kafka docker compose looks like this:
environment: - KAFKA_ADVERTISED_LISTENERS=INT://kafka:9092,EXT://localhost:9095 - KAFKA_LISTENER=EXT://localhost:9095,INT://kafka:9092 - KAFKA_LISTENER_SECURITY_PROTOCOL_MAP=EXT:PLAINTEXT,INT:PLAINTEXT,PLAINTEXT:PLAINTEXT - KAFKA_INTER_BROKER_LISTENER_NAME=INT
However, I get the following error when docker-compose-ing up in a debezium/kafka:1.5
kafka | Using KAFKA_LISTENERS=PLAINTEXT://{kafka-dockerip}:9092 and KAFKA_ADVERTISED_LISTENERS=INT://kafka:9092,EXT://localhost:9095 kafka | 2021-05-19 13:10:23,161 - INFO [main:Log4jControllerRegistration$@31] - Registered kafka:type=kafka.Log4jController MBean kafka | 2021-05-19 13:10:23,847 - INFO [main:X509Util@79] - Setting -D jdk.tls.rejectClientInitiatedRenegotiation=true to disable client-initiated TLS renegotiation kafka | 2021-05-19 13:10:23,866 - ERROR [main:MarkerIgnoringBase@159] - Exiting Kafka due to fatal exception kafka | java.lang.IllegalArgumentException: Error creating broker listeners from 'PLAINTEXT://{kafka-dockerip}:9092': No security protocol defined for listener PLAINTEXT
If I run the same docker-compose file in the debezium/kafka:latest my external advertised listener is ignored and I get the same error:
kafka | Using KAFKA_ADVERTISED_LISTENERS=PLAINTEXT://{kafka-dockerip}:9092 kafka | 2021-05-19 13:09:17,995 - INFO [main:Log4jControllerRegistration$@31] - Registered kafka:type=kafka.Log4jController MBean kafka | 2021-05-19 13:09:18,694 - ERROR [main:MarkerIgnoringBase@159] - Exiting Kafka due to fatal exception kafka | java.lang.IllegalArgumentException: Error creating broker listeners from 'PLAINTEXT://{kafka-dockerip}:9092': No security protocol defined for listener PLAINTEXT kafka | at kafka.utils.CoreUtils$.listenerListToEndPoints(CoreUtils.scala:289)
If I run the same docker container on confluentinc/cp-kafka:latest it works flawlessly. I guess the problem is the time (or when) the security protocol takes place.