# SecurityNetty4HttpServerTransport received plaintext http traffic on an https channel

**URL:** <https://discuss.elastic.co/t/securitynetty4httpservertransport-received-plaintext-http-traffic-on-an-https-channel/309137>\
**Category:** Elasticsearch\
**Created:** [July 7, 2022, 6:11pm UTC](https://discuss.elastic.co/t/securitynetty4httpservertransport-received-plaintext-http-traffic-on-an-https-channel/309137 "2022-07-07T18:11:30Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Sameer\_Malik](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/sameer_malik/32/107824_2.png) [@Sameer\_Malik](https://discuss.elastic.co/u/Sameer_Malik)\
**Post date:** [July 7, 2022, 6:11pm UTC](https://discuss.elastic.co/t/securitynetty4httpservertransport-received-plaintext-http-traffic-on-an-https-channel/309137/1 "2022-07-07T18:11:30Z")

</div>

Hello everyone!

I'm quite new to Elasticsearch and networks.

I just managed to install elasticsearch on an external disk, and it seemed to install just fine

```auto
✅ Elasticsearch security features have been automatically configured!
✅ Authentication is enabled and cluster connections are encrypted.

ℹ️ Password for the elastic user (reset with `bin/elasticsearch-reset-password -u elastic`):
<redacted>

ℹ️ HTTP CA certificate SHA-256 fingerprint:
<redacted>

ℹ️ Configure Kibana to use this cluster:
• Run Kibana and click the configuration link in the terminal when Kibana starts.
• Copy the following enrollment token and paste it into Kibana in your browser (valid for the next 30 minutes):
<redacted>

ℹ️ Configure other nodes to join this cluster:
• On this node:
  ⁃ Create an enrollment token with `bin/elasticsearch-create-enrollment-token -s node`.
  ⁃ Uncomment the transport.host setting at the end of config/elasticsearch.yml.
  ⁃ Restart Elasticsearch.
• On other nodes:
  ⁃ Start Elasticsearch with `bin/elasticsearch --enrollment-token <token>`, using the enrollment token that you generated.

```

However, when I try to connect to the cluster in python using the requests library with the code:

```auto
r.get("http://localhost:9200/_cluster/health")

```

I get the following errors:  
In Python:

```auto
ConnectionError: ('Connection aborted.', RemoteDisconnected('Remote end closed connection without response'))

```

In the elasticsearch Terminal:

```auto
[2022-07-07T14:05:35,491][WARN][o.e.x.s.t.n.SecurityNetty4HttpServerTransport] [Sameers-MBP-210] received plaintext http traffic on an https channel, closing connection Netty4HttpChannel{localAddress=/[0:0:0:0:0:0:0:1]:9200, remoteAddress=/[0:0:0:0:0:0:0:1]:54774}

```

Every time I run the request, I get the above errors. The 54774 seems to increment by 1 everytime I run the command.

Also, when I run (using haystack for passage retrieval)

```auto
doc_store_dense = ElasticsearchDocumentStore(
    host='localhost',
    username='elastic', password='<redacted>',
    index='rockbook_dense'
)

```

I get the error

```auto
ConnectionError: Initial connection to Elasticsearch failed. Make sure you run an Elasticsearch instance at `[{'host': 'localhost', 'port': 9200}]` and that it has finished the initial ramp up (can take > 30s).

```

System: MacOS 12.3.1

Any help would be appreciated!

Many thanks,

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [August 4, 2022, 6:12pm UTC](https://discuss.elastic.co/t/securitynetty4httpservertransport-received-plaintext-http-traffic-on-an-https-channel/309137/2 "2022-08-04T18:12:15Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
