Hi All,
Sorry to bother you all.
It was simple. 😊
Just put one line in required .sh file
export JMX_PORT=<port number of your choice other than 9099>

and it will run 😊

thanks,
Sunil.

From: Sunil CHAUDHARI
Sent: Friday, February 28, 2020 10:06 AM
To: [email protected]
Subject: HELP in Usage of JMX port in Kafka

Hi all,
I have used JMX_PORT 9099 in environment variable and started Kafka.
There is not problem till now. I can see metrics on kafka-manager console. This 
is fine.

However when I run kafka-consumer-perf-test.sh and kafka-producer-perf-test.sh  
and similar utility under /bin then I get error given at the end:
I understand the root cause. But I don’t know solution.
Cant I make use of those test utilities given under /bin, when I enabled JMX?
I want to measure performance of running kafka cluster and at the same time 
want to monitor metrics on kafka-manager.
How can I skip JMX_port while running manual utilities? Or is there a way I can 
give different port for  kafka-producer-perf-test.sh ?
Please help me in this regards.

Error: Exception thrown by the agent : java.rmi.server.ExportException: Port 
already in use: 9099; nested exception is:
        java.net.BindException: Address already in use (Bind failed)
jdk.internal.agent.AgentConfigurationError: java.rmi.server.ExportException: 
Port already in use: 9099; nested exception is:
        java.net.BindException: Address already in use (Bind failed)
        at 
jdk.management.agent/sun.management.jmxremote.ConnectorBootstrap.startRemoteConnectorServer(ConnectorBootstrap.java:491)
        at 
jdk.management.agent/jdk.internal.agent.Agent.startAgent(Agent.java:447)
        at 
jdk.management.agent/jdk.internal.agent.Agent.startAgent(Agent.java:599)
Caused by: java.rmi.server.ExportException: Port already in use: 9099; nested 
exception is:
        java.net.BindException: Address already in use (Bind failed)
        at 
java.rmi/sun.rmi.transport.tcp.TCPTransport.listen(TCPTransport.java:335)
        at 
java.rmi/sun.rmi.transport.tcp.TCPTransport.exportObject(TCPTransport.java:243)
        at 
java.rmi/sun.rmi.transport.tcp.TCPEndpoint.exportObject(TCPEndpoint.java:411)
        at java.rmi/sun.rmi.transport.LiveRef.exportObject(LiveRef.java:147)
        at 
java.rmi/sun.rmi.server.UnicastServerRef.exportObject(UnicastServerRef.java:233)
        at java.rmi/sun.rmi.registry.RegistryImpl.setup(RegistryImpl.java:220)
        at java.rmi/sun.rmi.registry.RegistryImpl.<init>(RegistryImpl.java:180)
        at 
jdk.management.agent/sun.management.jmxremote.SingleEntryRegistry.<init>(SingleEntryRegistry.java:49)
        at 
jdk.management.agent/sun.management.jmxremote.ConnectorBootstrap.exportMBeanServer(ConnectorBootstrap.java:836)
        at 
jdk.management.agent/sun.management.jmxremote.ConnectorBootstrap.startRemoteConnectorServer(ConnectorBootstrap.java:479)
        ... 2 more
Caused by: java.net.BindException: Address already in use (Bind failed)
        at java.base/java.net.PlainSocketImpl.socketBind(Native Method)
        at 
java.base/java.net.AbstractPlainSocketImpl.bind(AbstractPlainSocketImpl.java:436)
        at java.base/java.net.ServerSocket.bind(ServerSocket.java:381)
        at java.base/java.net.ServerSocket.<init>(ServerSocket.java:243)
        at java.base/java.net.ServerSocket.<init>(ServerSocket.java:135)
        at 
java.rmi/sun.rmi.transport.tcp.TCPDirectSocketFactory.createServerSocket(TCPDirectSocketFactory.java:45)
        at 
java.rmi/sun.rmi.transport.tcp.TCPEndpoint.newServerSocket(TCPEndpoint.java:666)
        at 
java.rmi/sun.rmi.transport.tcp.TCPTransport.listen(TCPTransport.java:324)
        ... 11 more
CONFIDENTIAL NOTE:
The information contained in this email is intended only for the use of the 
individual or entity named above and may contain information that is 
privileged, confidential and exempt from disclosure under applicable law. If 
the reader of this message is not the intended recipient, you are hereby 
notified that any dissemination, distribution or copying of this communication 
is strictly prohibited. If you have received this message in error, please 
immediately notify the sender and delete the mail. Thank you.

Reply via email to