Elasticsearch Service Not Running - Server Refused To Connect

Elasticsearch server not starting. (From Services) and in browser refused to connect.

Issue Description: Elasticsearch server not starting. (From Services)

  1. Go to C:\Program Files\Elastic\Elasticsearch\6. X.X\bin
  2. Run the Elasticsearch.exe file via the command prompt and there should be an error message following the trigger:

The response to this is as follows when tried to run elasticsearch.bat on the Windows machine:

  • "The default discovery settings are unsuitable for production use; at least one of [discovery.seed_hosts, discovery.seed_providers, cluster.initial_master_nodes] must be configured" .


Resolution:

To start a single-node Elasticsearch cluster for development or testing, specify single-node discovery to bypass the bootstrap checks:

  • Add the following line in the elasticsearch.yml file location in C:/Program Data/ElasticSearch/Config

discovery.type: single-node

Reference :