I am trying to run a second instance for Kafka Rest. Here's the properties file for the first one:
id=kafka-rest-test-server-1
schema.registry.url=http://localhost:8081,http://localhost:9081
zookeeper.connect=localhost:2181,localhost:2182,localhost:2183
bootstrap.servers=PLAINTEXT://localhost:9092,PLAINTEXT://localhost:9093,PLAINTEXT://localhost:9094
According to Confluent's docs:
The only requirement for multiple instances is that you set a unique id for each instance.
However, when I run the second instance with other id
, an exception is thrown mentioning that the address is already in use:
WARN FAILED io.confluent.rest.Application$1@41294f8: java.net.BindException: Address already in use (org.eclipse.jetty.util.component.AbstractLifeCycle:212)
java.net.BindException: Address already 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)
...