# Failed to start Elasticsearch on centos 7

**URL:** https://discuss.elastic.co/t/failed-to-start-elasticsearch-on-centos-7/214158
**Category:** Elasticsearch
**Created:** [January 8, 2020, 6:21am UTC](https://discuss.elastic.co/t/failed-to-start-elasticsearch-on-centos-7/214158 "2020-01-08T06:21:40Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![steven.l](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/steven.l/32/47498_2.png) [@steven.l](https://discuss.elastic.co/u/steven.l)
#### Post date: [January 8, 2020, 6:21am UTC](https://discuss.elastic.co/t/failed-to-start-elasticsearch-on-centos-7/214158/1 "2020-01-08T06:21:40Z")

</div>

OS: Centos 7

My installation step of elasticsearch was following the command from the website ([Install Elasticsearch with RPM | Elasticsearch Guide [7.5] | Elastic](https://www.elastic.co/guide/en/elasticsearch/reference/7.5/rpm.html#rpm-repo)):

```
> wget https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-7.5.1-x86_64.rpm
> wget https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-7.5.1-x86_64.rpm.sha512
> shasum -a 512 -c elasticsearch-7.5.1-x86_64.rpm.sha512 
> sudo rpm --install elasticsearch-7.5.1-x86_64.rpm

```

I also have used the **chown** command for each relative elasticsearch directory for my current user.

```
> sudo chown -R myuser:myuser /etc/elasticsearch/
> sudo chown -R myuser:myuser /usr/share/elasticsearch/
> sudo chown -R myuser:myuser /var/log/elasticsearch/
> sudo chown -R myuser:myuser /var/lib/elasticsearch/

```

When I executed the start command, the system output the error message:

```
> ● elasticsearch.service - Elasticsearch
> Loaded: loaded (/usr/lib/systemd/system/elasticsearch.service; enabled; vendor preset: disabled)
> Active: failed (Result: exit-code) since Wed 2020-01-08 14:00:24 CST; 16s ago
> Docs: http://www.elastic.co
> Process: 97334 ExecStart=/usr/share/elasticsearch/bin/elasticsearch -p ${PID_DIR}/elasticsearch.pid --quiet (code=exited, status=1/FAILURE)
> Main PID: 97334 (code=exited, status=1/FAILURE)
> 
> Jan 08 14:00:24 node3 elasticsearch[97334]: at sun.nio.fs.UnixFileSystemProvider.newByteChannel(UnixFileSystemProvi...:214)
> Jan 08 14:00:24 node3 elasticsearch[97334]: at java.nio.file.Files.newByteChannel(Files.java:361)
> Jan 08 14:00:24 node3 elasticsearch[97334]: at java.nio.file.Files.newByteChannel(Files.java:407)
> Jan 08 14:00:24 node3 elasticsearch[97334]: at java.nio.file.spi.FileSystemProvider.newInputStream(FileSystemProvid...:384)
> Jan 08 14:00:24 node3 elasticsearch[97334]: at java.nio.file.Files.newInputStream(Files.java:152)
> Jan 08 14:00:24 node3 elasticsearch[97334]: at org.elasticsearch.tools.launchers.JvmOptionsParser.main(JvmOptionsPa...a:62)
> Jan 08 14:00:24 node3 systemd[1]: elasticsearch.service: main process exited, code=exited, status=1/FAILURE
> Jan 08 14:00:24 node3 systemd[1]: Failed to start Elasticsearch.
> Jan 08 14:00:24 node3 systemd[1]: Unit elasticsearch.service entered failed state.
> Jan 08 14:00:24 node3 systemd[1]: elasticsearch.service failed.

```

In my elasticsearch.yml file, I only changed the following configuration:

> ```
> cluster.name: elasticsearch
> node.name: node3
> path.data: /usr/data/elasticsearch/data
> path.logs: /usr/data/elasticsearch/logs
> network.host: node3
> http.port: 9200
> discovery.seed_hosts: ["node3"]
> cluster.initial_master_nodes: ["node-3"]
> 
> ```

How to handle "Failed to start Elasticsearch" of my issue?

---

<div class="post-metadata">

### Author: ![spinscale](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/spinscale/32/25011_2.png) [@spinscale](https://discuss.elastic.co/u/spinscale)
#### Post date: [January 8, 2020, 10:19am UTC](https://discuss.elastic.co/t/failed-to-start-elasticsearch-on-centos-7/214158/2 "2020-01-08T10:19:09Z")

</div>

as you seem to run with systemd, can you use [journalctl](https://www.elastic.co/guide/en/elasticsearch/reference/7.5/starting-elasticsearch.html#start-es-deb-systemd) to extract the log output of Elasticsearch when starting, put it in a pastebin/gist and put the link here. The log contains hopefully the reason why ES did not start.

---

<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: [February 5, 2020, 10:19am UTC](https://discuss.elastic.co/t/failed-to-start-elasticsearch-on-centos-7/214158/3 "2020-02-05T10:19:27Z")

</div>

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