spring-projects / spring-aot-smoke-tests

Smoke tests for Spring's AOT and native support

Home Page:https://spring-team-aot-smoke-tests-dashboard.azuremicroservices.io/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

cloud-stream-kafka smoke test fails when using Docker Compose 2.x

onobc opened this issue · comments

Steps to reproduce:

  • Using Docker Compose 2.x
  • Run ./gradlew :cloud-stream-kafka:jvmAotTest or ./gradlew :spring-kafka:jvmAotTest

Should fail w/ something like:

* What went wrong:
Execution failed for task ':cloud-stream-kafka:jvmComposeUp'.
> Container c1737fba9aa818388d628c6202153ade9193b9c4c9b9c41ee23b9714c5867dc4 of kafka-1 is not running nor restarting. Logs:
  [Configuring] 'advertised.listeners' in '/opt/kafka/config/server.properties'
  [Configuring] 'port' in '/opt/kafka/config/server.properties'
  [Configuring] 'inter.broker.listener.name' in '/opt/kafka/config/server.properties'
  Excluding KAFKA_HOME from broker config
  [Configuring] 'log.dirs' in '/opt/kafka/config/server.properties'
  [Configuring] 'listeners' in '/opt/kafka/config/server.properties'
  Excluding KAFKA_VERSION from broker config
  [Configuring] 'zookeeper.connect' in '/opt/kafka/config/server.properties'
  [Configuring] 'listener.security.protocol.map' in '/opt/kafka/config/server.properties'
  [Configuring] 'broker.id' in '/opt/kafka/config/server.properties'
  [2022-08-11 06:44:02,756] INFO Registered kafka:type=kafka.Log4jController MBean (kafka.utils.Log4jControllerRegistration$)
  [2022-08-11 06:44:03,725] INFO Setting -D jdk.tls.rejectClientInitiatedRenegotiation=true to disable client-initiated TLS renegotiation (org.apache.zookeeper.common.X509Util)
  [2022-08-11 06:44:03,822] ERROR Exiting Kafka due to fatal exception (kafka.Kafka$)
  java.lang.IllegalArgumentException: Error creating broker listeners from 'plaintext://kafka:29092,PLAINTEXT_host://localhost:': Unable to parse PLAINTEXT_host://localhost: to a broker endpoint
        at kafka.utils.CoreUtils$.listenerListToEndPoints(CoreUtils.scala:273)
        at kafka.server.KafkaConfig.advertisedListeners(KafkaConfig.scala:1840)
        at kafka.server.KafkaConfig.validateValues(KafkaConfig.scala:1929)
        at kafka.server.KafkaConfig.<init>(KafkaConfig.scala:1896)
        at kafka.server.KafkaConfig.<init>(KafkaConfig.scala:1389)
        at kafka.Kafka$.buildServer(Kafka.scala:67)
        at kafka.Kafka$.main(Kafka.scala:87)
        at kafka.Kafka.main(Kafka.scala)
  Caused by: org.apache.kafka.common.KafkaException: Unable to parse PLAINTEXT_host://localhost: to a broker endpoint
        at kafka.cluster.EndPoint$.createEndPoint(EndPoint.scala:57)
        at kafka.utils.CoreUtils$.$anonfun$listenerListToEndPoints$6(CoreUtils.scala:270)
        at scala.collection.StrictOptimizedIterableOps.map(StrictOptimizedIterableOps.scala:99)
        at scala.collection.StrictOptimizedIterableOps.map$(StrictOptimizedIterableOps.scala:86)
        at scala.collection.mutable.ArraySeq.map(ArraySeq.scala:37)
        at kafka.utils.CoreUtils$.listenerListToEndPoints(CoreUtils.scala:270)
        ... 7 more

Workaround

  • Downgrade your Docker Compose to 1.x

Solution

TBD but ideally find a way for the current Kafka docker compose file (identical in both Kafka samples listed above) to work across both 1.x and 2.x.

Closing in favor of #98.

Nope. cloud-stream-kafka still needs to be fixed.

I did not realize this was fixed in the main kafka sample 2 weeks ago or I would have applied the simple fix here as well. I'll get to this today.

Closing in favor of #106.