1、外网通过ssl访问内网kafka可以连接,但是发送数据会报超时的错误,但是内网可以正常ssl连接发送数据,是什么原因。往外可以通过9092正常访问到内网kafka;内网之间可以用9092和9093相互正常访问
2、kakfa2.5,
3、相关代码
broker.id=0
### SSL Start
listeners=PLAINTEXT://kafka-01:9092,SSL://kafka-01:9093
advertised.listeners=PLAINTEXT://kafka-01:9092,SSL://10.0.0.209:9093
ssl.keystore.location=/root/ssl/server.keystore.jks
ssl.keystore.password=kfk123456
ssl.key.password=kfk123456
ssl.truststore.location=/root/ssl/server.truststore.jks
ssl.truststore.password=kfk123456
ssl.endpoint.identification.algorithm=
ssl.client.auth=required
ssl.enabled.protocols=TLSv1.2,TLSv1.1,TLSv1
ssl.keystore.type=JKS
ssl.truststore.type=JKS
#security.inter.broker.protocol=SSL
#ssl.protocol=TLS
#ssl.endpoint.identification.algorithm=HTTPS
4、当在外网访问发送数据会卡主,然后报错
[2020-11-30 17:25:07,148] ERROR Error when sending message to topic test_02 with key: null, value: 10 bytes with error: (org.apache.kafka.clients.producer.internals.ErrorLoggingCallback)
org.apache.kafka.common.errors.TimeoutException: Topic test_02 not present in metadata after 60000 ms.