-Re: kafka 3.4.4: multiple brokers on one host (for testing purposes)
I haven't used env before. When setting environment variables for scripts, I use export. I posted the scripts I use locally below. Hope they're helpful.
$ cat kafka1.sh
$ cat kafka2.sh
On Oct 28, 2012, at 12:07 AM, Tom <[EMAIL PROTECTED]> wrote:
> 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.
> On Sun, Oct 28, 2012 at 1:02 PM, Marcos Juarez <[EMAIL PROTECTED]> 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.
>> Sent from my iPhone
>> On Oct 27, 2012, at 23:20, Tom <[EMAIL PROTECTED]> 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:
>>> 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