title: Node-red can't connect to broker to produce messages (Kafka and Zookeeper are in docker containers)
body: <p>I'm creating an app that shows real-time data coming from IIoT.</p>
  <p>My whole app is in docker containers with Kafka and Zookeeper running without a problem, I execute node-red (in my local machine) and it connected successfully but when I tried to produce messages from IIoT in node-red it gives &quot;Connection down started queuing messages&quot;.</p>
  <p>This is my docker-compose.yml (for Kafka and Zookeeper):</p>
  <pre><code>  zookeeper:
      image: confluentinc/cp-zookeeper:latest
      ports:
        - 2181:2181
      environment:
        - ZOOKEEPER_CLIENT_PORT=2181
      volumes:
        - zookeeper_data:/var/lib/zookeeper
      networks:
        - app_backend_network
  
    kafka:
      image: confluentinc/cp-kafka:latest
      environment:
        - KAFKA_ZOOKEEPER_CONNECT=zookeeper:2181
        - KAFKA_LISTENERS=LISTENER_BOB://kafka:9092,LISTENER_FRED://127.0.0.1:29092
        - KAFKA_ADVERTISED_LISTENERS=LISTENER_BOB://kafka:9092,LISTENER_FRED://127.0.0.1:29092
        - KAFKA_LISTENER_SECURITY_PROTOCOL_MAP=LISTENER_BOB:PLAINTEXT,LISTENER_FRED:PLAINTEXT
        - KAFKA_INTER_BROKER_LISTENER_NAME=LISTENER_BOB
        - KAFKA_OFFSETS_TOPIC_REPLICATION_FACTOR=1
        - KAFKA_AUTO_CREATE_TOPICS_ENABLE=false
      ports:
        - 9092:9092
        - 29092:29092
      depends_on:
        - zookeeper
      volumes:
        - kafka_data:/var/lib/kafka
      networks:
        - app_backend_network
  </code></pre>
  <p>Host : 127.0.0.1:29092</p>
  <p><a href="https://i.stack.imgur.com/Eiweb.png" rel="nofollow noreferrer">Node-red producer error</a></p>
  <p>Host : 127.0.0.1:9092</p>
  <p><a href="https://i.stack.imgur.com/3ZQ8Z.png" rel="nofollow noreferrer">Node-red producer error</a></p>
  <p>I tried to connect &quot;TH&quot; directly to messages and I received messages with no errors the problem here is probably connecting to the broker.</p>
  <p>I forgot to mention that when I set up Kafka in my local machine without docker it worked just fine.</p>
  <p>Any help, please!</p>