GithubHelp home page GithubHelp logo

Comments (8)

electrical avatar electrical commented on August 20, 2024

Solved in 7ad74a3

from puppet-elasticsearch.

arowla avatar arowla commented on August 20, 2024

This doesn't seem to be working anymore. Elasticsearch will not start up on a fresh install of Ubuntu Precise. Steps to reproduce:

Vagrantfile:

Vagrant.configure("2") do |config|
  config.vm.box = "hashicorp/precise64"
  config.vm.hostname = 'vagrant.example.com'

  config.vm.provision :shell do |shell|
    # update Puppet to v3, install elasticsearch puppetforge module
    shell.inline = "
      wget https://apt.puppetlabs.com/puppetlabs-release-precise.deb;
      sudo dpkg -i puppetlabs-release-precise.deb;
      sudo aptitude -y update;
      sudo aptitude -y install puppet;
      mkdir -p /etc/puppet/modules;
      puppet module install elasticsearch-elasticsearch;"
  end

  config.vm.provision :puppet
end

manifests/default.pp:

class { 'elasticsearch':
  package_url => 'https://download.elasticsearch.org/elasticsearch/elasticsearch/elasticsearch-1.0.1.deb'
}

This will produce this error upon running vagrant up:

Error: Could not start Service[elasticsearch]: Execution of '/etc/init.d/elasticsearch start' returned 1:
Error: /Stage[main]/Elasticsearch::Service/Elasticsearch::Service::Init[elasticsearch]/Service[elasticsearch]/ensure: change from stopped to running failed: Could not start Service[elasticsearch]: Executi
on of '/etc/init.d/elasticsearch start' returned 1:
Warning: /Stage[main]/Elasticsearch/Anchor[elasticsearch::end]: Skipping because of failed dependencies

Logging into the system via vagrant ssh I find:

vagrant@vagrant:~$ sudo service elasticsearch start
Could not find any executable java binary. Please install java in your PATH or set JAVA_HOME
vagrant@vagrant:~$ sudo aptitude search java | grep ^i
[no results]

This is all fixed by adding the following in the Puppet manifest prior to the elasticsearch bit:

package { 'openjdk-7-jre-headless':
  ensure => present,
}

So I can only assume there has been a regression somewhere here.

from puppet-elasticsearch.

electrical avatar electrical commented on August 20, 2024

Hi,

java_install is defaulted to false, so you need to enable that manually.

class { 'elasticsearch':
  package_url => 'https://download.elasticsearch.org/elasticsearch/elasticsearch/elasticsearch-1.0.1.deb',
  java_install => true
}

from puppet-elasticsearch.

arowla avatar arowla commented on August 20, 2024

Thanks. Can't believe I missed that. However, it is not working for me. Now that I have enabled java_install => true, it is freezing during provisioning. Currently about ten minutes since last output. No errors.

/etc/puppet/modules
└─┬ elasticsearch-elasticsearch (v0.2.4)
  └── puppetlabs-stdlib (v4.1.0)
==> default: Running provisioner: puppet...
Running Puppet with default.pp...
stdin: is not a tty
Warning: Config file /etc/puppet/hiera.yaml not found, using Hiera defaults
Notice: Compiled catalog for vagrant.example.com in environment production in 0.54 seconds

from puppet-elasticsearch.

electrical avatar electrical commented on August 20, 2024

Hmm thats weird. never seen that issue in my tests.
which distro ?

from puppet-elasticsearch.

arowla avatar arowla commented on August 20, 2024

This is Ubuntu Precise 64. I've confirmed that it's not actually timing out, but it's taking nearly three times longer than it should. Here are the timings. At first I thought it might be due to a difference in Java 6 vs 7 (though I've confirmed it isn't), so I've included timings for the openjdk-X-jre-headless package in both versions 6 and 7.

Installing Java via the Elasticsearch module:
Java 6: 884 sec (15 min)
Java 7: 833 sec (14 min)

Installing Java and Elasticsearch separately, via the Puppet manifest:
Java 6: 369 sec (6 min)
Java 7: 213 sec (4 min)

These timings include the whole download and install of Java and Elasticsearch, but nothing else. A rather drastic difference between 4 minutes and 15 minutes. I ran across some Puppet tickets about slow downloads (https://projects.puppetlabs.com/issues/18573 and https://projects.puppetlabs.com/issues/18812), but it doesn't seem like they apply here. This could very well be a Puppet problem and not your problem, though.

from puppet-elasticsearch.

electrical avatar electrical commented on August 20, 2024

Wow, that is some large difference.
Can you check if there are large differences between packages that get installed?
perhaps i should make an other package default so it improves the runtime?

from puppet-elasticsearch.

dhonig avatar dhonig commented on August 20, 2024

For clarity and the edification enjoyment of all, this worked fine:
class { 'elasticsearch':
package_url => 'https://download.elasticsearch.org/elasticsearch/elasticsearch/elasticsearch-1.0.1.deb',
java_install => true
}

Aternatively, just install the open-jdk of your choice by using package {}

from puppet-elasticsearch.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.