# Puppet-elasticsearch - yum error on CentOS

**URL:** <https://discuss.elastic.co/t/puppet-elasticsearch-yum-error-on-centos/14239>\
**Category:** Elasticsearch\
**Created:** [November 4, 2013, 10:25am UTC](https://discuss.elastic.co/t/puppet-elasticsearch-yum-error-on-centos/14239 "2013-11-04T10:25:23Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Tim\_S](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/tim_s/32/958_2.png) [@Tim\_S](https://discuss.elastic.co/u/Tim_S)\
**Post date:** [November 4, 2013, 10:25am UTC](https://discuss.elastic.co/t/puppet-elasticsearch-yum-error-on-centos/14239/1 "2013-11-04T10:25:23Z")

</div>

I'm using puppet enterprise on CentOS, and getting an error from Yum.

I've tried [GitHub - voxpupuli/puppet-elasticsearch: Elasticsearch Puppet module](https://github.com/elasticsearch/puppet-elasticsearch) and  
[https://forge.puppetlabs.com/ispavailability/elasticsearch](https://forge.puppetlabs.com/ispavailability/elasticsearch) - in both cases  
the agent errors with an error from yum, because (I think) there is no  
package named 'elasticsearch' in the yum repository. The error is as  
follows:

> Error: /Stage[main]/Elasticsearch::Package/Package[elasticsearch]/ensure:  
> change from absent to present failed: Execution of '/usr/bin/yum -d 0 -e 0  
> -y install elasticsearch' returned 1: Error: Nothing to do

If I just run "yum install elasticsearch", I get various bits of output  
including the following:

> No package elasticsearch available.

Is it that these modules do not support CentOS, or do I need to update yum  
to look in another repository, or am I doing something else wrong? The code  
for the puppet-elasticsearch project has various references to CentOS in  
it, so I was assuming that meant it would work, but maybe that was just  
future proofing?

Any suggestions appreciated.

Thanks,

Tim.

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<div class="post-metadata">

**Author:** ![Magnus\_Persson](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/magnus_persson/32/1159_2.png) [@Magnus\_Persson](https://discuss.elastic.co/u/Magnus_Persson)\
**Post date:** [November 4, 2013, 8:56pm UTC](https://discuss.elastic.co/t/puppet-elasticsearch-yum-error-on-centos/14239/2 "2013-11-04T20:56:09Z")

</div>

Correct, elasticsearch is afaik not distributed in any repositories. To add  
to this, the RPMs provided may have incorrect postinstall scripts that  
don't adhere to RPM guidelines: after installation, the elasticsearch  
service is not only installed it is also started. This means that a custom  
configuration (specified in the puppet manifest) is only applied on service  
restart/reload. At that point directories/logs are already created at the  
default locations.

If going for more recent versions of ES it may be fixed (there was an  
issue up on github).

[https://gist.github.com/magnusp/7308990](https://gist.github.com/magnusp/7308990) this is the manifest I'm currently  
working on. Of notable interest is the --noscript flag to rpm which  
disables the postinstall script. I'm using 0.90.3 since I pair ES with  
Logstash. I only recently started using puppet so there are probably  
numerous issues with my manifest 🙂

On Monday, November 4, 2013 11:25:23 AM UTC+1, Tim S wrote:

> I'm using puppet enterprise on CentOS, and getting an error from Yum.
> 
> I've tried [GitHub - voxpupuli/puppet-elasticsearch: Elasticsearch Puppet module](https://github.com/elasticsearch/puppet-elasticsearch) and  
> [ispavailability/elasticsearch · Module for managing and configuring Elasticsearch nodes · Puppet Forge](https://forge.puppetlabs.com/ispavailability/elasticsearch) - in both  
> cases the agent errors with an error from yum, because (I think) there is  
> no package named 'elasticsearch' in the yum repository. The error is as  
> follows:
> 
> > Error: /Stage[main]/Elasticsearch::Package/Package[elasticsearch]/ensure:  
> > change from absent to present failed: Execution of '/usr/bin/yum -d 0 -e 0  
> > -y install elasticsearch' returned 1: Error: Nothing to do
> 
> If I just run "yum install elasticsearch", I get various bits of output  
> including the following:
> 
> > No package elasticsearch available.
> 
> Is it that these modules do not support CentOS, or do I need to update yum  
> to look in another repository, or am I doing something else wrong? The code  
> for the puppet-elasticsearch project has various references to CentOS in  
> it, so I was assuming that meant it would work, but maybe that was just  
> future proofing?
> 
> Any suggestions appreciated.
> 
> Thanks,
> 
> Tim.

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<div class="post-metadata">

**Author:** ![Tim\_S](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/tim_s/32/958_2.png) [@Tim\_S](https://discuss.elastic.co/u/Tim_S)\
**Post date:** [November 5, 2013, 3:27pm UTC](https://discuss.elastic.co/t/puppet-elasticsearch-yum-error-on-centos/14239/3 "2013-11-05T15:27:13Z")

</div>

Thanks for confirming it wasn't me doing something silly.

I've now got something working using  
[GitHub - pdrakeweb/puppet-elasticsearch: Elasticsearch Puppet Module](https://github.com/pdrakeweb/puppet-elasticsearch), which uses a java  
service wrapper to run es packaged as part of the puppet module. Seems to  
work ok.

On Monday, November 4, 2013 8:56:09 PM UTC, Magnus Persson wrote:

> Correct, elasticsearch is afaik not distributed in any repositories. To  
> add to this, the RPMs provided may have incorrect postinstall scripts that  
> don't adhere to RPM guidelines: after installation, the elasticsearch  
> service is not only installed it is also started. This means that a custom  
> configuration (specified in the puppet manifest) is only applied on service  
> restart/reload. At that point directories/logs are already created at the  
> default locations.
> 
> If going for more recent versions of ES it may be fixed (there was an  
> issue up on github).
> 
> [https://gist.github.com/magnusp/7308990](https://gist.github.com/magnusp/7308990) this is the manifest I'm  
> currently working on. Of notable interest is the --noscript flag to rpm  
> which disables the postinstall script. I'm using 0.90.3 since I pair ES  
> with Logstash. I only recently started using puppet so there are probably  
> numerous issues with my manifest 🙂
> 
> On Monday, November 4, 2013 11:25:23 AM UTC+1, Tim S wrote:
> 
> > I'm using puppet enterprise on CentOS, and getting an error from Yum.
> > 
> > I've tried [GitHub - voxpupuli/puppet-elasticsearch: Elasticsearch Puppet module](https://github.com/elasticsearch/puppet-elasticsearch) and  
> > [ispavailability/elasticsearch · Module for managing and configuring Elasticsearch nodes · Puppet Forge](https://forge.puppetlabs.com/ispavailability/elasticsearch) - in both  
> > cases the agent errors with an error from yum, because (I think) there is  
> > no package named 'elasticsearch' in the yum repository. The error is as  
> > follows:
> > 
> > > Error:  
> > > /Stage[main]/Elasticsearch::Package/Package[elasticsearch]/ensure: change  
> > > from absent to present failed: Execution of '/usr/bin/yum -d 0 -e 0 -y  
> > > install elasticsearch' returned 1: Error: Nothing to do
> > 
> > If I just run "yum install elasticsearch", I get various bits of output  
> > including the following:
> > 
> > > No package elasticsearch available.
> > 
> > Is it that these modules do not support CentOS, or do I need to update  
> > yum to look in another repository, or am I doing something else wrong? The  
> > code for the puppet-elasticsearch project has various references to CentOS  
> > in it, so I was assuming that meant it would work, but maybe that was just  
> > future proofing?
> > 
> > Any suggestions appreciated.
> > 
> > Thanks,
> > 
> > Tim.

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<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 6, 2017, 2:08am UTC](https://discuss.elastic.co/t/puppet-elasticsearch-yum-error-on-centos/14239/4 "2017-07-06T02:08:47Z")

</div>


