Git Product home page Git Product logo

Comments (8)

joyrex2001 avatar joyrex2001 commented on July 19, 2024

The test initially failed because of a failing exec's that pushed configuration and start zookeeper/kafka. I pushed a fix for that, but at my end it still fails with not finding a leader.

The quickstart is also using an older testcontainers version (1.12.3) and is based on an old Quarkus version (1.4.2). If you are using Quarkus, it might make sense to look at the Kafka dev-service instead.

from kubedock.

joyrex2001 avatar joyrex2001 commented on July 19, 2024

Add the IP address in the network settings of the container, which made the kafka-quickstart test work.

from kubedock.

NateLove avatar NateLove commented on July 19, 2024

Add which IP address to which container?

Also, side note, I was working on an updated quarkus version project and discovered that part of my issue is related to scc, where a cluster admin in openshift is able to run execs against pods, but normal users are not.

from kubedock.

joyrex2001 avatar joyrex2001 commented on July 19, 2024

Add which IP address to which container?

The error was due to this not providing the ip-address of the docker daemon (which is in kubedock case always 127.0.0.1). Because of that property missing in the container details, it resolved to 'null'.

The result of that, was String.format("BROKER://%s:9092", internalIp) resolving to the hostname null. With this fix, it will correctly point to the docker host and the leader-election error was fixed as well.

Also, side note, I was working on an updated quarkus version project and discovered that part of my issue is related to scc, where a cluster admin in openshift is able to run execs against pods, but normal users are not.

The minimum required rbac the service account requires is documented here. Cluster admin is not required, just a service account that has that particular documented role.

from kubedock.

joyrex2001 avatar joyrex2001 commented on July 19, 2024

Closing, released kubedock-0.12.0 with the fix.

from kubedock.

Sgitario avatar Sgitario commented on July 19, 2024

This issue still happened to me using latest version of Testcontainers Kafka and latest version of Kubedock.

Kafka failed to start with:

HttpClient/5.0.3 (Java/17.0.8)"}, "X-Tc-Sid":[]string{"90d1f33e-3a85-4b17-a270-f4cde906bac1"}}

I1009 05:26:45.177043       1 util.go:77] Request Body: ./PaxHeaders.X/testcontainers_start.sh0100644 0000000 0000000 00000000034 14510707425 017124 xustar000000000 0000000 28 mtime=1696829205.1759116

testcontainers_start.sh0000777 0000000 0000000 00000000574 14510707425 014444 0ustar000000000 0000000 #!/bin/bash
export KAFKA_ADVERTISED_LISTENERS=PLAINTEXT://127.0.0.1:38135,BROKER://null:9092
echo '' > /etc/confluent/docker/ensure 
echo 'clientPort=2181' > zookeeper.properties
echo 'dataDir=/var/lib/zookeeper/data' >> zookeeper.properties
echo 'dataLogDir=/var/lib/zookeeper/log' >> zookeeper.properties
zookeeper-server-start zookeeper.properties &
/etc/confluent/docker/run 
I1009 05:26:45.180495       1 copy.go:30] copy archive to 849a67ec1b5a:/
I1009 05:26:45.180817       1 exec.go:59] exec kubedock-849a67ec1b5a:[tar -xf - -C /]
I1009 05:26:45.188514       1 logger.go:20] Forwarding from 127.0.0.1:34283 -> 2181
I1009 05:26:45.188673       1 logger.go:20] Forwarding from [::1]:34283 -> 2181
I1009 05:26:45.188732       1 logger.go:20] Forwarding from 127.0.0.1:38135 -> 9093
I1009 05:26:45.189106       1 logger.go:20] Forwarding from [::1]:38135 -> 9093
E1009 05:26:45.380505       1 util.go:17] error during request[500]: command terminated with exit code 2

Notice the BROKER://null:9092 text.

In the latest version of testcontainers kafka, this is done by: https://github.com/testcontainers/testcontainers-java/blob/dd1427ebd30bbaba7f32184f1376b7c21e725ab5/modules/kafka/src/main/java/org/testcontainers/containers/KafkaContainer.java#L307

from kubedock.

joyrex2001 avatar joyrex2001 commented on July 19, 2024

This issue still happened to me using latest version of Testcontainers Kafka and latest version of Kubedock.

Are you using 0.13.0? I think this is a dupe of #51 ; the fix for this has not been released yet, but is available on latest.

from kubedock.

Sgitario avatar Sgitario commented on July 19, 2024

This issue still happened to me using latest version of Testcontainers Kafka and latest version of Kubedock.

Are you using 0.13.0? I think this is a dupe of #51 ; the fix for this has not been released yet, but is available on latest.

Thanks @joyrex2001 !

from kubedock.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.