阿里云防火墙关闭,并且配置规则。不然会导致访问不到服务。

问题一: 

Caused by: java.net.UnknownHostException: iZuf68tztea6l5ccdz7wemZ: iZuf68tztea6l5ccdz7wemZ: Name or service not known

vi /etc/hosts
127.0.0.1 iZuf68tztea6l5ccdz7wemZ

iZuf68tztea6l5ccdz7wemZ 自己的主机名

问题二: 

ERROR Error when sending message to topic test with key: null, value: 3 by 

tes with error: (org.apache.kafka.clients.producer.internals.ErrorLoggingCallback) 

org.apache.kafka.common.errors.TimeoutException: Batch containing 2 record(s) expired due to timeout 

while requesting metadata from brokers for test-0

# The id of the broker. This must be set to a unique integer for each broker.
broker.id=0
port=9092
host.name=阿里云内网地址
advertised.host.name=阿里云外网映射地址