简体   繁体   English

带有 Azure 事件中心 Kafaka 端点的 Flink 有状态函数的超时问题

[英]Timeout issue with Flink Stateful Functions with Azure Event Hub Kafaka endpoint

Problem:问题:

Flink task manager reports: apache.kafka.common.errors.TimeoutException: Timeout expired while fetching topic metadata Flink 任务管理器报告: apache.kafka.common.errors.TimeoutException: Timeout expired while fetching topic metadata

Deployment overview:部署概览:

  • A Java project to try out Stateful Functions.The streaming app reads messages from Kafka, processes messages and sends the final result to kafka egress.一个 Java 项目,用于试用 Stateful Functions。流式应用程序从 Kafka 读取消息,处理消息并将最终结果发送到 kafka egress。
  • Deployed on Azure:部署在 Azure 上:
  • Azure Event Hub (Kafka Endpoint) as ingress and egress Azure 事件中心(Kafka 端点)作为入口和出口
  • Azure Kube.netes Service as k8s deployment Azure Kube.netes 服务作为 k8s 部署
  • Azure Data Lake Gen 2 as storage for checkpoint Azure Data Lake Gen 2 作为检查点的存储

Deployment is good, job manager and task manager has been launched, then I see task failed to run due to the exception部署好了,job manager和task manager已经启动,然后我看到task failed to run due to the exception

Diagnostics:诊断:

  1. I created a simple Java consumer with the identical kafka config, just with a different consumer group.我创建了一个简单的 Java 消费者,它具有相同的 kafka 配置,只是消费者组不同。 The Java app works well both on my laptop and in AKS (deployed in the same namespace as the stateful function app is) So I get a conclusion that the Event Hub and my kafka config are both good. Java 应用程序在我的笔记本电脑和 AKS 中运行良好(部署在与有状态 function 应用程序相同的命名空间中)所以我得出的结论是事件中心和我的 kafka 配置都很好。
  2. I checked the task manager log (kubectl logs xxx), and the kafka properties have been correctly loaded.我检查了任务管理器日志(kubectl logs xxx),kafka 属性已经正确加载。 The sasl.jaas.config shows as "sasl.jaas.config = [hidden]" but I assume this is by design. sasl.jaas.config 显示为"sasl.jaas.config = [hidden]" ,但我认为这是设计使然。

My Kafka Settings:我的卡夫卡设置:

I'm using the following config:我正在使用以下配置:

kind: io.statefun.kafka.v1/ingress
spec:
  id: io.streaming/eventhub-ingress
  address: xxxx.servicebus.windows.net:9093
  consumerGroupId: group-receiver-00
  startupPosition:
    type: group-offsets
  topics:
    - topic: streaming-topic-rec-32
      valueType: streaming.types/rec
      targets:
        - streaming.fns/bronze_rec
    - topic: streaming-topic-eng-32
      valueType: streaming.types/eng
      targets:
        - streaming.fns/bronze_eng
  properties:
    - request.timeout.ms: 60000
    - security.protocol: SASL_SSL
    - sasl.mechanism: PLAIN
    - sasl.jaas.config: org.apache.kafka.common.security.plain.PlainLoginModule required username="$ConnectionString" password="primary connection string of the event hub ns";

Can anyone help me with this?谁能帮我这个? Thank you!谢谢!

Resolved after reducing replicas of task manager.减少任务管理器的副本后解决。 No config changed没有更改配置

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM