kafka scripts uses "kafka-run-class.sh" script to set environment variables and run classes. So if you set any environment variable in"kafka-run-class.sh" script, then it will be applicable to all the scripts. So try to set different JMX_PORT in kafka-topics.sh.
On Mon, Feb 8, 2016 at 9:24 PM, Shishir Shivhare <shishir...@gmail.com> wrote: > Hi, > > In order to get metrics through JMX, we have exported JMX_PORT=8099. But > when we are trying to delete the topics from kafka, we are getting > following issue: > > Error: Exception thrown by the agent : java.rmi.server.ExportException: > Port already in use: 8099; nested exception is: > java.net.BindException: Address already in use > > > When we do not export JMX_PORT then it works fine i.e. we are able to > delete topic. So my assumption is that when JMX_PORT is exported by us to > get JMX metrics, this variable is also used by delete process while > deleting the topic which gives error as this port is already used. > Can you please help us regarding this? > > > > Thanks & Regards, > Shishir Shivhare > > On 8 February 2016 at 21:23, Shishir Shivhare <shishir...@gmail.com> > wrote: > > > Hi, > > > > In order to get metrics through JMX, we have exported JMX_PORT=8099. But > > when we are trying to delete the topics from kafka, we are getting > > following issue: > > > > Error: Exception thrown by the agent : java.rmi.server.ExportException: > > Port already in use: 1234; nested exception is: > > java.net.BindException: Address already in use > > > > > > When we do not export JMX_PORT then it works fine i.e. we are able to > > delete topic. So my assumption is that when JMX_PORT is exported by us to > > get JMX metrics, this variable is also used by delete process while > > deleting the topic which gives error as this port is already used. > > Can you please help us regarding this? > > > > > > > > Thanks & Regards, > > Shishir Shivhare > > >