Comments (8)
Solved in 7ad74a3
from puppet-elasticsearch.
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.
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.
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.
Hmm thats weird. never seen that issue in my tests.
which distro ?
from puppet-elasticsearch.
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.
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.
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)
- elasticsearch_keystore can't modify frozen String
- elasticsearch_keystore resource fails due to legacy instance code HOT 3
- Node facts not generated when Elasticsearch in cluster mode
- Could not evaluate: undefined method `join' for :name:Symbol HOT 2
- elasticsearch_plugin/ruby.rb wrong path to call plugin binary HOT 2
- ssl=true and version is not defined, gives an error HOT 1
- Setting an Elastic Version should be optional HOT 1
- New release, please HOT 1
- OpenSearch support ? HOT 1
- Elasticsearch API responded with: no handler found for uri [/_xpack/license?acknowledge=true] and method [PUT]
- File jvm.options in root is unmanaged/may be missing
- why was log4j2.properties.erb configuration commented ? HOT 1
- warnings when used with stlib 9. HOT 1
- fix lib directory permissions without changing the mode of files in the directory
- puppet-elastic_stack version HOT 1
- Use Elasticsearch 7+ as default for configuration HOT 1
- mediawiki needs 6.8.23 and I needed to change this
- Issues on the elasticsearch_component_template.rb and elasticsearch_index_template.rb HOT 2
- Problem with puppet CA and elasticsearch.keystore
- `bin/plugin` is used insead of `bin/elasticsearch-plugin` on the first run
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from puppet-elasticsearch.