title: Kafka on SSL not working
body: <p>I am trying to setup a Kafka broker with SSL support but when I try to put a message on the topic, it goes on Timeout. 
  Here the steps I followed:</p>
  
  <pre><code>openssl req -new -newkey rsa:4096 -days 365 -x509 -subj "/CN=Kafka-Security-CA" -keyout ca-key -out ca-cert -nodes
  
  keytool -genkey -keystore kafka.server.keystore.jks -validity 365 -storepass xxx-keypass xxx -dname "CN=kafka_broker.net" -storetype pkcs12
  
  keytool -keystore kafka.server.keystore.jks -certreq -file cert-file -storepass xxx -keypass xxx
  
  openssl x509 -req -CA ca-cert -CAkey ca-key -in cert-file -out cert-signed -days 365 -CAcreateserial -passin pass:xxx
  
  keytool -keystore kafka.server.truststore.jks -alias CARoot -import -file ca-cert -storepass xxx -keypass xxx -noprompt
  
  keytool -keystore kafka.server.keystore.jks -import -file cert-signed -storepass xxx -keypass xxx -noprompt
  
  keytool -keystore kafka.client.truststore.jks -alias CARoot -import -file ca-cert -storepass xxx -keypass xxx -noprompt
  </code></pre>
  
  <p>I know that the connection over SSL failed beacause when I do:</p>
  
  <pre><code>/kafka_2.11-1.1.0/bin/kafka-console-producer.sh --broker-list kafka_broker:9092 --topic test --producer.config client.properties
  &gt;ewqeq
  [2018-07-04 14:53:18,022] ERROR Error when sending message to topic test with key: null, value: 5 bytes with error: (org.apache.kafka.clients.producer.internals.ErrorLoggingCallback)
  org.apache.kafka.common.errors.TimeoutException: Failed to update metadata after 60000 ms.
  </code></pre>
  
  <p>where client.properties is a config file and its content is:</p>
  
  <pre><code>security.protocol=SSL
  ssl.truststore.location=./kafka.server.truststore.jks
  ssl.truststore.password=xxx
  </code></pre>
  
  <p>I tried many times but nothing is working. 
  The client where I am trying to connect is in a docker container and also is kafka. They are under the same network and the kafka hostname is kafka_broker that I supplied also to the CN during the keystore creation.</p>