title: Enabling TLS in Elasticsearch
body: <p>I'm having problems enabling TLS in Elasticsearch 7.1.1 running on Windows 7.</p>
  
  <p>I have a single node with certificates created as</p>
  
  <pre><code>elasticsearch-certutil ca
  elasticsearch-certutil cert --ca elastic-stack-ca.p12
  </code></pre>
  
  <p>The elasticsearch.yml file has the following settings</p>
  
  <pre><code>node.name: node1
  discovery.type:  single-node
  xpack.security.enabled: true
  xpack.security.transport.ssl.verification_mode: certificate 
  xpack.security.transport.ssl.keystore.path: 'C:\elasticsearch-7.1.1\config\certs\elastic-certificates.p12'
  xpack.security.transport.ssl.truststore.path: 'C:\elasticsearch-7.1.1\config\certs\elastic-certificates.p12'
  </code></pre>
  
  <p>This works fine but when I add the below</p>
  
  <pre><code>xpack.security.http.ssl.enabled: true
  xpack.security.http.ssl.keystore.path: 'C:\elasticsearch-7.1.1\config\certs\elastic-certificates.p12'
  xpack.security.http.ssl.truststore.path: 'C:\elasticsearch-7.1.1\config\certs\elastic-certificates.p12'
  </code></pre>
  
  <p>and start up elasticsearch I see the following error</p>
  
  <blockquote>
    <p>[2019-06-25T07:34:19,659][WARN ][o.e.h.AbstractHttpServerTransport]
    [node1] caught exception while handling client http traffic, closing
    connection Netty4HttpChannel{localAddress=0.0.0.0/0.0.0.0:9200,
    remoteAddress=/127.0.0.1:6757}
    io.netty.handler.codec.DecoderException:
    io.netty.handler.ssl.NotSslRecordException: not an SSL/TLS record:</p>
  </blockquote>
  
  <p>This is repeated every 10-15 seconds.</p>
  
  <p>https is enabled though and I can access the node using <code>https://localhost:9200</code></p>
  
  <p>I don't know why I receive the above error though as nothing else is running and accessing elasticsearch.</p>
  
  <p>Any help would be much appreciated.</p>
  
  <p>Thanks heaps</p>