Try the below, it will work.

KAFKA_OPTS="" kafka-console-producer.sh --broker-list localhost:9094 
--topic myTopic

On Monday, 7 September 2020 at 19:27:04 UTC+5:30 Praveen Srinivasan wrote:

> I am also having the same issue.
>
> On Friday, 10 April 2020 at 14:30:43 UTC+5:30 Abhishek Karigar wrote:
>
>> running kafka, zookeeper with prometheus
>> following is the error i get when i try to produce data from kafka 
>> container
>>
>> bash-4.4# kafka-console-producer.sh --broker-list localhost:9094 --topic 
>> myTopic
>> Exception in thread "main" java.lang.reflect.InvocationTargetException
>> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>> at 
>> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
>> at 
>> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>> at java.lang.reflect.Method.invoke(Method.java:498)
>> at 
>> sun.instrument.InstrumentationImpl.loadClassAndStartAgent(InstrumentationImpl.java:386)
>> at 
>> sun.instrument.InstrumentationImpl.loadClassAndCallPremain(InstrumentationImpl.java:401)
>> Caused by: java.net.BindException: Address in use
>> at sun.nio.ch.Net.bind0(Native Method)
>> at sun.nio.ch.Net.bind(Net.java:433)
>> at sun.nio.ch.Net.bind(Net.java:425)
>> at 
>> sun.nio.ch.ServerSocketChannelImpl.bind(ServerSocketChannelImpl.java:223)
>> at sun.nio.ch.ServerSocketAdaptor.bind(ServerSocketAdaptor.java:74)
>> at sun.net.httpserver.ServerImpl.bind(ServerImpl.java:133)
>> at sun.net.httpserver.HttpServerImpl.bind(HttpServerImpl.java:54)
>> at 
>> io.prometheus.jmx.shaded.io.prometheus.client.exporter.HTTPServer.(HTTPServer.java:145)
>> at 
>> io.prometheus.jmx.shaded.io.prometheus.jmx.JavaAgent.premain(JavaAgent.java:31)
>> ... 6 more
>> FATAL ERROR in native method: processing of -javaagent failed
>>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Prometheus Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/prometheus-users/dcf3a02c-251e-451e-b57b-86e8eb5fd07fn%40googlegroups.com.

Reply via email to