-
Notifications
You must be signed in to change notification settings - Fork 26
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
UnknownHostException for resolve bootstrapServers. #26
Comments
Ok I was forced to use this product. I have come up with a better solution since my previous comment (the nuclear option :P). The root cause is Alpine Linux musl library on Kubernetes. No matter what you do Alpine Linux will be dodgy at best. OAUTH2 is unconfigurable because JAVA can't do DNS. The Solution: (I'll edit this below to the Dockerfile when I'm able) Change the FROM to Then change the apk to apt get. You don't need the gcompat. Then build the image. Extra-Info: This means that with my debian build (maybe Alpine too) the config doesn't apply unless you use env variables. I've added it like this
Then DON'T use the yamlApplicationConfig or yamlApplicationConfigConfig elements. Create your config in a configmap named kafka-ui-configmap Add the volume mapping and mounts manually
|
Here Are the modified Dockerfile FROM azul/zulu-openjdk-debian:17-jre-headless
RUN apt-get install \
# snappy codec
# gcompat \
# configuring timezones
tzdata
RUN groupadd kafkaui && useradd kafkaui -g kafkaui
# creating folder for dynamic config usage (certificates uploads, etc)
RUN mkdir /etc/kafkaui/
RUN chown kafkaui /etc/kafkaui
USER kafkaui
ARG JAR_FILE
COPY "/target/${JAR_FILE}" "/kafka-ui-api.jar"
ENV JAVA_OPTS=
EXPOSE 8080
# see JmxSslSocketFactory docs to understand why add-opens is needed
CMD java --add-opens java.rmi/javax.rmi.ssl=ALL-UNNAMED $JAVA_OPTS -jar kafka-ui-api.jar After Using the builded images, the error doesn't solved |
I had it running with keycloak but got a nice formatted 404 when logging in that my browser debug mode didn't see. Also needed to press F5 a few times to get it to log in. |
Issue submitter TODO list
Describe the bug (actual behavior)
Got exception UnknownHostException for host from bootstrapServers field.
But in container host resolved correct.
Expected behavior
Resolve host from bootstrapServers.
Your installation details
Steps to reproduce
I add to config two clusters.
First is external host with kafka.
Second is kafka in k8s.
Can resolve hosts in container:
But in log i see for external server:
Looks like bug.
I can use as workaround two dedicated kafka-iu:
But it is strange that in container resolver i can get ip for hosts but application show error.
Screenshots
No response
Logs
No response
Additional context
No response
The text was updated successfully, but these errors were encountered: