I have an Elastic node running on https://localhost:9200 using Docker (using the tutorial on elastic's website here: Install Elasticsearch with Docker | Elasticsearch Guide [8.15] | Elastic)
I can curl to it using a ca_cert and it works fine
curl --cacert http_ca.crt -u elastic:$ELASTIC_PASSWORD https://localhost:9200
{
"name" : "02f43e1daca5",
"cluster_name" : "docker-cluster",
"cluster_uuid" : "bN138Gk1QUmX16GKSqWZWA",
"version" : {
"number" : "8.15.2",
"build_flavor" : "default",
"build_type" : "docker",
"build_hash" : "98adf7bf6bb69b66ab95b761c9e5aadb0bb059a3",
"build_date" : "2024-09-19T10:06:03.564235954Z",
"build_snapshot" : false,
"lucene_version" : "9.11.1",
"minimum_wire_compatibility_version" : "7.17.0",
"minimum_index_compatibility_version" : "7.0.0"
},
"tagline" : "You Know, for Search"
I also have Kibana running in a container
I want to use an S3 connector to be able to connect to Elastic - I used the agent to create the config.yml as suggested...
connectors:
-
connector_id: "B_34apIBULpfHZa-V4rr"
service_type: "s3"
api_key: "api key generated by the configuration feature"
elasticsearch:
host: "https://localhost:9200"
api_key: "api key generated by the configuration feature"
But when I run (as per the recommendation in the configurator):
docker run \
-v "/Users/sami/elastic-stuff/connectors/config.yml:/config/config.yml" \
--tty \
--rm \
docker.elastic.co/enterprise-search/elastic-connectors:8.15.0.0 \
/app/bin/elastic-ingest \
-c /config/config.yml
I get this error:
[FMWK][08:55:05][INFO] Running preflight checks
[FMWK][08:55:05][INFO] Waiting for Elasticsearch at http://localhost:9200 (so far: 0 secs)
[FMWK][08:55:05][ERROR] Could not connect to the Elasticsearch server
[FMWK][08:55:05][ERROR] Cannot connect to host localhost:9200 ssl:default [Connect call failed ('127.0.0.1', 9200)]
Elasticsearch IS running on https and not http, so I am using that but changing to http, as the configuration suggests doesn't help either
Someone suggested to add to elasticsearch.yml
the line network.host: 0.0.0.0
but if this is working for curl, it should work here too, I think...