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

Dear All,

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

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.

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 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.

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?

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.

Hi starfishboy,

This is the screenshot from command prompt:

and, this is the screenshot from TCPView:

anyway, I have some errors when run Elasticsearch:

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

Anything that I missed?

Thank You.

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!

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.

Hi,

Please read the documentation:
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/elasticsearch/reference/current/index.html

Thanks!

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

Thanks starfishboy. I will create another topic. :slight_smile:

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