# Install Elasticsearch 2.4 using yum/dnf

**URL:** <https://discuss.elastic.co/t/install-elasticsearch-2-4-using-yum-dnf/60350>\
**Category:** Elasticsearch\
**Created:** [September 13, 2016, 7:40am UTC](https://discuss.elastic.co/t/install-elasticsearch-2-4-using-yum-dnf/60350 "2016-09-13T07:40:16Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Kissaki](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/kissaki/32/12437_2.png) [@Kissaki](https://discuss.elastic.co/u/Kissaki)\
**Post date:** [September 13, 2016, 7:40am UTC](https://discuss.elastic.co/t/install-elasticsearch-2-4-using-yum-dnf/60350/1 "2016-09-13T07:40:16Z")

</div>

Hi,

I have no problems downloading the tar.gz file and running Elasticsearch manually. However, when I use dnf to install elasticsearch to run it as a service I cant get it to start.

I'm using the oracle jdk 1.8.0\_102 and installed elasticsearch using dnf like here:

> **[Register a snapshot repository | Elasticsearch Guide \[8.11\] | Elastic](https://www.elastic.co/guide/en/elasticsearch/reference/current/snapshots-register-repository.html)**

When I try to start the service, the systemctl status gives me this back:

> elasticsearch.service - Elasticsearch  
> Loaded: loaded (/usr/lib/systemd/system/elasticsearch.service; enabled; vendor preset: disabled)  
> Active: failed (Result: exit-code) since Tue 2016-09-13 09:35:43 CEST; 2s ago  
> Docs: [http://www.elastic.co](http://www.elastic.co)  
> Process: 11211 ExecStart=/usr/share/elasticsearch/bin/elasticsearch -Des.pidfile=${PID\_DIR}/elasticsearch.pid -Des.default.path.home=${ES\_HOME} -Des.default.path.logs=${LOG\_DIR} -Des.default.path.data=${DATA\_DIR} -Des.default.path.conf=${CONF\_DIR} (code=exited, status=1/FAILURE)  
> Process: 11203 ExecStartPre=/usr/share/elasticsearch/bin/elasticsearch-systemd-pre-exec (code=exited, status=0/SUCCESS)  
> Main PID: 11211 (code=exited, status=1/FAILURE)

> Sep 13 09:35:43 localhost.localdomain elasticsearch[11211]: at org.elasticsearch.plugins.PluginInfo.readFromProperties(PluginInfo.java:87)  
> Sep 13 09:35:43 localhost.localdomain elasticsearch[11211]: at org.elasticsearch.plugins.PluginsService.getModuleBundles(PluginsService.java:335)  
> Sep 13 09:35:43 localhost.localdomain elasticsearch[11211]: at org.elasticsearch.plugins.PluginsService.(PluginsService.java:114)  
> Sep 13 09:35:43 localhost.localdomain elasticsearch[11211]: at org.elasticsearch.node.Node.(Node.java:158)  
> Sep 13 09:35:43 localhost.localdomain elasticsearch[11211]: at org.elasticsearch.node.Node.(Node.java:140)  
> Sep 13 09:35:43 localhost.localdomain elasticsearch[11211]: at org.elasticsearch.node.NodeBuilder.build(NodeBuilder.java:143)  
> Sep 13 09:35:43 localhost.localdomain elasticsearch[11211]: at org.elasticsearch.bootstrap.Bootstrap.setup(Bootstrap.java:194)  
> Sep 13 09:35:43 localhost.localdomain systemd[1]: elasticsearch.service: Main process exited, code=exited, status=1/FAILURE  
> Sep 13 09:35:43 localhost.localdomain systemd[1]: elasticsearch.service: Unit entered failed state.  
> Sep 13 09:35:43 localhost.localdomain systemd[1]: elasticsearch.service: Failed with result 'exit-code'.

In /var/log/elasticsearch/elasticsearch.log, I can see this message:

> [2016-09-13 09:35:43,950][INFO][node] [Adam X] version[2.4.0], pid[11211], build[ce9f0c7/2016-08-29T09:14:17Z]  
> [2016-09-13 09:35:43,950][INFO][node] [Adam X] initializing ...  
> [2016-09-13 09:35:43,954][ERROR][bootstrap] Exception  
> java.lang.IllegalStateException: Unable to initialize modules  
> at org.elasticsearch.plugins.PluginsService.(PluginsService.java:121)  
> at org.elasticsearch.node.Node.(Node.java:158)  
> at org.elasticsearch.node.Node.(Node.java:140)  
> at org.elasticsearch.node.NodeBuilder.build(NodeBuilder.java:143)  
> at org.elasticsearch.bootstrap.Bootstrap.setup(Bootstrap.java:194)  
> at org.elasticsearch.bootstrap.Bootstrap.init(Bootstrap.java:286)  
> at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:35)  
> Caused by: java.nio.file.NoSuchFileException: /usr/share/elasticsearch/modules/ingest-common/plugin-descriptor.properties  
> at sun.nio.fs.UnixException.translateToIOException(UnixException.java:86)  
> at sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:102)  
> at sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:107)  
> at sun.nio.fs.UnixFileSystemProvider.newByteChannel(UnixFileSystemProvider.java:214)  
> at java.nio.file.Files.newByteChannel(Files.java:361)  
> at java.nio.file.Files.newByteChannel(Files.java:407)  
> at java.nio.file.spi.FileSystemProvider.newInputStream(FileSystemProvider.java:384)  
> at java.nio.file.Files.newInputStream(Files.java:152)  
> at org.elasticsearch.plugins.PluginInfo.readFromProperties(PluginInfo.java:87)  
> at org.elasticsearch.plugins.PluginsService.getModuleBundles(PluginsService.java:335)  
> at org.elasticsearch.plugins.PluginsService.(PluginsService.java:114)  
> ... 6 more

Installing the alpha 5 using dnf seems to work without problems, but I seem to just cant get the 2.4 release to run as a service.

Does anyone have an idea what's wrong here?

---

<div class="post-metadata">

**Author:** ![Kissaki](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/kissaki/32/12437_2.png) [@Kissaki](https://discuss.elastic.co/u/Kissaki)\
**Post date:** [September 13, 2016, 9:53am UTC](https://discuss.elastic.co/t/install-elasticsearch-2-4-using-yum-dnf/60350/2 "2016-09-13T09:53:55Z")

</div>

I played around a bit. I found that the modules folder had several empty plugin folders:

- ingest-common
- lang-mustache
- lang-painless
- perlocator
- transport-netty3
- transport-netty4
- aggs-matrix-stats

After removing them I got a permission denied on

> /var/lib/elasticsearch/nodes

So I did a

> chown -R elasticsearch:elasticsearch /var/lib/elasticsearch

Now I can start elasticsearch as a service. Still have to find out what's with the empty module folders happening though.

**_edit_**  
forgot to mention aggs-matrix-stats

**_edit2_**  
Played around a bit more. When I tried to install the kopf Plugin, I got the following error message:

> bin/plugin: line 20: dirname: command not found  
> bin/plugin: line 110: cut: command not found  
> bin/plugin: line 110: hostname: command not found

And the last line was something like

> elasticsearch could not find any executable java binary

Executing the plugin install not as sudo but with my own user with a previous chown on /usr/share/elasticsearch/plugins worked however. The kopf plugin is now working.

---

<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:** [July 5, 2017, 10:20pm UTC](https://discuss.elastic.co/t/install-elasticsearch-2-4-using-yum-dnf/60350/3 "2017-07-05T22:20:41Z")

</div>


