SecurityNetty4HttpServerTransport received plaintext http traffic on an https channel

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

✅ 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:

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

I get the following errors:
In Python:

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

In the elasticsearch Terminal:

[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)

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

I get the error

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,

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