Pushing data through python to elastic search

I'm trying to push some data that I've collected through Python into Elasticsearch but it's showing this error:- "ValueError: Can't specify the options 'http_auth' via a dictionary in 'hosts', only 'host', 'path_prefix', 'port', 'scheme', 'url_prefix', 'use_ssl' options are allowed"
Can someone help me through this!

Using python dsl, this is a working format:

client = Elasticsearch(
        ['https://somehost:9200'],
        http_auth=(user,pw),ca_certs="super.cer")

data is in es_out dictionary

index = bulk(client, es_out)

Thank You for the response. I'll try it out!!

Now, it's showing this error :elastic_transport.ConnectionTimeout: Connection timed out

Test connectivity with curl, that probably means "you can't get there"

Well, I'm new to all this, so I don't understand what you're trying to tell. Can you please state it in detail if possible?

The error looks like you can't connect to your elastic stack on port 9200. Curl is the standard test, removing all other API complications. Can you talk to your stack?

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