Now I changed the test producer call like this.
C:\development\kafka\kafka_2.11-0.10.0.0\kafka_2.11-0.10.0.0\bin\windows>.\kafka-console-producer.bat
 --broker-list localhost:8393 --topic test --prod
ucer.config ..\..\config\producer.properties

and updated producer.properties like this
security.protocol=SSL
ssl.truststore.location=C:/test.jks
ssl.truststore.password=test

Now I see this error message.
C:\development\kafka\kafka_2.11-0.10.0.0\kafka_2.11-0.10.0.0\bin\windows>.\kafka-console-producer.bat
 --broker-list localhost:8393 --topic test --prod
ucer.config ..\..\config\producer.properties
[2016-06-21 10:23:34,738] WARN The configuration metadata.broker.list = 
localhost:8393 was supplied but isn't a known config. (org.apache.kafka.client
s.producer.ProducerConfig)
aaaa
[2016-06-21 10:23:55,180] WARN Failed to send SSL Close message  
(org.apache.kafka.common.network.SslTransportLayer)
java.io.IOException: An established connection was aborted by the software in 
your host machine
        at sun.nio.ch.SocketDispatcher.write0(Native Method)
        at sun.nio.ch.SocketDispatcher.write(SocketDispatcher.java:51)
        at sun.nio.ch.IOUtil.writeFromNativeBuffer(IOUtil.java:89)
        at sun.nio.ch.IOUtil.write(IOUtil.java:60)
        at sun.nio.ch.SocketChannelImpl.write(SocketChannelImpl.java:450)
        at 
org.apache.kafka.common.network.SslTransportLayer.flush(SslTransportLayer.java:195)
        at 
org.apache.kafka.common.network.SslTransportLayer.close(SslTransportLayer.java:163)
        at org.apache.kafka.common.utils.Utils.closeAll(Utils.java:690)
        at 
org.apache.kafka.common.network.KafkaChannel.close(KafkaChannel.java:47)
        at org.apache.kafka.common.network.Selector.close(Selector.java:471)
        at 
org.apache.kafka.common.network.Selector.pollSelectionKeys(Selector.java:348)
        at org.apache.kafka.common.network.Selector.poll(Selector.java:283)
        at org.apache.kafka.clients.NetworkClient.poll(NetworkClient.java:260)
        at 
org.apache.kafka.clients.producer.internals.Sender.run(Sender.java:229)
        at 
org.apache.kafka.clients.producer.internals.Sender.run(Sender.java:134)

Please let me know what I am missing.

Thanks
Subhash Agrawal.

From: Subhash Agrawal
Sent: Monday, June 20, 2016 4:20 PM
To: dev@kafka.apache.org; 'us...@kafka.apache.org'
Subject: Error while sending message to Kafka broker on SSL with Kafka 0.10.0.0

Hi All,
I am seeing error while sending message via test producer on SSL port. I am 
able to successfully send message to non-SSL port.

Here is my broker configuration.

listeners=SSL://:9093
security.inter.broker.protocol=SSL
ssl.client.auth=required
ssl.keystore.location=C:/test.jks
ssl.keystore.password=test
ssl.key.password=test
ssl.truststore.location= C:/test.jks
ssl.truststore.password=test

and I see no error while starting up kafka server as per its console output.

 [2016-06-20 15:59:32,627] INFO Registered broker 0 at path /brokers/ids/0 with 
addresses: SSL -> EndPoint(SAGRAWAL-PC.opentext.net,9093,SSL) (kafka.ut
ils.ZkUtils)
[2016-06-20 15:59:32,635] INFO Kafka version : 0.10.0.0 
(org.apache.kafka.common.utils.AppInfoParser)
[2016-06-20 15:59:32,636] INFO Kafka commitId : b8642491e78c5a13 
(org.apache.kafka.common.utils.AppInfoParser)
[2016-06-20 15:59:32,637] INFO [Kafka Server 0], started 
(kafka.server.KafkaServer)

C:\development\kafka\kafka_2.11-0.10.0.0\kafka_2.11-0.10.0.0\bin\windows>.\kafka-topics.bat
 --create --zookeeper localhost:2181 --replication-factor 1
 --partitions 1 --topic test
Created topic "test".

When I want to send message using test producer on SSL port, I keep on seeing 
this warning message.

C:\development\kafka\kafka_2.11-0.10.0.0\kafka_2.11-0.10.0.0\bin\windows>.\kafka-console-producer.bat
 --broker-list localhost:9093 --topic test
aaa
[2016-06-20 16:13:38,565] WARN Bootstrap broker localhost:9093 disconnected 
(org.apache.kafka.clients.NetworkClient)
[2016-06-20 16:13:38,781] WARN Bootstrap broker localhost:9093 disconnected 
(org.apache.kafka.clients.NetworkClient)
[2016-06-20 16:13:39,010] WARN Bootstrap broker localhost:9093 disconnected 
(org.apache.kafka.clients.NetworkClient)
Terminate batch job (Y/N)? y

Any idea what should I  look into?

Thanks
Subhash Agrawal

Reply via email to