# "Connection Refused" for Elasticsearch and Kibana on AWS Elastic Beanstalk

**URL:** <https://discuss.elastic.co/t/connection-refused-for-elasticsearch-and-kibana-on-aws-elastic-beanstalk/187836>\
**Category:** Kibana\
**Created:** [June 27, 2019, 1:15pm UTC](https://discuss.elastic.co/t/connection-refused-for-elasticsearch-and-kibana-on-aws-elastic-beanstalk/187836 "2019-06-27T13:15:50Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![sami-t](https://avatars.discourse-cdn.com/v4/letter/s/8491ac/32.png) [@sami-t](https://discuss.elastic.co/u/sami-t)\
**Post date:** [June 27, 2019, 1:15pm UTC](https://discuss.elastic.co/t/connection-refused-for-elasticsearch-and-kibana-on-aws-elastic-beanstalk/187836/1 "2019-06-27T13:15:50Z")

</div>

I am trying to get the ELK stack deployed on my EC2 instance belonging to an ElasticBeanstalk environment, a Django app. I was able to set-up the ELK stack locally and it worked perfectly fine.

But now I am struggling with deployment, when I do `curl http://localhost:9200` from the instance, elasticsearch works fine and shows me the default page with JSON "You Search". Next step I felt was to open a port in my Load Balancer which I did (TCP port 5601) for Kibana. Now when I check if the 5601 port is working, I get this from netstat:  
`tcp 0 0 127.0.0.1:5601 0.0.0.0:* LISTEN`

Shouldn't I now be able to access Kibana at 172.xx.xx.xx:5601 (the public IP I get from `ifconfig` on the machine)? But I do not, I get a "Connection Refused".

I can share any file you want me to, I've set 0.0.0.0 in `kibana.yml` by the way.

---

<div class="post-metadata">

**Author:** ![markov00](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/markov00/32/33316_2.png) [@markov00](https://discuss.elastic.co/u/markov00)\
**Post date:** [July 25, 2019, 9:56am UTC](https://discuss.elastic.co/t/connection-refused-for-elasticsearch-and-kibana-on-aws-elastic-beanstalk/187836/2 "2019-07-25T09:56:00Z")

</div>

Hey @sami-t  
I think you have found the private IP. usually `172` range is a private network ip range [https://en.wikipedia.org/wiki/Private\_network](https://en.wikipedia.org/wiki/Private_network)

I think you should check for that IP on the AWS console or using the CLI `describe-instances` [https://docs.aws.amazon.com/cli/latest/reference/ec2/describe-instances.html](https://docs.aws.amazon.com/cli/latest/reference/ec2/describe-instances.html)

---

<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:** [August 22, 2019, 9:56am UTC](https://discuss.elastic.co/t/connection-refused-for-elasticsearch-and-kibana-on-aws-elastic-beanstalk/187836/3 "2019-08-22T09:56:08Z")

</div>

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