# Connecting to Kafka broker

**URL:** <https://forum.inductiveautomation.com/t/connecting-to-kafka-broker/115331>\
**Category:** Ignition\
**Created:** [April 30, 2026, 10:39am UTC](https://forum.inductiveautomation.com/t/connecting-to-kafka-broker/115331 "2026-04-30T10:39:32Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![pgmo](https://avatars.discourse-cdn.com/v4/letter/p/d07c76/32.png) [@pgmo](https://forum.inductiveautomation.com/u/pgmo)\
**Post date:** [April 30, 2026, 10:39am UTC](https://forum.inductiveautomation.com/t/connecting-to-kafka-broker/115331/1 "2026-04-30T10:39:32Z")

</div>

I'm just playing with kafka event streaming. Following the "Kafka - source example" in the IU library I've tried to connect to a kafka server, but the Kafka connector appears as _faulted_.  
Next my checks:

- Kafka and Ignition 8.3 are both running as docker containers

- Both are connected to the same docker bridge network

- If I execute a bash in each container I can ping the other container

- If I run `netstat` in the Kafka container, connection to port `9092` is _established_ and the foreign address is the Ignition container

- If I run `ss -te` in the Ignition container I also see that there is an established connection to `<kafka_ip>:9092`

- If I run `nc <kafka_ip>:9092` in the Ignition container, I can establish a connection

- My kafka connection in Ignition is configured to connect to  
 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/f/9/f9a569370ded983f52336408eda31d2d873b54f2.png)  
where _kafka-broker_ is the name of the kafka container - I tried also with the kafka container IP on the docker network, but with no success

- If I run _tshark_ in the Kafka container, telegrams from/to Ignition are just

- If I use _KafkIO_ which can connect to Kafka server, requests to the server go further then that

All above said, my result is

![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/3/9/39c85ce0d4ead343b5d9134c88e7663a8bcbdb52.png)

Any suggestion on what to check further?

Thanks in advance, regards

---

<div class="post-metadata">

**Author:** ![pgmo](https://avatars.discourse-cdn.com/v4/letter/p/d07c76/32.png) [@pgmo](https://forum.inductiveautomation.com/u/pgmo)\
**Post date:** [April 30, 2026, 5:08pm UTC](https://forum.inductiveautomation.com/t/connecting-to-kafka-broker/115331/2 "2026-04-30T17:08:23Z")

</div>

For anyone intersted in this topic, I managed to connect to the dockerized Kafka broker: the problem was the listeners configuration. The right `docker run` command in my configuration is:

```python
docker run \
-p 9092:9092 \
-e KAFKA_PROCESS_ROLES="broker,controller" \
-e KAFKA_NODE_ID=1 \
-e KAFKA_CONTROLLER_QUORUM_VOTERS="1@localhost:29093" \
-e KAFKA_CONTROLLER_LISTENER_NAMES="CONTROLLER" \
-e KAFKA_LISTENERS="INTERNAL://0.0.0.0:29092,EXTERNAL://0.0.0.0:9092,CONTROLLER://0.0.0.0:29093" \
-e KAFKA_ADVERTISED_LISTENERS="INTERNAL://broker:29092,EXTERNAL://localhost:9092" \
-e KAFKA_LISTENER_SECURITY_PROTOCOL_MAP="INTERNAL:PLAINTEXT,EXTERNAL:PLAINTEXT,CONTROLLER:PLAINTEXT" \
-e KAFKA_INTER_BROKER_LISTENER_NAME="INTERNAL" \
--network net-ign \
apache/kafka:latest

```

By running the Kafka container that way, a dockerized Ignition which is attached to the same docker bridge network as Kafka (in my case`net-ign`) can connect to bootstrap-server `broker:29092`, while an external client like _KafkIO_ can connect to `localhost:9092`, where `9092`is the published port.
