Critical http://10.54.120.149:9200 seems to be unreachable

I have used below steps to install and run docker images for Elasticsearch and Kibana.



@Madhu_Challapalli
Here is The Rest of your post ... as a new user you can not put multiple link in a single post

We wanted to use Client Connectors such as SQL Server / SharePoint to perform different searches / web crawling / real time indexing and data migration from SQL to Elasticsearch etc.
Connectors for Microsoft SQL & SharePoint

Self-managed connectors | Elastic Documentation
Tried both Self and Elastic managed connectors using Kibana (Failed with authentication from Kibana UI to Local host)

i tried to run 2nd code to start the container and before run the sync/refresh connector

it was failing with

Critical http://10.54.120.149:9200 seems to be unreachable

any help is greatly appreciated.

Also please do not post pictures of command line / code it is unreadable..... please post formatted text

And elastic starts on https

did you follow steps 6,7,8 on the page you linked?

Thanks Stephen.

Yes i have followed steps 6,7,8. However step 8 is throwing below error.

curl: (60) schannel: CertGetCertificateChain trust error CERT_TRUST_REVOCATION_STATUS_UNKNOWN
More details here: curl - SSL CA Certificates

curl failed to verify the legitimacy of the server and therefore could not
establish a secure connection to it. To learn more about this situation and
how to fix it, please visit the webpage mentioned above.

Your on windows I assume? Windows can be very strict on self signed cerys

Can you try localhost instead of the I

curl --cacert http_ca.crt -u elastic:$ELASTIC_PASSWORD https://localhost:9200

Can you exec into the container and try the curl from inside the container... Make sure the point to the full path of the CA cert

Hi Stephen,
Can we hop into a call ?
i can schedule a Zoom call on your convienience.

Yes i did, Its same error.

Hi @Madhu_Challapalli

Apologies, seems like perhaps you're confused a bit.

This is a public forum staffed mostly by by volunteers including people like myself that actually work for elastic but volunteer on the site in our spare time

There are no zoom calls or direct messages to address anyone's topics.

If you'd like help, you're going to have to show the actual commands you ran and the results in text not screenshots.

It's unclear to me how exactly you set up and what state you're in.

We cannot read your images from before.

So if you you want help? You need to show the exact command you ran and the outputs not just say you got an error.

It it's unusual if you're saying you're getting the same error inside the container.

I would suggest starting over with the documentation and step through each step and show us exactly where you're failing.

Sure Stephen.

i have followed below link to setup Docker compose in my local machine using single node configuration.

I have completed steps 1 to 7 successfully.

when i tried to run step 8 i.e.
curl --cacert http_ca.crt -u elastic:$ELASTIC_PASSWORD https://localhost:9200
(i have gave full path to my http_ca.crt)

error i got is
curl: (60) schannel: CertGetCertificateChain trust error CERT_TRUST_REVOCATION_STATUS_UNKNOWN
More details here: curl - SSL CA Certificates

curl failed to verify the legitimacy of the server and therefore could not
establish a secure connection to it. To learn more about this situation and
how to fix it, please visit the webpage mentioned above.

i got response from Elastic (Json) with link https://localhost:9200/
{
"name" : "",
"cluster_name" : "docker-cluster",
"cluster_uuid" : "
",
"version" : {
"number" : "9.0.0",
"build_flavor" : "default",
"build_type" : "docker",
"build_hash" : "**",
"build_date" : "2025-04-08T15:13:46.049795831Z",
"build_snapshot" : false,
"lucene_version" : "10.1.0",
"minimum_wire_compatibility_version" : "8.18.0",
"minimum_index_compatibility_version" : "8.0.0"
},
"tagline" : "You Know, for Search"
}

but not with http://localhost:9200/ (Localhost didnt find)

That is a windows curl error....

You mean you opened in a browser not clear but that is good....

Yes because elastic runs on https not on http

So I think your elasticsearch is working it is just the windows curl that is not...

So what do you want to do next .... send some data? Use Kibana?

Yes Stephen when i opened in browser i am able to get json response.

Now i am trying to setup Kibana as per below.
Run Kibana
steps 1 to 6 completed.

Configured Kibana also

i am trying to setup a MS SQL connector using Create a connector

http://localhost:5601/app/elasticsearch/content/connectors

Choose your deployment method (Run with Docker)
Create index and generate API key

Run connector service
Create configuration file
You need a configuration file with your Elasticsearch and connector details. In your terminal, run the following command to create the config.yml file:

Run container
Run the following command to start the container:
Till above completed all steps.

Failing at below step..
docker run -v "$HOME/elastic-connectors:/config" --tty --rm docker.elastic.co/integrations/elastic-connectors:9.0.0 /app/bin/elastic-ingest -c /config/config.yml

error :-
[FMWK][05:41:19][ERROR] Cannot connect to host localhost:9200 ssl:default [Connect call failed ('127.0.0.1', 9200)]
[FMWK][05:41:35][INFO] Waiting for Elasticsearch at http://localhost:9200 (so far: 31 secs)
[FMWK][05:41:35][ERROR] Could not connect to the Elasticsearch server
[FMWK][05:41:35][ERROR] Cannot connect to host localhost:9200 ssl:default [Connect call failed ('127.0.0.1', 9200)]
[FMWK][05:42:07][INFO] Waiting for Elasticsearch at http://localhost:9200 (so far: 63 secs)
[FMWK][05:42:07][ERROR] Could not connect to the Elasticsearch server
[FMWK][05:42:07][ERROR] Cannot connect to host localhost:9200 ssl:default [Connect call failed ('127.0.0.1', 9200)]
[FMWK][05:43:11][CRITICAL] http://localhost:9200 seems to be unreachable. Bye!
[FMWK][05:43:11][INFO] Bye

error when i changed http to https also in config file same error as below (Run connector service)
[FMWK][05:44:29][INFO] Waiting for Elasticsearch at https://localhost:9200 (so far: 1 secs)
[FMWK][05:44:29][ERROR] Could not connect to the Elasticsearch server
[FMWK][05:44:29][ERROR] Cannot connect to host localhost:9200 ssl:default [Connect call failed ('127.0.0.1', 9200)]
[FMWK][05:44:31][INFO] Waiting for Elasticsearch at https://localhost:9200 (so far: 3 secs)
[FMWK][05:44:31][ERROR] Could not connect to the Elasticsearch server
[FMWK][05:44:31][ERROR] Cannot connect to host localhost:9200 ssl:default [Connect call failed ('127.0.0.1', 9200)]
[FMWK][05:44:35][INFO] Waiting for Elasticsearch at https://localhost:9200 (so far: 7 secs)
[FMWK][05:44:35][ERROR] Could not connect to the Elasticsearch server
[FMWK][05:44:35][ERROR] Cannot connect to host localhost:9200 ssl:default [Connect call failed ('127.0.0.1', 9200)]
[FMWK][05:44:43][INFO] Waiting for Elasticsearch at https://localhost:9200 (so far: 15 secs)
[FMWK][05:44:43][ERROR] Could not connect to the Elasticsearch server
[FMWK][05:44:43][ERROR] Cannot connect to host localhost:9200 ssl:default [Connect call failed ('127.0.0.1', 9200)]
[FMWK][05:44:59][INFO] Waiting for Elasticsearch at https://localhost:9200 (so far: 31 secs)
[FMWK][05:44:59][ERROR] Could not connect to the Elasticsearch server
[FMWK][05:44:59][ERROR] Cannot connect to host localhost:9200 ssl:default [Connect call failed ('127.0.0.1', 9200)]

any suggestions pls

Share the connector config file.. especially the elasticsearch section

You will need to set the correct SSL settings

content of /usr/share/elasticsearch/config/elasticsearch.yml

=============================================
cluster.name: "docker-cluster"
network.host: 0.0.0.0

#----------------------- BEGIN SECURITY AUTO CONFIGURATION -----------------------
#
# The following settings, TLS certificates, and keys have been automatically      
# generated to configure Elasticsearch security features on 05-05-2025 05:29:58
#
# --------------------------------------------------------------------------------

# Enable security features
xpack.security.enabled: true

xpack.security.enrollment.enabled: true

# Enable encryption for HTTP API client connections, such as Kibana, Logstash, and Agents
xpack.security.http.ssl:
  enabled: true
  keystore.path: certs/http.p12

# Enable encryption and mutual authentication between cluster nodes
xpack.security.transport.ssl:
  enabled: true
  verification_mode: certificate
  keystore.path: certs/transport.p12
  truststore.path: certs/transport.p12
# Create a new cluster with the current node only
# Additional nodes can still join the cluster later
cluster.initial_master_nodes: ["34b60fdf31b2"]

#----------------------- END SECURITY AUTO CONFIGURATION -------------------------

Since my elastic connector is not running due to 
Cannot connect to host localhost:9200 ssl:default [Connect call failed ('127.0.0.1', 9200)]

i dont see the files under elastic connector container as it is not running
docker.elastic.co/integrations/elastic-connectors:9.0.0

Let me know if you need any other files

and below is the file i can see in my local machine but not in container
C:\Users*\elastic-connectors\config.yml

connectors:

connector_id: "pacTpJYB2tFNEycDT9s8"
service_type: "mssql"
api_key: "**=="

elasticsearch:
host: "https://localhost:9200"
api_key: "**=="

Your missing all the SSL config in the connector config

Look at the elasticsearch settings

https://raw.githubusercontent.com/elastic/connectors/main/config.yml.example

You need to set and provide the CA

elasticsearch.ssl: true

elasticsearch.ca_certs: /path/to/ca.crt

or turn off verification (not for production use)

elasticsearch.verify_certs: false

hi Stephen,

i have ran the below code blocks 

#Create configuration file 
mkdir -p "$HOME/elastic-connectors" && echo "connectors:
-
  connector_id: \"pacTpJYB2tFNEycDT9s8\"
  service_type: \"mssql\"
  api_key: \"cHFjVHBKWUIydEZORXljRFVOc1M6Mm5Ua3NZX1R4bkV1WDI1N2lTOU56Zw==\"
elasticsearch:
  host: \"https://localhost:9200\"
  ssl: false
  verify_certs: false
  ca_certs: \"/usr/share/elasticsearch/config/certs/http_ca.crt\"
  api_key: \"cHFjVHBKWUIydEZORXljRFVOc1M6Mm5Ua3NZX1R4bkV1WDI1N2lTOU56Zw==\"" > "$HOME/elastic-connectors/config.yml"
----------Ran successfully 



#Run the following command to start the container:
docker run \
-v "$HOME/elastic-connectors:/config" \
--tty \
--rm \
docker.elastic.co/integrations/elastic-connectors:9.0.0 \
/app/bin/elastic-ingest \
-c /config/config.yml
-------throwing below error ----------------
[FMWK][06:36:36][INFO] Waiting for Elasticsearch at https://localhost:9200 (so far: 7 secs)
[FMWK][06:36:36][ERROR] Could not connect to the Elasticsearch server
[FMWK][06:36:36][ERROR] Cannot connect to host localhost:9200 ssl:default [Connect call failed ('127.0.0.1', 9200)]
[FMWK][06:36:44][INFO] Waiting for Elasticsearch at https://localhost:9200 (so far: 15 secs)
[FMWK][06:36:44][ERROR] Could not connect to the Elasticsearch server
[FMWK][06:36:44][ERROR] Cannot connect to host localhost:9200 ssl:default [Connect call failed ('127.0.0.1', 9200)]
[FMWK][06:37:00][INFO] Waiting for Elasticsearch at https://localhost:9200 (so far: 31 secs)
[FMWK][06:37:00][ERROR] Could not connect to the Elasticsearch server
[FMWK][06:37:00][ERROR] Cannot connect to host localhost:9200 ssl:default [Connect call failed ('127.0.0.1', 9200)]
[FMWK][06:37:32][INFO] Waiting for Elasticsearch at https://localhost:9200 (so far: 63 secs)
[FMWK][06:37:32][ERROR] Could not connect to the Elasticsearch server
[FMWK][06:37:32][ERROR] Cannot connect to host localhost:9200 ssl:default [Connect call failed ('127.0.0.1', 9200)]


anything i am missing ??`Preformatted text`

ssl: true

Also this is a docker network issue .

When you use localhost inside a container that is localhost to the container it is not localhost of the server so this will never work

When working with Docker, "localhost" inside a container does not refer to the host machine's localhost. Instead, it refers to the container's own network interface. To access services running on the host machine from within a Docker container, one can employ several techniques:
Using host.docker.internal:
This special DNS name resolves to the host machine's internal IP address. It is available on Docker for Mac and Windows and in some Linux environments.

Do a search and learn about this ..

Try

elasticsearch:
  host: "https://host.docker.internal:9200"
Thanks Stephen it worked.
I am able to setup connector.
1 Like