# Elasticsearch puppet module issue

**URL:** https://discuss.elastic.co/t/elasticsearch-puppet-module-issue/111567
**Category:** Elasticsearch
**Created:** [December 13, 2017, 1:46pm UTC](https://discuss.elastic.co/t/elasticsearch-puppet-module-issue/111567 "2017-12-13T13:46:01Z")
**Posts on this page:** 9
**Page:** 1

<div class="post-metadata">

### Author: ![AYakimenko](https://avatars.discourse-cdn.com/v4/letter/a/e56c9b/32.png) [@AYakimenko](https://discuss.elastic.co/u/AYakimenko)
#### Post date: [December 13, 2017, 1:46pm UTC](https://discuss.elastic.co/t/elasticsearch-puppet-module-issue/111567/1 "2017-12-13T13:46:01Z")

</div>

Hi All,

I'm trying to install Elasticsearch 6.0 via Puppet Enterprise 2016.5.x using the mod 'elastic-elasticsearch', '6.0.0' (with all necessary dependencies). In the manifest I'm calling:

```
class { 'elasticsearch':
   version => '6.0.0'
}

```

But when I run Puppet I get error:

**Server Error: Evaluation Error: Error while evaluating a Resource Statement, Evaluation Error: Error while evaluating a Resource Statement, undefined method `pop' for nil:NilClass**

at line with 'elasticsearch' class. It works fine if I use Puppet module for Elasticsearch earlier version. But earlier version is not compatible with Elasticsearch 6.x. Could you please help with this issue?

---

<div class="post-metadata">

### Author: ![tylerjl](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/tylerjl/32/44965_2.png) [@tylerjl](https://discuss.elastic.co/u/tylerjl)
#### Post date: [December 14, 2017, 6:36pm UTC](https://discuss.elastic.co/t/elasticsearch-puppet-module-issue/111567/2 "2017-12-14T18:36:21Z")

</div>

Hi, could you share the output of trying to run your Puppet manifest with `--trace` as well to get the full Ruby stack trace?

---

<div class="post-metadata">

### Author: ![AYakimenko](https://avatars.discourse-cdn.com/v4/letter/a/e56c9b/32.png) [@AYakimenko](https://discuss.elastic.co/u/AYakimenko)
#### Post date: [December 18, 2017, 9:50am UTC](https://discuss.elastic.co/t/elasticsearch-puppet-module-issue/111567/3 "2017-12-18T09:50:23Z")

</div>

Hi Tyler, trace is:

```
Error: Could not retrieve catalog from remote server: Error 500 on SERVER: Server Error: 
Evaluation Error: Error while evaluating a Resource Statement, Evaluation Error: Error while evaluating a Resource Statement, undefined method `pop' for nil:NilClass at /etc/puppetlabs/code/environments/<our_environment_name>/modules/<our_module>/manifests/elasticsearch.pp:180:3 on node <our_node_name>
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/indirector/rest.rb:269:in `is_http_200?'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/indirector/rest.rb:167:in `find'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/indirector/indirection.rb:194:in `find'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/configurer.rb:434:in `block in retrieve_new_catalog'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/util.rb:386:in `block in thinmark'
/opt/puppetlabs/puppet/lib/ruby/2.1.0/benchmark.rb:294:in `realtime'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/util.rb:385:in `thinmark'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/configurer.rb:433:in `retrieve_new_catalog'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/configurer.rb:78:in `retrieve_catalog'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/configurer.rb:147:in `prepare_and_retrieve_catalog'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/configurer.rb:309:in `run_internal'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/configurer.rb:221:in `block in run'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/context.rb:65:in `override'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet.rb:241:in `override'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/configurer.rb:195:in `run'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/agent.rb:45:in `block (4 levels) in run'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/agent/locker.rb:21:in `lock'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/agent.rb:45:in `block (3 levels) in run'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/agent.rb:98:in `with_client'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/agent.rb:42:in `block (2 levels) in run'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/agent.rb:65:in `run_in_fork'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/agent.rb:41:in `block in run'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/application.rb:179:in `call'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/application.rb:179:in `controlled_run'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/agent.rb:39:in `run'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/application/agent.rb:353:in `onetime'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/application/agent.rb:331:in `run_command'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/application.rb:344:in `block in run'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/util.rb:540:in `exit_on_fail'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/application.rb:344:in `run'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/util/command_line.rb:132:in `run'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/util/command_line.rb:72:in `execute'
/opt/puppetlabs/puppet/bin/puppet:5:in `<main>'
```

---

<div class="post-metadata">

### Author: ![tylerjl](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/tylerjl/32/44965_2.png) [@tylerjl](https://discuss.elastic.co/u/tylerjl)
#### Post date: [December 18, 2017, 4:16pm UTC](https://discuss.elastic.co/t/elasticsearch-puppet-module-issue/111567/4 "2017-12-18T16:16:55Z")

</div>

Interesting; the stack trace doesn't actually touch any parts of the Elasticsearch module, but instead just mentions normal Puppet components with the exception originating at `/etc/puppetlabs/code/environments/<our_environment_name>/modules/<our_module>/manifests/elasticsearch.pp:180:3`. Is there any possibility that the issue could be related to other parts of your module/manifest? There's no mention of any part of the Elasticsearch module that I could look into here.

---

<div class="post-metadata">

### Author: ![AYakimenko](https://avatars.discourse-cdn.com/v4/letter/a/e56c9b/32.png) [@AYakimenko](https://discuss.elastic.co/u/AYakimenko)
#### Post date: [December 19, 2017, 8:51am UTC](https://discuss.elastic.co/t/elasticsearch-puppet-module-issue/111567/5 "2017-12-19T08:51:18Z")

</div>

yes, agree that it's strange. But it works fine if I use  
`mod 'elastic-elasticsearch', '5.5.0'`  
in my Puppetfile without any changes in module/manifest:

```
class { 'elasticsearch':
    ensure => 'present',
    version => $el_version,
    package_pin => false,
    manage_repo => true,
    security_plugin => $security_plugin,
    jvm_options => $jvm_options,
    logging_template => "${module_name}/elasticsearch/log4j2.properties.erb",
    repo_version => $el_repo_version,
    datadir => [$el_datadir],
    logdir => $el_logdir,
    config => $es_config,
    restart_on_change => $restart_on_change,
    require => File[$dir],
 }

```

And as I said in the first message I also tried simplified definition:

```
class { 'elasticsearch':
   version => '6.0.0'
}

```

with the same result.

---

<div class="post-metadata">

### Author: ![tylerjl](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/tylerjl/32/44965_2.png) [@tylerjl](https://discuss.elastic.co/u/tylerjl)
#### Post date: [December 19, 2017, 4:36pm UTC](https://discuss.elastic.co/t/elasticsearch-puppet-module-issue/111567/6 "2017-12-19T16:36:20Z")

</div>

Is this setup using a Puppetmaster? The log output you included doesn't mention anything about the Elasticsearch module, but if the catalog is being compiled on the Puppetmaster, the master's logs should include some logging about why the catalog compilation failed.

---

<div class="post-metadata">

### Author: ![AYakimenko](https://avatars.discourse-cdn.com/v4/letter/a/e56c9b/32.png) [@AYakimenko](https://discuss.elastic.co/u/AYakimenko)
#### Post date: [December 19, 2017, 6:30pm UTC](https://discuss.elastic.co/t/elasticsearch-puppet-module-issue/111567/7 "2017-12-19T18:30:07Z")

</div>

Yes, it's Puppetmaster. I've checked maser's logs but didn't find anything intresting

---

<div class="post-metadata">

### Author: ![tylerjl](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/tylerjl/32/44965_2.png) [@tylerjl](https://discuss.elastic.co/u/tylerjl)
#### Post date: [December 19, 2017, 6:56pm UTC](https://discuss.elastic.co/t/elasticsearch-puppet-module-issue/111567/8 "2017-12-19T18:56:14Z")

</div>

Unfortunately that leaves us at a bit of a dead-end, as the acceptance tests in Travis-CI continue to pass against Elasticsearch 6.0 and 6.1 and there's nothing particularly different in the example 6.0 you provided that I could try to reproduce the issue with. If there's something different in your environment that I could try and replicate the issue with I could try that, but as it stands there's not much else to go off of.

---

<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: [January 16, 2018, 7:05pm UTC](https://discuss.elastic.co/t/elasticsearch-puppet-module-issue/111567/9 "2018-01-16T19:05:27Z")

</div>

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