Comments (8)
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.
Add the IP address in the network settings of the container, which made the kafka-quickstart test work.
from kubedock.
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.
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.
Closing, released kubedock-0.12.0 with the fix.
from kubedock.
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.
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.
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)
- Port forward not working with full URL HOT 2
- docker-in-docker (ryuk support) doesn't work testcontainers-dotnet HOT 2
- Localstack container fails to start due to missing container id HOT 7
- Allow to set spec.activeDeadlineSeconds HOT 8
- Could not start kafka container HOT 1
- Passing environment variables, podman HOT 5
- Regression on 0.15.4 for .NET testcontainer HOT 4
- get container logs: "tail" parameter not valid HOT 3
- Error logged for services, configmaps and pods deletion with an 'Unauthorized' message HOT 8
- Lease hangs indefinitely when Kubedock quits unexpectedly HOT 6
- Change prefix-name for the orchestrated pods via an environment variable/cli argument HOT 5
- Verbosity switch is ignored with --pod-template option HOT 6
- Not able to work with testcontainer node 10.8.1 (was working on 10.6.0) HOT 5
- Reasoning for mount HOT 2
- readOnlyRootFilesystem breaks postgres.WithConfigFile HOT 1
- Support container creation when resource quotas are hit HOT 2
- Bug with concurrent `docker run` calls
- Files with --pre-archive are only copied if there are Volumes/Bind Mounts HOT 1
- Kubedock return 0 status code even when the pod is being evicted HOT 1
- Support for IPv6 HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from kubedock.