Skip to content
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

Kafka coredump created for topic list command on Kafka broker #1074

Open
2 tasks
raz08 opened this issue Jan 3, 2024 · 1 comment
Open
2 tasks

Kafka coredump created for topic list command on Kafka broker #1074

raz08 opened this issue Jan 3, 2024 · 1 comment

Comments

@raz08
Copy link

raz08 commented Jan 3, 2024

Description

Tried to list kafka topics from the Kafka broker by exec into one of the broker pod. Got error with address bind exception and created coredump.

$kubectl exec -ti kafka-0-wmdcv -n kafka -- sh
#/opt/kafka/bin/kafka-topics.sh --bootstrap-server=kafka-headless.kafka.svc.cluster.local:29092 --list

`

Exception in thread "main" java.lang.reflect.InvocationTargetException
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.base/java.lang.reflect.Method.invoke(Unknown Source)
at java.instrument/sun.instrument.InstrumentationImpl.loadClassAndStartAgent(Unknown Source)
at java.instrument/sun.instrument.InstrumentationImpl.loadClassAndCallPremain(Unknown Source)
Caused by: java.net.BindException: Address already in use
at java.base/sun.nio.ch.Net.bind0(Native Method)
at java.base/sun.nio.ch.Net.bind(Unknown Source)
at java.base/sun.nio.ch.ServerSocketChannelImpl.netBind(Unknown Source)
at java.base/sun.nio.ch.ServerSocketChannelImpl.bind(Unknown Source)
at java.base/sun.nio.ch.ServerSocketAdaptor.bind(Unknown Source)
at jdk.httpserver/sun.net.httpserver.ServerImpl.(Unknown Source)
at jdk.httpserver/sun.net.httpserver.HttpServerImpl.(Unknown Source)
at jdk.httpserver/sun.net.httpserver.DefaultHttpServerProvider.createHttpServer(Unknown Source)
at jdk.httpserver/com.sun.net.httpserver.HttpServer.create(Unknown Source)
at io.prometheus.jmx.shaded.io.prometheus.client.exporter.HTTPServer.(HTTPServer.java:176)
at io.prometheus.jmx.shaded.io.prometheus.jmx.JavaAgent.premain(JavaAgent.java:31)
... 6 more
*** java.lang.instrument ASSERTION FAILED ***: "result" with message agent load/premain call failed at ../src/java.instrument/share/native/libinstrument/JPLISAgent.c line: 422
FATAL ERROR in native method: processing of -javaagent failed, processJavaStart failed
Aborted (core dumped)
`

Expected Behavior

For any wrong command given by user there should not be any coredumps or crash

Actual Behavior

Coredump created for wrong or unknown command or addressbind exception

Affected Version

Please provide the version number where this issue was encountered.

Steps to Reproduce

  1. First step
  2. Second step
  3. etc.

Checklist

@bartam1
Copy link
Contributor

bartam1 commented Jan 8, 2024

Hello!
You need to unset the KAFKA_OPTS env variable first.
Please try this: #unset KAFKA_OPTS

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants