# Elastic Connector cannot talk to ElasticSearch at 9200

**URL:** <https://discuss.elastic.co/t/elastic-connector-cannot-talk-to-elasticsearch-at-9200/368430>\
**Category:** Elastic Search\
**Tags:** docker, connectors\
**Created:** [October 8, 2024, 10:14am UTC](https://discuss.elastic.co/t/elastic-connector-cannot-talk-to-elasticsearch-at-9200/368430 "2024-10-08T10:14:53Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![sami-obvio](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/sami-obvio/32/138170_2.png) [@sami-obvio](https://discuss.elastic.co/u/sami-obvio)\
**Post date:** [October 8, 2024, 10:14am UTC](https://discuss.elastic.co/t/elastic-connector-cannot-talk-to-elasticsearch-at-9200/368430/1 "2024-10-08T10:14:53Z")

</div>

I have an Elastic node running on http **s** ://localhost:9200 using Docker (using the tutorial on elastic's website here: [Install Elasticsearch with Docker | Elasticsearch Guide [8.15] | Elastic](https://www.elastic.co/guide/en/elasticsearch/reference/current/docker.html))

I can curl to it using a ca\_cert and it works fine

```auto
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...

```auto
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"

```

 ![Screenshot 2024-10-08 at 1.52.07 PM](https://us1.discourse-cdn.com/elastic/original/3X/b/a/ba1ca8c2fbda4b2f58d6a117d7812a70a6373ce0.png)

But when I run (as per the recommendation in the configurator):

```auto

 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:

```auto

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

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [October 8, 2024, 10:29am UTC](https://discuss.elastic.co/t/elastic-connector-cannot-talk-to-elasticsearch-at-9200/368430/2 "2024-10-08T10:29:02Z")

</div>

May be you need to use a docker network for both docker instances and use then something like [https://es01:9200](https://es01:9200) ?

How did you start Kibana actually?

---

<div class="post-metadata">

**Author:** ![sami-obvio](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/sami-obvio/32/138170_2.png) [@sami-obvio](https://discuss.elastic.co/u/sami-obvio)\
**Post date:** [October 8, 2024, 10:48am UTC](https://discuss.elastic.co/t/elastic-connector-cannot-talk-to-elasticsearch-at-9200/368430/3 "2024-10-08T10:48:18Z")

</div>

changing my answer since it's irrelevant - thanks David, that did solve the problem - i used `https://es01:9200` in the config.yml file

---

<div class="post-metadata">

**Author:** ![Jedr\_Blaszyk](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jedr_blaszyk/32/127637_2.png) [@Jedr\_Blaszyk](https://discuss.elastic.co/u/Jedr_Blaszyk)\
**Post date:** [October 9, 2024, 9:00am UTC](https://discuss.elastic.co/t/elastic-connector-cannot-talk-to-elasticsearch-at-9200/368430/4 "2024-10-09T09:00:00Z")

</div>

From #Beats to #Elastic Search

---

<div class="post-metadata">

**Author:** ![Jedr\_Blaszyk](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jedr_blaszyk/32/127637_2.png) [@Jedr\_Blaszyk](https://discuss.elastic.co/u/Jedr_Blaszyk)\
**Post date:** [October 9, 2024, 9:00am UTC](https://discuss.elastic.co/t/elastic-connector-cannot-talk-to-elasticsearch-at-9200/368430/5 "2024-10-09T09:00:00Z")

</div>

Added #connectors and removed #fleet

---

<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:** [November 6, 2024, 9:00am UTC](https://discuss.elastic.co/t/elastic-connector-cannot-talk-to-elasticsearch-at-9200/368430/6 "2024-11-06T09:00:33Z")

</div>

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