# Unable to start elasticsearch on CentOs

**URL:** https://discuss.elastic.co/t/unable-to-start-elasticsearch-on-centos/282687
**Category:** Elasticsearch
**Created:** [August 27, 2021, 4:07pm UTC](https://discuss.elastic.co/t/unable-to-start-elasticsearch-on-centos/282687 "2021-08-27T16:07:25Z")
**Posts on this page:** 13
**Page:** 1

<div class="post-metadata">

### Author: ![mirza\_muhriz](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/mirza_muhriz/32/80154_2.png) [@mirza\_muhriz](https://discuss.elastic.co/u/mirza_muhriz)
#### Post date: [August 27, 2021, 4:07pm UTC](https://discuss.elastic.co/t/unable-to-start-elasticsearch-on-centos/282687/1 "2021-08-27T16:07:25Z")

</div>

/bin/systemctl status elasticsearch.service  
● elasticsearch.service - Elasticsearch  
Loaded: loaded (/usr/lib/systemd/system/elasticsearch.service; enabled; vendo r preset: disabled)  
Active: failed (Result: exit-code) since Fri 2021-08-27 21:33:43 IST; 13s ago  
Docs: [http://www.elastic.co](http://www.elastic.co)  
Process: 6481 ExecStart=/usr/share/elasticsearch/bin/elasticsearch -p ${PID\_DI R}/elasticsearch.pid --quiet (code=exited, status=1/FAILURE)  
Main PID: 6481 (code=exited, status=1/FAILURE)

---

<div class="post-metadata">

### Author: ![mirza\_muhriz](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/mirza_muhriz/32/80154_2.png) [@mirza\_muhriz](https://discuss.elastic.co/u/mirza_muhriz)
#### Post date: [August 27, 2021, 4:07pm UTC](https://discuss.elastic.co/t/unable-to-start-elasticsearch-on-centos/282687/2 "2021-08-27T16:07:55Z")

</div>

```auto
/bin/systemctl status elasticsearch.service
● elasticsearch.service - Elasticsearch
   Loaded: loaded (/usr/lib/systemd/system/elasticsearch.service; enabled; vendo r preset: disabled)
   Active: failed (Result: exit-code) since Fri 2021-08-27 21:33:43 IST; 13s ago
     Docs: http://www.elastic.co
  Process: 6481 ExecStart=/usr/share/elasticsearch/bin/elasticsearch -p ${PID_DI R}/elasticsearch.pid --quiet (code=exited, status=1/FAILURE)
 Main PID: 6481 (code=exited, status=1/FAILURE)

```

---

<div class="post-metadata">

### Author: ![mirza\_muhriz](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/mirza_muhriz/32/80154_2.png) [@mirza\_muhriz](https://discuss.elastic.co/u/mirza_muhriz)
#### Post date: [August 27, 2021, 4:08pm UTC](https://discuss.elastic.co/t/unable-to-start-elasticsearch-on-centos/282687/3 "2021-08-27T16:08:25Z")

</div>

Getting Error Like This

---

<div class="post-metadata">

### Author: ![mirza\_muhriz](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/mirza_muhriz/32/80154_2.png) [@mirza\_muhriz](https://discuss.elastic.co/u/mirza_muhriz)
#### Post date: [August 27, 2021, 4:10pm UTC](https://discuss.elastic.co/t/unable-to-start-elasticsearch-on-centos/282687/4 "2021-08-27T16:10:04Z")

</div>

This Is My elastic Search Confirguration

```auto
 vim /etc/elasticsearch/elasticsearch.yml
#bootstrap.memory_lock: true

bootstrap.system_call_filter: false
#
# 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: 74.208.203.170
#
# 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 new node is started:
# The default list of hosts is ["127.0.0.1", "[::1]"]
#
#discovery.zen.ping.unicast.hosts: ["host1", "host2"]
#
discovery.seed_hosts: 74.208.203.170
#
# Prevent the "split brain" by configuring the majority of nodes (total number of master-eligible nodes / 2 + 1):
#
#discovery.zen.minimum_master_nodes: 3
#
# For more information, consult the zen discovery 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

```

---

<div class="post-metadata">

### Author: ![leandrojmp](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/leandrojmp/32/107231_2.png) [@leandrojmp](https://discuss.elastic.co/u/leandrojmp)
#### Post date: [August 27, 2021, 4:45pm UTC](https://discuss.elastic.co/t/unable-to-start-elasticsearch-on-centos/282687/5 "2021-08-27T16:45:36Z")

</div>

You need to provide the elasticsearch logs, also look at `/var/log/messages` for more information about why the service can't start.

---

<div class="post-metadata">

### Author: ![mirza\_muhriz](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/mirza_muhriz/32/80154_2.png) [@mirza\_muhriz](https://discuss.elastic.co/u/mirza_muhriz)
#### Post date: [August 27, 2021, 4:59pm UTC](https://discuss.elastic.co/t/unable-to-start-elasticsearch-on-centos/282687/6 "2021-08-27T16:59:24Z")

</div>

It Is Showing me Error Like This

```auto
Job for elasticsearch.service failed because the control process exited with error code. S ee "systemctl status elasticsearch.service" and "journalctl -xe" for details.

```

---

<div class="post-metadata">

### Author: ![leandrojmp](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/leandrojmp/32/107231_2.png) [@leandrojmp](https://discuss.elastic.co/u/leandrojmp)
#### Post date: [August 27, 2021, 6:06pm UTC](https://discuss.elastic.co/t/unable-to-start-elasticsearch-on-centos/282687/7 "2021-08-27T18:06:58Z")

</div>

You need to look the logs for the elasticsearch service, normally in `/var/log/elasticsearch/cluster-name.log`, you also need to look at the server logs, normally in `/var/log/messages`.

Try to start elasticsearch again and check the logs to get more recent information.

Also try to run `systemctl status elasticsearch -l` to get more verbose logs information.

---

<div class="post-metadata">

### Author: ![mirza\_muhriz](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/mirza_muhriz/32/80154_2.png) [@mirza\_muhriz](https://discuss.elastic.co/u/mirza_muhriz)
#### Post date: [August 27, 2021, 6:54pm UTC](https://discuss.elastic.co/t/unable-to-start-elasticsearch-on-centos/282687/8 "2021-08-27T18:54:41Z")

</div>

What is The solution For This

---

<div class="post-metadata">

### Author: ![mirza\_muhriz](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/mirza_muhriz/32/80154_2.png) [@mirza\_muhriz](https://discuss.elastic.co/u/mirza_muhriz)
#### Post date: [August 27, 2021, 7:04pm UTC](https://discuss.elastic.co/t/unable-to-start-elasticsearch-on-centos/282687/10 "2021-08-27T19:04:53Z")

</div>

Can You Please Drop Your Email So that I Mail server Credentials

---

<div class="post-metadata">

### Author: ![stephenb](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/stephenb/32/40856_2.png) [@stephenb](https://discuss.elastic.co/u/stephenb)
#### Post date: [August 27, 2021, 10:03pm UTC](https://discuss.elastic.co/t/unable-to-start-elasticsearch-on-centos/282687/11 "2021-08-27T22:03:09Z")

</div>

Hi @mirza_muhriz

I think there is some confusion.

This is a community discussion forum, _ **not technical support** _ with support personel.

Everyone on this site is a volunteer, we are not paid support and a thread does not constitue a support ticket.

Also, please do not ever request or send credentials on this site.

If you require dedicated support I suggest you contact **[sales@elastic.co](mailto:sales@elastic.co)** or below to discuss licensing and support option.

> **[Have questions? Contact Elastic](https://www.elastic.co/contact)**
>
> Have a question? Need help? Need to contact Elastic? We've got people worldwide to help you find the answers and information you're looking for.

If you want help on this forum I suggest you figure out how to get to your logs

@leandrojmp Suggested one method

Or perhaps you should use the following as shown [here](https://www.elastic.co/guide/en/elasticsearch/reference/7.14/starting-elasticsearch.html)

`sudo journalctl --unit elasticsearch`

FYI : @warkolm

---

<div class="post-metadata">

### Author: ![soco](https://avatars.discourse-cdn.com/v4/letter/s/8491ac/32.png) [@soco](https://discuss.elastic.co/u/soco)
#### Post date: [August 27, 2021, 10:27pm UTC](https://discuss.elastic.co/t/unable-to-start-elasticsearch-on-centos/282687/12 "2021-08-27T22:27:55Z")

</div>

let see elasticsearch.yml

---

<div class="post-metadata">

### Author: ![mirza\_muhriz](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/mirza_muhriz/32/80154_2.png) [@mirza\_muhriz](https://discuss.elastic.co/u/mirza_muhriz)
#### Post date: [August 28, 2021, 3:06am UTC](https://discuss.elastic.co/t/unable-to-start-elasticsearch-on-centos/282687/13 "2021-08-28T03:06:56Z")

</div>

Got this type of Error

```auto
 Starting Elasticsearch...
Aug 27 23:21:20 784a2f7.online-server.cloud systemd-entrypoint[20913]: uncaught exception in thread [main]
Aug 27 23:21:20 784a2f7.online-server.cloud systemd-entrypoint[20913]: ElasticsearchException[failed to bind service]; nested: IndexFormatTooNewExceptio
Aug 27 23:21:20 784a2f7.online-server.cloud systemd-entrypoint[20913]: Likely root cause: org.apache.lucene.index.IndexFormatTooNewException: Format ver
Aug 27 23:21:20 784a2f7.online-server.cloud systemd-entrypoint[20913]: at org.apache.lucene.codecs.CodecUtil.checkHeaderNoMagic(CodecUtil.java:216)
Aug 27 23:21:20 784a2f7.online-server.cloud systemd-entrypoint[20913]: at org.apache.lucene.index.SegmentInfos.readCommit(SegmentInfos.java:305)
Aug 27 23:21:20 784a2f7.online-server.cloud systemd-entrypoint[20913]: at org.apache.lucene.index.SegmentInfos.readCommit(SegmentInfos.java:289)
Aug 27 23:21:20 784a2f7.online-server.cloud systemd-entrypoint[20913]: at org.apache.lucene.index.StandardDirectoryReader$1.doBody(StandardDirectoryRead
Aug 27 23:21:20 784a2f7.online-server.cloud systemd-entrypoint[20913]: at org.apache.lucene.index.StandardDirectoryReader$1.doBody(StandardDirectoryRead
Aug 27 23:21:20 784a2f7.online-server.cloud systemd-entrypoint[20913]: at org.apache.lucene.index.SegmentInfos$FindSegmentsFile.run(SegmentInfos.java:68
Aug 27 23:21:20 784a2f7.online-server.cloud systemd-entrypoint[20913]: at org.apache.lucene.index.StandardDirectoryReader.open(StandardDirectoryReader.j
Aug 27 23:21:20 784a2f7.online-server.cloud systemd-entrypoint[20913]: at org.apache.lucene.index.DirectoryReader.open(DirectoryReader.java:76)
Aug 27 23:21:20 784a2f7.online-server.cloud systemd-entrypoint[20913]: at org.apache.lucene.index.DirectoryReader.open(DirectoryReader.java:64)
Aug 27 23:21:20 784a2f7.online-server.cloud systemd-entrypoint[20913]: at org.elasticsearch.gateway.PersistedClusterStateService.nodeMetadata(PersistedC
Aug 27 23:21:20 784a2f7.online-server.cloud systemd-entrypoint[20913]: at org.elasticsearch.env.NodeEnvironment.loadNodeMetadata(NodeEnvironment.java:40
Aug 27 23:21:20 784a2f7.online-server.cloud systemd-entrypoint[20913]: at org.elasticsearch.env.NodeEnvironment.<init>(NodeEnvironment.java:329)
Aug 27 23:21:20 784a2f7.online-server.cloud systemd-entrypoint[20913]: at org.elasticsearch.node.Node.<init>(Node.java:335)
Aug 27 23:21:20 784a2f7.online-server.cloud systemd-entrypoint[20913]: at org.elasticsearch.node.Node.<init>(Node.java:266)
Aug 27 23:21:20 784a2f7.online-server.cloud systemd-entrypoint[20913]: at org.elasticsearch.bootstrap.Bootstrap$5.<init>(Bootstrap.java:227)
Aug 27 23:21:20 784a2f7.online-server.cloud systemd-entrypoint[20913]: at org.elasticsearch.bootstrap.Bootstrap.setup(Bootstrap.java:227)
Aug 27 23:21:20 784a2f7.online-server.cloud systemd-entrypoint[20913]: at org.elasticsearch.bootstrap.Bootstrap.init(Bootstrap.java:393)
Aug 27 23:21:20 784a2f7.online-server.cloud systemd-entrypoint[20913]: at org.elasticsearch.bootstrap.Elasticsearch.init(Elasticsearch.java:170)
Aug 27 23:21:20 784a2f7.online-server.cloud systemd-entrypoint[20913]: at org.elasticsearch.bootstrap.Elasticsearch.execute(Elasticsearch.java:161)
Aug 27 23:21:20 784a2f7.online-server.cloud systemd-entrypoint[20913]: at org.elasticsearch.cli.EnvironmentAwareCommand.execute(EnvironmentAwareCommand.
Aug 27 23:21:20 784a2f7.online-server.cloud systemd-entrypoint[20913]: at org.elasticsearch.cli.Command.mainWithoutErrorHandling(Command.java:127)
Aug 27 23:21:20 784a2f7.online-server.cloud systemd-entrypoint[20913]: at org.elasticsearch.cli.Command.main(Command.java:90)
Aug 27 23:21:20 784a2f7.online-server.cloud systemd-entrypoint[20913]: at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:126)
Aug 27 23:21:20 784a2f7.online-server.cloud systemd-entrypoint[20913]: at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:92)
Aug 27 23:21:20 784a2f7.online-server.cloud systemd-entrypoint[20913]: For complete error details, refer to the log at /var/log/elasticsearch/elasticsea
Aug 27 23:21:20 784a2f7.online-server.cloud systemd[1]: elasticsearch.service: main process exited, code=exited, status=1/FAILURE
Aug 27 23:21:20 784a2f7.online-server.cloud systemd[1]: Failed to start Elasticsearch.
Aug 27 23:21:20 784a2f7.online-server.cloud systemd[1]: Unit elasticsearch.service entered failed state.
Aug 27 23:21:20 784a2f7.online-server.cloud systemd[1]: elasticsearch.service failed.

```

---

<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: [September 25, 2021, 3:07am UTC](https://discuss.elastic.co/t/unable-to-start-elasticsearch-on-centos/282687/14 "2021-09-25T03:07:50Z")

</div>

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