# Unable to start elasticsearch as service

**URL:** <https://discuss.elastic.co/t/unable-to-start-elasticsearch-as-service/178440>\
**Category:** Elasticsearch\
**Created:** [April 25, 2019, 11:29am UTC](https://discuss.elastic.co/t/unable-to-start-elasticsearch-as-service/178440 "2019-04-25T11:29:22Z")\
**Posts on this page:** 1\
**Showing post:** 5

<div class="post-metadata">

**Author:** ![Kajol\_Nimesh](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/kajol_nimesh/32/42291_2.png) [@Kajol\_Nimesh](https://discuss.elastic.co/u/Kajol_Nimesh)\
**Post date:** [April 26, 2019, 5:31am UTC](https://discuss.elastic.co/t/unable-to-start-elasticsearch-as-service/178440/5 "2019-04-26T05:31:49Z")

</div>

Elasticsearch.yml file

```
#node.attr.rack: r1
#
# ----------------------------------- Paths ------------------------------------
#
# Path to directory where to store the data (separate multiple locations by comma):
#
path.data: /var/lib/elasticsearch
#
# Path to log files:
#
path.logs: /var/log/elasticsearch
#
# ----------------------------------- Memory -----------------------------------
#
# Lock the memory on startup:
#
#bootstrap.memory_lock: true
#
# Make sure that the heap size is set to about half the memory available
# on the system and that the owner of the process is allowed to use this
# limit.
#
# Elasticsearch performs poorly when the system is swapping the memory.
#
# ---------------------------------- Network -----------------------------------
#
# Set the bind address to a specific IP (IPv4 or IPv6):
#
network.host: localhost
#
# Set a custom port for HTTP:
#
http.port: 9200
#
# For more information, consult the network module documentation.
#
# --------------------------------- Discovery ----------------------------------
#
# Pass an initial list of hosts to perform discovery when this node is started:
# The default list of hosts is ["127.0.0.1", "[::1]"]
#
#discovery.seed_hosts: ["host1", "host2"]
#
# Bootstrap the cluster using an initial set of master-eligible nodes:
#
#cluster.initial_master_nodes: ["node-1", "node-2"]
#
# For more information, consult the discovery and cluster formation module documentation.
#
# ---------------------------------- Gateway -----------------------------------
#
# Block initial recovery after a full cluster restart until N nodes are started:
#
#gateway.recover_after_nodes: 3
#
# For more information, consult the gateway module documentation.
#
# ---------------------------------- Various -----------------------------------
#
# Require explicit names when deleting indices:
#
#action.destructive_requires_name: true
"/etc/elasticsearch/elasticsearch.yml" 88L, 2843C
```

---

_[View the full topic](https://discuss.elastic.co/t/unable-to-start-elasticsearch-as-service/178440)._
