# Kibana docker trying to connect to default ( ignoring env ELASTICSEARCH\_URL )

**URL:** https://discuss.elastic.co/t/kibana-docker-trying-to-connect-to-default-ignoring-env-elasticsearch-url/185469
**Category:** Kibana
**Created:** [June 12, 2019, 4:32pm UTC](https://discuss.elastic.co/t/kibana-docker-trying-to-connect-to-default-ignoring-env-elasticsearch-url/185469 "2019-06-12T16:32:00Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![Merril](https://avatars.discourse-cdn.com/v4/letter/m/a87d85/32.png) [@Merril](https://discuss.elastic.co/u/Merril)
#### Post date: [June 12, 2019, 4:32pm UTC](https://discuss.elastic.co/t/kibana-docker-trying-to-connect-to-default-ignoring-env-elasticsearch-url/185469/1 "2019-06-12T16:32:00Z")

</div>

I am desperately trying to connect a docker Kibana instance to my AWS ES. When I try to provide and environment variable in docker-compose with the elasticsearch\_url but docker defaults to the url provided with the image ( [http://elasticsearch:9200](http://elasticsearch:9200) )

I am getting this error. `{"type":"log","@timestamp":"2019-06-12T16:24:27Z","tags":["warning","elasticsearch","admin"],"pid":1,"message":"Unable to revive connection: http://elasticsearch:9200/"}`

```
version: '3'
services:
  kibana:
    image: docker.elastic.co/kibana/kibana-oss:6.7.0
    ports:
      - "5601:5601"
    volumes:
      - ./kibana.yml:/usr/share/kibana/config/kibana.yml
    environment:
        ELASTICSEARCH_URL: http://domain_name.eu-west- 
2.es.amazonaws.com:80
             KIBANA_INDEX: .kibana-5
             SERVER_PORT: 5601
```

---

<div class="post-metadata">

### Author: ![Nathan\_Reese](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/nathan_reese/32/84829_2.png) [@Nathan\_Reese](https://discuss.elastic.co/u/Nathan_Reese)
#### Post date: [June 12, 2019, 7:35pm UTC](https://discuss.elastic.co/t/kibana-docker-trying-to-connect-to-default-ignoring-env-elasticsearch-url/185469/2 "2019-06-12T19:35:14Z")

</div>

Have you followed the instructions at [https://www.elastic.co/guide/en/kibana/current/docker.html](https://www.elastic.co/guide/en/kibana/current/docker.html)? `ELASTICSEARCH_URL` is not an expected configuration. You must specify `elasticsearch.hosts` so kibana knows how to connect to elasticsearch

---

<div class="post-metadata">

### Author: ![Merril](https://avatars.discourse-cdn.com/v4/letter/m/a87d85/32.png) [@Merril](https://discuss.elastic.co/u/Merril)
#### Post date: [June 13, 2019, 8:21am UTC](https://discuss.elastic.co/t/kibana-docker-trying-to-connect-to-default-ignoring-env-elasticsearch-url/185469/3 "2019-06-13T08:21:49Z")

</div>

Hi Nathan,

It seems like ELASTICSEARCH\_HOSTS seems to attempt to connect to AWS ES. However I am facing the same issue as before with authorisation issue with AWS ES from a container. `User: anonymous is not authorized to perform: es:ESHttpPut`. Please find the full error report [here](https://github.com/MerrilCode/b2b_readme_images/blob/master/error.txt) I could not find much information on AWS documentation on how to connect an external Kibana instance. If anyone has done it before I would greatly appreciate that. I have allowed the docker host ip on access policy for the AWS ES which in theory should permit the authorisation.

Many thanks,  
Merril.

---

<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: [July 11, 2019, 8:21am UTC](https://discuss.elastic.co/t/kibana-docker-trying-to-connect-to-default-ignoring-env-elasticsearch-url/185469/4 "2019-07-11T08:21:52Z")

</div>

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