# Not able to connect kibana to remote instance

**URL:** <https://discuss.elastic.co/t/not-able-to-connect-kibana-to-remote-instance/287859>\
**Category:** Kibana\
**Created:** [October 27, 2021, 11:16pm UTC](https://discuss.elastic.co/t/not-able-to-connect-kibana-to-remote-instance/287859 "2021-10-27T23:16:55Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![Tingda\_Du](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/tingda_du/32/96433_2.png) [@Tingda\_Du](https://discuss.elastic.co/u/Tingda_Du)\
**Post date:** [October 27, 2021, 11:16pm UTC](https://discuss.elastic.co/t/not-able-to-connect-kibana-to-remote-instance/287859/1 "2021-10-27T23:16:55Z")

</div>

Got this error not sure why.

```auto
kibana_1 | {"type":"log","@timestamp":"2021-10-27T22:59:48Z","tags":["info","plugins-system"],"pid":8,"message":"Setting up [2] plugins: [inspector,data]"}
kibana_1 | {"type":"log","@timestamp":"2021-10-27T22:59:48Z","tags":["info","plugins","data"],"pid":8,"message":"Setting up plugin"}
kibana_1 | {"type":"log","@timestamp":"2021-10-27T22:59:48Z","tags":["info","plugins-system"],"pid":8,"message":"Starting [1] plugins: [data]"}
kibana_1 | {"type":"log","@timestamp":"2021-10-27T22:59:52Z","tags":["status","plugin:apm_oss@7.4.0","info"],"pid":8,"state":"green","message":"Status changed from uninitialized to green - Ready","prevState":"uninitialized","prevMsg":"uninitialized"}
kibana_1 | {"type":"log","@timestamp":"2021-10-27T22:59:53Z","tags":["status","plugin:kibana@7.4.0","info"],"pid":8,"state":"green","message":"Status changed from uninitialized to green - Ready","prevState":"uninitialized","prevMsg":"uninitialized"}
kibana_1 | {"type":"log","@timestamp":"2021-10-27T22:59:53Z","tags":["status","plugin:elasticsearch@7.4.0","info"],"pid":8,"state":"yellow","message":"Status changed from uninitialized to yellow - Waiting for Elasticsearch","prevState":"uninitialized","prevMsg":"uninitialized"}
kibana_1 | {"type":"log","@timestamp":"2021-10-27T22:59:53Z","tags":["status","plugin:console@7.4.0","info"],"pid":8,"state":"green","message":"Status changed from uninitialized to green - Ready","prevState":"uninitialized","prevMsg":"uninitialized"}
kibana_1 | {"type":"log","@timestamp":"2021-10-27T22:59:53Z","tags":["status","plugin:data@7.4.0","info"],"pid":8,"state":"green","message":"Status changed from uninitialized to green - Ready","prevState":"uninitialized","prevMsg":"uninitialized"}
kibana_1 | {"type":"log","@timestamp":"2021-10-27T22:59:53Z","tags":["status","plugin:interpreter@7.4.0","info"],"pid":8,"state":"green","message":"Status changed from uninitialized to green - Ready","prevState":"uninitialized","prevMsg":"uninitialized"}
kibana_1 | {"type":"log","@timestamp":"2021-10-27T22:59:53Z","tags":["status","plugin:kibana_react@7.4.0","info"],"pid":8,"state":"green","message":"Status changed from uninitialized to green - Ready","prevState":"uninitialized","prevMsg":"uninitialized"}
kibana_1 | {"type":"log","@timestamp":"2021-10-27T22:59:53Z","tags":["status","plugin:visualizations@7.4.0","info"],"pid":8,"state":"green","message":"Status changed from uninitialized to green - Ready","prevState":"uninitialized","prevMsg":"uninitialized"}
kibana_1 | {"type":"log","@timestamp":"2021-10-27T22:59:53Z","tags":["status","plugin:region_map@7.4.0","info"],"pid":8,"state":"green","message":"Status changed from uninitialized to green - Ready","prevState":"uninitialized","prevMsg":"uninitialized"}
kibana_1 | {"type":"log","@timestamp":"2021-10-27T22:59:53Z","tags":["status","plugin:metrics@7.4.0","info"],"pid":8,"state":"green","message":"Status changed from uninitialized to green - Ready","prevState":"uninitialized","prevMsg":"uninitialized"}
kibana_1 | {"type":"log","@timestamp":"2021-10-27T22:59:53Z","tags":["status","plugin:tile_map@7.4.0","info"],"pid":8,"state":"green","message":"Status changed from uninitialized to green - Ready","prevState":"uninitialized","prevMsg":"uninitialized"}
kibana_1 | {"type":"log","@timestamp":"2021-10-27T22:59:53Z","tags":["status","plugin:timelion@7.4.0","info"],"pid":8,"state":"green","message":"Status changed from uninitialized to green - Ready","prevState":"uninitialized","prevMsg":"uninitialized"}
kibana_1 | {"type":"log","@timestamp":"2021-10-27T22:59:53Z","tags":["status","plugin:ui_metric@7.4.0","info"],"pid":8,"state":"green","message":"Status changed from uninitialized to green - Ready","prevState":"uninitialized","prevMsg":"uninitialized"}
kibana_1 | {"type":"log","@timestamp":"2021-10-27T22:59:53Z","tags":["status","plugin:markdown_vis@7.4.0","info"],"pid":8,"state":"green","message":"Status changed from uninitialized to green - Ready","prevState":"uninitialized","prevMsg":"uninitialized"}
kibana_1 | {"type":"log","@timestamp":"2021-10-27T22:59:53Z","tags":["status","plugin:table_vis@7.4.0","info"],"pid":8,"state":"green","message":"Status changed from uninitialized to green - Ready","prevState":"uninitialized","prevMsg":"uninitialized"}
kibana_1 | {"type":"log","@timestamp":"2021-10-27T22:59:53Z","tags":["status","plugin:tagcloud@7.4.0","info"],"pid":8,"state":"green","message":"Status changed from uninitialized to green - Ready","prevState":"uninitialized","prevMsg":"uninitialized"}
kibana_1 | {"type":"log","@timestamp":"2021-10-27T22:59:53Z","tags":["status","plugin:metric_vis@7.4.0","info"],"pid":8,"state":"green","message":"Status changed from uninitialized to green - Ready","prevState":"uninitialized","prevMsg":"uninitialized"}
kibana_1 | {"type":"log","@timestamp":"2021-10-27T22:59:53Z","tags":["status","plugin:vega@7.4.0","info"],"pid":8,"state":"green","message":"Status changed from uninitialized to green - Ready","prevState":"uninitialized","prevMsg":"uninitialized"}
kibana_1 | {"type":"log","@timestamp":"2021-10-27T22:59:53Z","tags":["error","elasticsearch","admin"],"pid":8,"message":"Request error, retrying\nGET http://elasticsearch:9200/_nodes?filter_path=nodes.*.version%2Cnodes.*.http.publish_address%2Cnodes.*.ip => getaddrinfo ENOTFOUND elasticsearch elasticsearch:9200"}
kibana_1 | {"type":"log","@timestamp":"2021-10-27T22:59:53Z","tags":["warning","elasticsearch","admin"],"pid":8,"message":"Unable to revive connection: http://elasticsearch:9200/"}
kibana_1 | {"type":"log","@timestamp":"2021-10-27T22:59:53Z","tags":["warning","elasticsearch","admin"],"pid":8,"message":"No living connections"}
kibana_1 | {"type":"log","@timestamp":"2021-10-27T22:59:53Z","tags":["status","plugin:elasticsearch@7.4.0","error"],"pid":8,"state":"red","message":"Status changed from yellow to red - No Living connections","prevState":"yellow","prevMsg":"Waiting for Elasticsearch"}
kibana_1 | {"type":"log","@timestamp":"2021-10-27T22:59:55Z","tags":["warning","elasticsearch","admin"],"pid":8,"message":"Unable to revive connection: http://elasticsearch:9200/"}
kibana_1 | {"type":"log","@timestamp":"2021-10-27T22:59:55Z","tags":["warning","elasticsearch","admin"],"pid":8,"message":"No living connections"}
kibana_1 | {"type":"log","@timestamp":"2021-10-27T22:59:58Z","tags":["warning","elasticsearch","admin"],"pid":8,"message":"Unable to revive connection: http://elasticsearch:9200/"}
kibana_1 | {"type":"log","@timestamp":"2021-10-27T22:59:58Z","tags":["warning","elasticsearch","admin"],"pid":8,"message":"No living connections"}
kibana_1 | {"type":"log","@timestamp":"2021-10-27T23:00:00Z","tags":["warning","elasticsearch","admin"],"pid":8,"message":"Unable to revive connection: http://elasticsearch:9200/"}
kibana_1 | {"type":"log","@timestamp":"2021-10-27T23:00:00Z","tags":["warning","elasticsearch","admin"],"pid":8,"message":"No living connections"}

```

Try to connect to remote es cluster node on local Kibana, have kibana.yml config inside our internal pipeline but cannot connect to our internal staging cluster nodes, we can connect kibana through link and username and password with certification. Note that in docker-compose we do not have elastic setup since we are connecting to a **remote** cluster not a local one so any resources online suggesting using localhost and setup everything will not work.

```auto

server.name:

server.host: "0"

logging.root.level: error

elasticsearch.hosts: ["our url"]

elasticsearch.username:

elasticsearch.password: 

elasticsearch.ssl.certificateAuthorities: ./certs/elastic/xxx.pem

elasticsearch.ssl.certificate: ./certs/elastic/xxx.key

elasticsearch.ssl.key: ./certs/elastic/xxx.crt

elasticsearch.ssl.alwaysPresentCertificate: true

```

I have completely zero knowledge on what is an elastic and kibana, please provide exact detail on how to solve this.

---

<div class="post-metadata">

**Author:** ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)\
**Post date:** [October 27, 2021, 11:22pm UTC](https://discuss.elastic.co/t/not-able-to-connect-kibana-to-remote-instance/287859/2 "2021-10-27T23:22:35Z")

</div>

Welcome to our community! 😃

Can you share your Kibana config file?

---

<div class="post-metadata">

**Author:** ![Tingda\_Du](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/tingda_du/32/96433_2.png) [@Tingda\_Du](https://discuss.elastic.co/u/Tingda_Du)\
**Post date:** [October 27, 2021, 11:31pm UTC](https://discuss.elastic.co/t/not-able-to-connect-kibana-to-remote-instance/287859/4 "2021-10-27T23:31:54Z")

</div>

updated please check.

---

<div class="post-metadata">

**Author:** ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)\
**Post date:** [October 27, 2021, 11:41pm UTC](https://discuss.elastic.co/t/not-able-to-connect-kibana-to-remote-instance/287859/5 "2021-10-27T23:41:00Z")

</div>

> [@Tingda\_Du](#):
>
> ```auto
> elasticsearch.hosts: ["our url"]
> 
> ```

I think that's the issue, because your log shows;

> [@Tingda\_Du](#):
>
> `Unable to revive connection: http://elasticsearch:9200/`

Is that the correct URL to Elasticsearch? Is that what's in your config?

---

<div class="post-metadata">

**Author:** ![Tingda\_Du](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/tingda_du/32/96433_2.png) [@Tingda\_Du](https://discuss.elastic.co/u/Tingda_Du)\
**Post date:** [October 27, 2021, 11:45pm UTC](https://discuss.elastic.co/t/not-able-to-connect-kibana-to-remote-instance/287859/6 "2021-10-27T23:45:42Z")

</div>

I'm running using docker and my docker compose component is like

```auto
kibana:
   build:
      dockerfile: Dockerfile.kibana-ui
      context: .
    ports:
      - 5601:5601
   env_file:
      - ./kibana-staged.yml 

```

I can make sure that url return a valid response and the only thing is that I'm not sure whether should I adding node in the cluster url.

---

<div class="post-metadata">

**Author:** ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)\
**Post date:** [October 27, 2021, 11:46pm UTC](https://discuss.elastic.co/t/not-able-to-connect-kibana-to-remote-instance/287859/7 "2021-10-27T23:46:52Z")

</div>

It might be worth sharing your compose file please.

---

<div class="post-metadata">

**Author:** ![Tingda\_Du](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/tingda_du/32/96433_2.png) [@Tingda\_Du](https://discuss.elastic.co/u/Tingda_Du)\
**Post date:** [October 28, 2021, 12:07am UTC](https://discuss.elastic.co/t/not-able-to-connect-kibana-to-remote-instance/287859/9 "2021-10-28T00:07:07Z")

</div>

This is my docker-compose file

---

<div class="post-metadata">

**Author:** ![Tingda\_Du](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/tingda_du/32/96433_2.png) [@Tingda\_Du](https://discuss.elastic.co/u/Tingda_Du)\
**Post date:** [October 29, 2021, 8:16pm UTC](https://discuss.elastic.co/t/not-able-to-connect-kibana-to-remote-instance/287859/10 "2021-10-29T20:16:35Z")

</div>

So my question is that if I want to use the kibana.yml and test it locally how should I include in my dockerfile, do I have to put it like

```auto
environment:
      SERVER_NAME: "spark-repo_kibana"
      SERVER_HOST: '"0"'
      ELASTICSEARCH_HOSTS: 
      ELASTICSEARCH_USERNAME:
      ELASTICSEARCH_PASSWORD: 

```

this, can I not include it by using the yaml file only?

---

<div class="post-metadata">

**Author:** ![Tingda\_Du](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/tingda_du/32/96433_2.png) [@Tingda\_Du](https://discuss.elastic.co/u/Tingda_Du)\
**Post date:** [October 29, 2021, 11:36pm UTC](https://discuss.elastic.co/t/not-able-to-connect-kibana-to-remote-instance/287859/11 "2021-10-29T23:36:56Z")

</div>

I was not sure files like `kibana.yml` and `elasticsearch.yml`, how can we corresponding it with the one in docker-compose?

---

<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 26, 2021, 11:37pm UTC](https://discuss.elastic.co/t/not-able-to-connect-kibana-to-remote-instance/287859/12 "2021-11-26T23:37:06Z")

</div>

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