Hi Evgeny, In your configuration file the *advertised.listeners* property is set to the new port number. For Kafka you need to set the *listeners* property to listen on the port number. The *advertised.listeners* property is used to specify another name/port number in case you use routing services or other hostnames to connect from other networks.
If you comment out the *advertised.listeners* and use *listeners* instead with the new port number it should work. Kind regards, Richard Bosch On Mon, May 30, 2022 at 5:01 PM Ivanov, Evgeny <evgeny.iva...@vtbcapital.ru> wrote: > Hi! > > Could you please advise why I can't run Kafka broker with different port > number ? > It's working fine with default port 9092, but when I change it to 9093 or > 9094 for instance, I get the following errors: > > [2022-05-30 13:16:28,456] DEBUG [BrokerToControllerChannelManager > broker=432 name=forwarding]: Controller isn't cached, looking for local > metadata changes (kafka.server.BrokerToControllerRequestThread) > [2022-05-30 13:16:28,456] DEBUG [BrokerToControllerChannelManager > broker=432 name=forwarding]: No controller defined in metadata cache, > retrying after backoff (kafka.server.BrokerToControllerRequestThread) > [2022-05-30 13:16:28,457] INFO > [/kafka-acl-extended-changes-event-process-thread]: Starting > (kafka.common.ZkNodeChangeNotificationListener$ChangeEventProcessThread) > [2022-05-30 13:16:28,469] INFO [Controller id=432, targetBrokerId=432] > Node 432 disconnected. (org.apache.kafka.clients.NetworkClient) > [2022-05-30 13:16:28,471] WARN [Controller id=432, targetBrokerId=432] > Connection to node 432 (localhost/127.0.0.1:9094) could not be > established. Broker may not be available. > (org.apache.kafka.clients.NetworkClient) > [2022-05-30 13:16:28,472] INFO [Controller id=432, targetBrokerId=432] > Client requested connection close from node 432 > (org.apache.kafka.clients.NetworkClient) > > server.properties: > > broker.id=432 > > ############################# Socket Server Settings > ############################# > > # The address the socket server listens on. It will get the value returned > from > # java.net.InetAddress.getCanonicalHostName() if not configured. > # FORMAT: > # listeners = PLAINTEXT://localhost:9092 > # EXAMPLE: > # listeners = PLAINTEXT://your.host.name:9092 > #listeners=PLAINTEXT://:9092 > > # Hostname and port the broker will advertise to producers and consumers. > If not set, > # it uses the value for "listeners" if configured. Otherwise, it will use > the value > # returned from java.net.InetAddress.getCanonicalHostName(). > > advertised.listeners=PLAINTEXT://localhost:9094 > > controller.log: > > [2022-05-30 13:00:00,734] WARN [RequestSendThread controllerId=432] > Controller 432's connection to broker localhost:9094 (id: 432 rack: null) > was unsuccessful (kafka.controller.RequestSendThread) > java.io.IOException: Connection to localhost:9094 (id: 432 rack: null) > failed. > at > org.apache.kafka.clients.NetworkClientUtils.awaitReady(NetworkClientUtils.java:70) > at > kafka.controller.RequestSendThread.brokerReady(ControllerChannelManager.scala:291) > at > kafka.controller.RequestSendThread.doWork(ControllerChannelManager.scala:245) > at kafka.utils.ShutdownableThread.run(ShutdownableThread.scala:96) > > Best regards, > Evgeny > > Business Application Support > VTB Capital > Telephone.: +7 (495) 960 9999 (ext.264423) > Mobile: +7 (916) 091-8939 > > > ________________________________ > > This email message (and any attachments) is confidential and may be > privileged or otherwise protected from disclosure by applicable law. If you > are not the intended recipient or have received this in error please notify > the system manager, postmas...@vtbcapital.ru and remove this message and > any attachments from your system. Any unauthorized dissemination, copying > or other use of this message and/or any attachments is strictly prohibited > and may constitute a breach of civil or criminal law. > JSC VTB Capital may monitor email traffic data and also the content of > email. >