Kafka Producer Error – Bootstrap Broker Disconnected

I’m encountering an issue while attempting to produce messages to a Kafka topic using the kafka-console-producer command. Despite configuring the connection details correctly, I face the following error:

[2024-05-13 13:55:31,148] WARN [Producer clientId=console-producer] Bootstrap broker kafka.confluent.svc.cluster.local:443 (id: -1 rack: null) disconnected (org.apache.kafka.clients.NetworkClient)

I followed the steps mentioned in this readme file which can be found here.

To my knowledge I followed the steps mentioned in it and created the certificates and the secrets that are necessary as mentioned in here but the I’m not being able to get the same end output as the guide.

It is said to use the kubernetes cluster domain as the domain in the kafka configuration, I’m running the kubernetes cluster on the docker desktop for mac and I used this as the domain for the kafka configuration and as well in the config of the ingress resource

confluent.svc.cluster.local

Is this the correct domain or have I used an incorrect one?

From the attempts I have done to resolve I think the issue is due to this domain configuration.
It would be a great help if somebody can shed some light on the issue I’m facing now and I’m very new kubernetes and exposing services using ingress controllers.

This is the kafka config for the host based routing

externalAccess:
        type: staticForHostBasedRouting
        staticForHostBasedRouting:
          domain: confluent.svc.cluster.local
          brokerPrefix: 
          port: 443
      tls:
        enabled: true

and the configuration of the ingress resource

apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
  name: ingress-with-sni
  annotations:
    nginx.ingress.kubernetes.io/ssl-passthrough: "true"
    nginx.ingress.kubernetes.io/ssl-redirect: "false"
    ingress.kubernetes.io/ssl-passthrough: "true"
    nginx.ingress.kubernetes.io/backend-protocol: HTTPS
spec:
  ingressClassName: nginx
  tls:
    - hosts:
        - kafka.confluent.svc.cluster.local
        - b0.confluent.svc.cluster.local
        - b1.confluent.svc.cluster.local
        - b2.confluent.svc.cluster.local
        - controlcenter.confluent.svc.cluster.local
        - ksqldb.confluent.svc.cluster.local
        - connect.confluent.svc.cluster.local
  rules:
    - host: kafka.confluent.svc.cluster.local
      http:
        paths:
          - path: /
            pathType: Prefix
            backend:
              service:
                name: kafka-bootstrap
                port: 
                  number: 9092

These are the attempts I took to resolve the issue:

  • Confirmed the availability of the kafka cluster.
  • Ensured the correctness of the bootstrap-server and the port configuration
    (not sure whether the kubernetes cluster domain I used is correct).
  • Investigated potential networking and firewall restrictions but found none.

Thank you for your help in advance

New contributor

Abdullah sanoosi is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.

Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa Dịch vụ tổ chức sự kiện 5 sao Thông tin về chúng tôi Dịch vụ sinh nhật bé trai Dịch vụ sinh nhật bé gái Sự kiện trọn gói Các tiết mục giải trí Dịch vụ bổ trợ Tiệc cưới sang trọng Dịch vụ khai trương Tư vấn tổ chức sự kiện Hình ảnh sự kiện Cập nhật tin tức Liên hệ ngay Thuê chú hề chuyên nghiệp Tiệc tất niên cho công ty Trang trí tiệc cuối năm Tiệc tất niên độc đáo Sinh nhật bé Hải Đăng Sinh nhật đáng yêu bé Khánh Vân Sinh nhật sang trọng Bích Ngân Tiệc sinh nhật bé Thanh Trang Dịch vụ ông già Noel Xiếc thú vui nhộn Biểu diễn xiếc quay đĩa Dịch vụ tổ chức tiệc uy tín Khám phá dịch vụ của chúng tôi Tiệc sinh nhật cho bé trai Trang trí tiệc cho bé gái Gói sự kiện chuyên nghiệp Chương trình giải trí hấp dẫn Dịch vụ hỗ trợ sự kiện Trang trí tiệc cưới đẹp Khởi đầu thành công với khai trương Chuyên gia tư vấn sự kiện Xem ảnh các sự kiện đẹp Tin mới về sự kiện Kết nối với đội ngũ chuyên gia Chú hề vui nhộn cho tiệc sinh nhật Ý tưởng tiệc cuối năm Tất niên độc đáo Trang trí tiệc hiện đại Tổ chức sinh nhật cho Hải Đăng Sinh nhật độc quyền Khánh Vân Phong cách tiệc Bích Ngân Trang trí tiệc bé Thanh Trang Thuê dịch vụ ông già Noel chuyên nghiệp Xem xiếc khỉ đặc sắc Xiếc quay đĩa thú vị
Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa
Thiết kế website Thiết kế website Thiết kế website Cách kháng tài khoản quảng cáo Mua bán Fanpage Facebook Dịch vụ SEO Tổ chức sinh nhật