公司内网通过正向代理访问阿里云kafka,报could not be established. Broker may not be available

artomu 发表于: 2021-07-11   最后更新时间: 2021-07-12 09:29:42   1,369 游览

场景:公司内网应用通过DMZ部署的正向代理,访问阿里云kafka(公网),报:

could not be established. Broker may not be available。

配置相关:

DMZ:172.11.7.268, 172.11.7.269, 172.11.7.270

阿里云kafka:

  • 118.178.39.26
  • 114.55.131.86
  • 118.178.214.174

内网应用:10.18.123.14

相关描述

在DMZ三台机器开启正向代理(用socat):

/apps/svr/socat1.7/bin/socat TCP-LISTEN:9093,fork,reuseaddr TCP:118.178.39.26:9093

/apps/svr/socat1.7/bin/socat TCP-LISTEN:9093,fork,reuseaddr TCP:114.55.131.86:9093

/apps/svr/socat1.7/bin/socat TCP-LISTEN:9093,fork,reuseaddr TCP:118.178.214.174:9093

在内网应用配置的主机名映射如下:

172.11.7.268  mvxl59355
172.11.7.169  mvxl65938
172.11.7.170 mvxl59356
118.178.39.26 mvxl59355
118.178.214.174 mvxl65938
114.55.131.86 mvxl59356

报错信息如下:

2021-07-11 08:03:51.093][WARN][{kafka-producer-network-thread | producer-1}][TID: N/A][o.a.k.c.NetworkClient#processDisconnection 748]LINECONTENT:[Producer clientId=producer-1] Connection to node -1 (mvxl59355/118.178.39.26:9093) could not be established. Broker may not be available.

Failed to send; nested exception is org.apache.kafka.common.errors.TimeoutException: Topic it_trace_to_aliyun not present in metadata after 30000 ms

发表于 2021-07-11
添加评论

你看看这篇文章,应该对你有帮助:
https://www.orchome.com/1903

你的答案

查看kafka相关的其他问题或提一个您自己的问题