# Unable to connect to Elasticsearch at http://localhost:9200 - Windows 10

**URL:** <https://discuss.elastic.co/t/unable-to-connect-to-elasticsearch-at-http-localhost-9200-windows-10/84878>\
**Category:** Elasticsearch\
**Created:** [May 8, 2017, 4:48am UTC](https://discuss.elastic.co/t/unable-to-connect-to-elasticsearch-at-http-localhost-9200-windows-10/84878 "2017-05-08T04:48:53Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![avdnowhere](https://avatars.discourse-cdn.com/v4/letter/a/ecccb3/32.png) [@avdnowhere](https://discuss.elastic.co/u/avdnowhere)\
**Post date:** [May 8, 2017, 4:48am UTC](https://discuss.elastic.co/t/unable-to-connect-to-elasticsearch-at-http-localhost-9200-windows-10/84878/1 "2017-05-08T04:48:53Z")

</div>

Dear All,

I am trying to run Kibana, however I get this error:

 ![](https://us1.discourse-cdn.com/elastic/original/3X/b/e/bef5d539a40964a55781c1956a2ced0003e6dcf9.PNG)

This is my **kibana.yml** :

```
elasticsearch.url: "http://localhost:9200"
elasticsearch.ssl.verify: false
xpack.security.enabled: false

```

and this is my **elasticsearch.yml** :

```
node.master: false
node.data: false
node.ingest: false

cluster.name: "my_cluster"

network.host: localhost
http.port: 9200

xpack.security.enabled: false
action.auto_create_index: .security,.monitoring*,.watches,.triggered_watches,.watcher-history*

```

Any ideas why I can't run elasticsearch on my pc?  
I am sorry, I am newbie to elastic.

Thank You.

---

<div class="post-metadata">

**Author:** ![starfishboy](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/starfishboy/32/17409_2.png) [@starfishboy](https://discuss.elastic.co/u/starfishboy)\
**Post date:** [May 8, 2017, 5:08am UTC](https://discuss.elastic.co/t/unable-to-connect-to-elasticsearch-at-http-localhost-9200-windows-10/84878/2 "2017-05-08T05:08:41Z")

</div>

Hi,

Have you ran the bin/elasticsearch.bat command? If not, please run it, then attach a screenshot of your Task Manager.

Also, download [TCPView](https://technet.microsoft.com/en-us/sysinternals/tcpview.aspx) from Microsoft, and attach a screenshot of TCPView to ensure you have Elasticsearch running and listening on that port, after you have ran the bin/elasticsearch.bat command, then scroll down to local port 9200, and check if you have Java listening on port 9200.

Also, ensure that you have installed Java 8 and that you have the environment variable JAVA\_HOME pointing to the directory where Java 8 is installed. Anything less than Java 8 won't work.

Also, please check if Windows firewall is blocking the port.

Hope this helps.

---

<div class="post-metadata">

**Author:** ![avdnowhere](https://avatars.discourse-cdn.com/v4/letter/a/ecccb3/32.png) [@avdnowhere](https://discuss.elastic.co/u/avdnowhere)\
**Post date:** [May 8, 2017, 6:47am UTC](https://discuss.elastic.co/t/unable-to-connect-to-elasticsearch-at-http-localhost-9200-windows-10/84878/3 "2017-05-08T06:47:08Z")

</div>

I tried to run bin/elasticsearch.bat, but after I double clicked it will automatically close the dialog (looks like there is an error, however I couldn't capture it as the dialog closes very fast). I have downloaded TCPView, and there is no port 9200 in the process. I have no idea how to check the Java listening on port 9200. I have install the Java version 8 and it is setup on the environment variable. I have checked the firewall, it does not block the port 9200 and the port is not display where I run netstat -a -n command.

Anything that I missed?

---

<div class="post-metadata">

**Author:** ![starfishboy](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/starfishboy/32/17409_2.png) [@starfishboy](https://discuss.elastic.co/u/starfishboy)\
**Post date:** [May 8, 2017, 7:23am UTC](https://discuss.elastic.co/t/unable-to-connect-to-elasticsearch-at-http-localhost-9200-windows-10/84878/4 "2017-05-08T07:23:20Z")

</div>

Hi,

Open a command prompt, and change directory to the Elasticsearch bin directory.  
Run the SET command to show the environment variables, then attach a screenshot, showing clearly the JAVA\_HOME environment variable setting.

Then run Elasticsearch.bat

Wait a few minutes, then run TCPView, capture and attach a TCPView screenshot, ensuring that the screenshot clearly shows local port 9200 (scroll up and down if you have to).

So: Please attach at least 2 screenshots.

---

<div class="post-metadata">

**Author:** ![avdnowhere](https://avatars.discourse-cdn.com/v4/letter/a/ecccb3/32.png) [@avdnowhere](https://discuss.elastic.co/u/avdnowhere)\
**Post date:** [May 9, 2017, 2:30am UTC](https://discuss.elastic.co/t/unable-to-connect-to-elasticsearch-at-http-localhost-9200-windows-10/84878/5 "2017-05-09T02:30:55Z")

</div>

Hi starfishboy,

This is the screenshot from command prompt:

 ![](https://us1.discourse-cdn.com/elastic/original/3X/3/6/3621b635e0bf850f282819d178d768eb6ee4c6d0.png)

and, this is the screenshot from TCPView:

 ![](https://us1.discourse-cdn.com/elastic/original/3X/a/e/ae477525e5d2f1225b6105ef0ea8325ff8997c8a.png)

anyway, I have some errors when run Elasticsearch:

 ![](https://us1.discourse-cdn.com/elastic/original/3X/5/2/52d5c200ecfe3a5ee6d35614552c960e764e4dca.png)

and, the Status Breakdown from Kibana change to below figure:

 ![](https://us1.discourse-cdn.com/elastic/original/3X/8/5/8593a0b50b1e86c7fbd2ba34f7919dfb25ed9791.PNG)

Anything that I missed?

Thank You.

---

<div class="post-metadata">

**Author:** ![starfishboy](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/starfishboy/32/17409_2.png) [@starfishboy](https://discuss.elastic.co/u/starfishboy)\
**Post date:** [May 9, 2017, 3:01am UTC](https://discuss.elastic.co/t/unable-to-connect-to-elasticsearch-at-http-localhost-9200-windows-10/84878/6 "2017-05-09T03:01:21Z")

</div>

Hi,

I suggest you use the default elasticsearch.yml and kibana.yml first, since you're a newbie to elastic.

Rename your existing .yml to yml.old for both elasticsearch and kibana, and create empty elasticsearch.yml and kibana.yml in the respective config directories then start elasticsearch and kibana from separate command line directories.

Good luck!

---

<div class="post-metadata">

**Author:** ![avdnowhere](https://avatars.discourse-cdn.com/v4/letter/a/ecccb3/32.png) [@avdnowhere](https://discuss.elastic.co/u/avdnowhere)\
**Post date:** [May 9, 2017, 3:31am UTC](https://discuss.elastic.co/t/unable-to-connect-to-elasticsearch-at-http-localhost-9200-windows-10/84878/7 "2017-05-09T03:31:33Z")

</div>

Hi starfishboy,

Thanks a lot for your help, now I am able to open Kibana.  
However I need to Configure an index pattern.  
What actually an index pattern? Is it related to data source?  
Because I haven't decided yet what data and data source I want to use.

Thank You.

---

<div class="post-metadata">

**Author:** ![starfishboy](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/starfishboy/32/17409_2.png) [@starfishboy](https://discuss.elastic.co/u/starfishboy)\
**Post date:** [May 9, 2017, 5:58am UTC](https://discuss.elastic.co/t/unable-to-connect-to-elasticsearch-at-http-localhost-9200-windows-10/84878/8 "2017-05-09T05:58:13Z")

</div>

Hi,

Please read the documentation:  
[https://www.elastic.co/guide/index.html](https://www.elastic.co/guide/index.html)  
[https://www.elastic.co/guide/en/kibana/current/tutorial-define-index.html](https://www.elastic.co/guide/en/kibana/current/tutorial-define-index.html)  
[https://www.elastic.co/guide/en/elasticsearch/reference/current/index.html](https://www.elastic.co/guide/en/elasticsearch/reference/current/index.html)

Thanks!

Please open a new topic/discussion if you have other issues.

---

<div class="post-metadata">

**Author:** ![avdnowhere](https://avatars.discourse-cdn.com/v4/letter/a/ecccb3/32.png) [@avdnowhere](https://discuss.elastic.co/u/avdnowhere)\
**Post date:** [May 9, 2017, 8:18am UTC](https://discuss.elastic.co/t/unable-to-connect-to-elasticsearch-at-http-localhost-9200-windows-10/84878/9 "2017-05-09T08:18:04Z")

</div>

Thanks starfishboy. I will create another topic. 🙂

---

<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:** [June 6, 2017, 8:32am UTC](https://discuss.elastic.co/t/unable-to-connect-to-elasticsearch-at-http-localhost-9200-windows-10/84878/10 "2017-06-06T08:32:06Z")

</div>

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