Error to Access with ssl to kafka brokers

I have a error when connect to kafka brokers the confluent console log show this error.

    [2018-03-22 11:46:03,545] WARN Failed to send SSL Close message  (org.apache.kafka.common.network.SslTransportLayer)
java.io.IOException: Broken pipe
        at sun.nio.ch.FileDispatcherImpl.write0(Native Method)
        at sun.nio.ch.SocketDispatcher.write(SocketDispatcher.java:47)
        at sun.nio.ch.IOUtil.writeFromNativeBuffer(IOUtil.java:93)
        at sun.nio.ch.IOUtil.write(IOUtil.java:65)
        at sun.nio.ch.SocketChannelImpl.write(SocketChannelImpl.java:471)
        at org.apache.kafka.common.network.SslTransportLayer.flush(SslTransportLayer.java:212)
        at org.apache.kafka.common.network.SslTransportLayer.close(SslTransportLayer.java:157)
        at org.apache.kafka.common.utils.Utils.closeAll(Utils.java:703)
        at org.apache.kafka.common.network.KafkaChannel.close(KafkaChannel.java:70)
        at org.apache.kafka.common.network.Selector.doClose(Selector.java:717)
        at org.apache.kafka.common.network.Selector.close(Selector.java:708)
        at org.apache.kafka.common.network.Selector.pollSelectionKeys(Selector.java:500)
        at org.apache.kafka.common.network.Selector.poll(Selector.java:398)
        at kafka.network.Processor.poll(SocketServer.scala:535)
        at kafka.network.Processor.run(SocketServer.scala:452)
        at java.lang.Thread.run(Thread.java:748)

My configuration on the kafka server is as follows:

listeners=PLAINTEXT://:9092,SSL://:9093

# Broker security settings
ssl.truststore.location=/home/xcode/Descargas/ssl/server.truststore.jks
ssl.truststore.password=123456
ssl.keystore.location=/home/xcode/Descargas/ssl/server.keystore.jks
ssl.keystore.password=123456
ssl.key.password=123456
ssl.client.auth=required
security.inter.broker.protocol=SSL

I have tried to perform operations using the KafkaClient of the kafka-pyton package and return the following error.

assert broker, 'Broker id %s not in current metadata' % node_id
AssertionError: Broker id None not in current metadata

Upvotes: 1

Views: 1169

Answers (1)

Problem solved, it was a question of the certificates that were being generated incorrectly, use some test certificates and that's it. These are the certificates that you use, you can see the server settings also in that repository. https://github.com/aggress/confluent-kafka-vagrant-ansible

Upvotes: 1

Related Questions