I'm doing exactly that Marcos as follows from what I said originally:

"To set JMX's port I am using the following to run the server:

    env JMX_PORT=10000 && bin/kafka-server-start.sh config/server2.properties"

To clarify, this is how I start the second server. The first server is
started with JMX port 9999.

Tom

On Sun, Oct 28, 2012 at 1:02 PM, Marcos Juarez <mjua...@gmail.com> wrote:
> You need to specify a different JMX port for the second Kafka server, since 
> both JVM's will need one.
>
> You could set it to x, then run the first server, then set it to to x+1, and 
> run the second server.  That's how I set it up for local testing.
>
> Marcos
>
> Sent from my iPhone
>
> On Oct 27, 2012, at 23:20, Tom <tommed...@gmail.com> wrote:
>
>> I would like to test my kafka cluster on a single machine for testing 
>> purposes.
>>
>> As such I have created 3 config files, server.properties,
>> server2.properties and server3.properties. Each server config file has
>> a port that is one higher than the previous one (8182, 8183, 8184).
>>
>> To set JMX's port I am using the following to run the server:
>>
>>    env JMX_PORT=10000 && bin/kafka-server-start.sh config/server2.properties
>>
>> This results in the following output:
>>
>> https://gist.github.com/3967703
>>
>> As you can see, after some initialization, it throws a:
>>
>> Error: Exception thrown by the agent :
>> java.rmi.server.ExportException: Port already in use: 9999; nested
>> exception is:
>>    java.net.BindException: Address already in use
>>
>> Regards,
>> Tom

Reply via email to