deric / puppet-zookeeper Goto Github PK
View Code? Open in Web Editor NEWPuppet module for managing Apache ZooKeeper
Home Page: https://forge.puppetlabs.com/deric/zookeeper
License: Other
Puppet module for managing Apache ZooKeeper
Home Page: https://forge.puppetlabs.com/deric/zookeeper
License: Other
Not used properly... doh....
Hi there,
puppet-zookeeper/templates/zookeeper.service.erb
, highlighted in bold[Unit]
Want=
(should be Wants)
classpath
should include /usr/lib/zookeeper/lib/*:/usr/lib/zookeeper/zookeeper.jar
. Otherwise, systemd
could not start zookeeper-server.service
.Thank you very much.
Kind regards,
Tamama
Here is the manifest file to reproduce the problem on any Centos/7 VM.
site/profile/manifests/zookeeper.pp
class profile::zookeeper {
notify { '[profile::zookeeper] Starting ... ' : }
Package { provider => 'dnf' }
class { 'zookeeper' :
require => [ Class['::profile::base'] , Class['::profile::clouderarepo'] ] ,
client_ip => $::ipaddress_tun0 ,
client_port => 52181 ,
election_port => 52888 ,
leader_port => 53888 ,
packages => [ 'zookeeper' , 'zookeeper-server'] ,
service_name => 'zookeeper-server' ,
initialize_datastore => true ,
service_provider => 'systemd' ,
manage_service_file => true ,
manage_service => true ,
systemd_unit_after => 'network-online.target [email protected]' ,
systemd_unit_want => 'network-online.target [email protected]' ,
java_opts => '-cp "/usr/lib/zookeeper/lib/*:/usr/lib/zookeeper/zookeeper.jar"'
}
notify { '[profile::zookeeper] ... finished' : }
}
Hi Project!
I'd like to fathom the maintainer's opinions on a few things before writing code.
Repos: Right now for RPM based distros I've been using the cloudera repos for RPMs for installation. They give away their ZK rpm, so I'd like to propose work on params class to make that the default.
ID: Is there any aversion to assuming the hostname follows a standard naming pattern like myhost01, myhost02, myhost03? It should be pretty easy to grok the digits and make that the ID.
Systemd: If it's installed, why not prefer it?
Trying the archive installation, the Puppet run failed:
Info: Applying configuration version '00066f687102c86be6f1d20953babda4c3da6b15'
Notice: /Stage[main]/Zookeeper::Install/Package[java-1.7.0-openjdk-headless]/ensure: created
Notice: /Stage[main]/Zookeeper::Install::Archive/Archive[/opt/zookeeper-3.4.10.tar.gz]/ensure: download archive from http://apache.org/dist/zookeeper/zookeeper-3.4.10/zookeeper-3.4.10.tar.gz to /opt/zookeeper-3.4.10.tar.gz and extracted in /opt with cleanup
Info: /Stage[main]/Zookeeper::Install::Archive/Archive[/opt/zookeeper-3.4.10.tar.gz]: Scheduling refresh of Exec[chown_zookeeper_directory]
Notice: /Stage[main]/Zookeeper::Install::Archive/Exec[chown_zookeeper_directory]: Triggered 'refresh' from 1 events
Notice: /Stage[main]/Zookeeper::Install::Archive/File[/opt/zookeeper]/ensure: created
Error: Cannot create /etc/zookeeper/conf; parent directory /etc/zookeeper does not exist
Error: /Stage[main]/Zookeeper::Config/File[/etc/zookeeper/conf]/ensure: change from absent to directory failed: Cannot create /etc/zookeeper/conf; parent directory /etc/zookeeper does not exist
Should this module create the /etc/zookeeper
directory before trying to create the conf
sub-directory?
In order to address compatibility with various distributions and catch distribution specific issues acceptance tests are needed. So far Debian and RedHat platforms should be supported.
https://github.com/deric/puppet-zookeeper/blob/master/templates/zookeeper.service.erb#L5
Missing trailing single quote.
Result...
โ zookeeper.service
Loaded: error (Reason: Invalid argument)
Active: inactive (dead)
Dec 16 10:38:25 jt-mm systemd[1]: [/usr/lib/systemd/system/zookeeper.service:5] Trailing garbage, ignoring.
Dec 16 10:38:25 jt-mm systemd[1]: zookeeper.service lacks both ExecStart= and ExecStop= setting. Refusing.
Dec 16 10:39:45 jt-mm systemd[1]: [/usr/lib/systemd/system/zookeeper.service:5] Trailing garbage, ignoring.
Dec 16 10:39:45 jt-mm systemd[1]: zookeeper.service lacks both ExecStart= and ExecStop= setting. Refusing.
Dec 16 10:41:38 jt-mm systemd[1]: [/usr/lib/systemd/system/zookeeper.service:5] Trailing garbage, ignoring.
Dec 16 10:41:38 jt-mm systemd[1]: zookeeper.service lacks both ExecStart= and ExecStop= setting. Refusing.
Dec 16 10:46:51 jt-mm systemd[1]: [/usr/lib/systemd/system/zookeeper.service:5] Trailing garbage, ignoring.
Dec 16 10:46:51 jt-mm systemd[1]: zookeeper.service lacks both ExecStart= and ExecStop= setting. Refusing.
Dec 16 10:47:14 jt-mm systemd[1]: [/usr/lib/systemd/system/zookeeper.service:5] Trailing garbage, ignoring.
Dec 16 10:47:14 jt-mm systemd[1]: zookeeper.service lacks both ExecStart= and ExecStop= setting. Refusing.
Ubuntu 16.04 LTS
Puppet version 5.5.6
If the server has no domain set up (meaning the trusted fact $::domain is empty) then the module fails on params.pp L 150. This is because
The logfile of Zookeeper is not being written.
In my /var/log/messages i get this:
Oct 17 13:24:29 puppetdev-fabian01 java: java.io.FileNotFoundException: ./zookeeper.log (Permission denied)
In the log4j.properties, the zookeeper.log.dir
is set to .
So ./zookeeper.log
is legit.
In /etc/zookeeper/java.env
this is set as the logdir: ZOO_LOG_DIR=/var/log/zookeeper
but zookeeper seems to ignore this.
When I change the log4j template on my puppetmaster from this:
zookeeper.log.dir=.
to this
zookeeper.log.dir=<%= scope.lookupvar("zookeeper::log_dir") %>
It works fine.
I use a Satellite with zookeeper 3.4.10 compiled from source using this spec file: spec-file
Hi,
I tried to install Zookeeper on a Wheezy node, but the puppet module fails that the OS is not supported yet. After a little digging I found the error in the debian.pp file.
case $::operatingsystem {
'Debian': {
case $::lsbdistcodename {
'wheezy', 'squeeze': { # 3.3.5
$manual_clean = true
}
default: { # future releases
$manual_clean = false
}
}
}
'Ubuntu': {
case $::lsbdistcodename {
'precise': { # 3.3.5
$manual_clean = true
}
default: {
$manual_clean = false
}
}
default: {
fail ("Family: '${::osfamily}' OS: '${::operatingsystem}' is not supported yet")
}
}
The words Debian and Ubuntu should be between quotes, because it is a string that is been tested, think
Regards,
Benoit
The official zookeeper scripts load configuration environment variables from zkEnv.sh.
This module writes the configuration to "${::zookeeper::cfg_dir}/environment"
.
I want to ask if a PR that makes this configurable via a parameter will be accepted.
Thank you
Hi there,
I have this module failed on Centos 7 node (puppet latest):
Debug: /Stage[main]/Zookeeper::Config/File[/etc/zookeeper/conf/log4j.properties]: Autorequiring File[/etc/zookeeper/conf]
Info: Applying configuration version '1430293013'
Debug: Prefetching yum resources for package
Debug: Executing '/bin/rpm -qa --nosignature --nodigest --qf '%{NAME} %|EPOCH?{%{EPOCH}}:{0}| %{VERSION} %{RELEASE} %{ARCH}\n''
Debug: Executing '/bin/rpm -q zookeeper --nosignature --nodigest --qf %{NAME} %|EPOCH?{%{EPOCH}}:{0}| %{VERSION} %{RELEASE} %{ARCH}\n'
Debug: Executing '/bin/yum -d 0 -e 0 -y list zookeeper'
Error: Execution of '/bin/yum -d 0 -e 0 -y list zookeeper' returned 1: Error: No matching Packages to list
Error: /Stage[main]/Zookeeper::Os::Redhat/Package[zookeeper]/ensure: change from absent to present failed: Execution of '/bin/yum -d 0 -e 0 -y list zookeeper' returned 1: Error: No matching Packages to list
Notice: /Stage[main]/Zookeeper::Install/Anchor[zookeeper::install::end]: Dependency Package[zookeeper] has failures: true
Warning: /Stage[main]/Zookeeper::Install/Anchor[zookeeper::install::end]: Skipping because of failed dependencies
Notice: /Stage[main]/Zookeeper::Config/File[/etc/zookeeper/conf]: Dependency Package[zookeeper] has failures: true
Warning: /Stage[main]/Zookeeper::Config/File[/etc/zookeeper/conf]: Skipping because of failed dependencies
Notice: /Stage[main]/Zookeeper::Config/File[/etc/zookeeper/conf/environment]: Dependency Package[zookeeper] has failures: true
Warning: /Stage[main]/Zookeeper::Config/File[/etc/zookeeper/conf/environment]: Skipping because of failed dependencies
Notice: /Stage[main]/Zookeeper::Config/File[/etc/zookeeper/conf/log4j.properties]: Dependency Package[zookeeper] has failures: true
Warning: /Stage[main]/Zookeeper::Config/File[/etc/zookeeper/conf/log4j.properties]: Skipping because of failed dependencies
Notice: /Stage[main]/Zookeeper::Config/File[/var/lib/zookeeper]: Dependency Package[zookeeper] has failures: true
Warning: /Stage[main]/Zookeeper::Config/File[/var/lib/zookeeper]: Skipping because of failed dependencies
Notice: /Stage[main]/Zookeeper::Config/File[/etc/zookeeper/conf/zoo.cfg]: Dependency Package[zookeeper] has failures: true
Warning: /Stage[main]/Zookeeper::Config/File[/etc/zookeeper/conf/zoo.cfg]: Skipping because of failed dependencies
Notice: /Stage[main]/Zookeeper::Config/File[/etc/zookeeper/conf/myid]: Dependency Package[zookeeper] has failures: true
Warning: /Stage[main]/Zookeeper::Config/File[/etc/zookeeper/conf/myid]: Skipping because of failed dependencies
Notice: /Stage[main]/Zookeeper::Config/Zookeeper::Host[172.31.17.243]/Datacat_fragment[172.31.17.243]: Dependency Package[zookeeper] has failures: true
Warning: /Stage[main]/Zookeeper::Config/Zookeeper::Host[172.31.17.243]/Datacat_fragment[172.31.17.243]: Skipping because of failed dependencies
Notice: /Stage[main]/Zookeeper::Config/File[/var/lib/zookeeper/myid]: Dependency Package[zookeeper] has failures: true
Warning: /Stage[main]/Zookeeper::Config/File[/var/lib/zookeeper/myid]: Skipping because of failed dependencies
Notice: /Stage[main]/Zookeeper::Config/File[/var/log/zookeeper]: Dependency Package[zookeeper] has failures: true
Warning: /Stage[main]/Zookeeper::Config/File[/var/log/zookeeper]: Skipping because of failed dependencies
Notice: /Stage[main]/Zookeeper::Service/Service[zookeeper]: Dependency Package[zookeeper] has failures: true
Warning: /Stage[main]/Zookeeper::Service/Service[zookeeper]: Skipping because of failed dependencies
Notice: /Stage[main]/Zookeeper/Anchor[zookeeper::end]: Dependency Package[zookeeper] has failures: true
Warning: /Stage[main]/Zookeeper/Anchor[zookeeper::end]: Skipping because of failed dependencies
Debug: Finishing transaction 43122640
Debug: Storing state
Debug: Stored state in 0.04 seconds
Notice: Finished catalog run in 0.37 seconds
Debug: Using cached connection for https://puppet:8140
Debug: Caching connection for https://puppet:8140
Debug: Closing connection for https://puppet:8140
Currently the CLASSPATH
environment variable is reconfigured at multiple places, custom systemd
config looks like this:
ExecStart=/bin/sh -c 'set -x; \
. /etc/zookeeper/conf/environment; \
CLASSPATH="/usr/lib/zookeeper/zookeeper.jar:/usr/lib/zookeeper/lib/*:$CLASSPATH"; \
CLASSPATH="$([ -r /usr/lib/zookeeper/bin/zkEnv.sh ] && . /usr/lib/zookeeper/bin/zkEnv.sh ; echo $CLASSPATH)"; \
mkdir -p /var/log/zookeeper; \
$JAVA "-Dzookeeper.log.dir=/var/log/zookeeper" "-Dzookeeper.root.logger=$ZOO_LOG4J_PROP" -cp "$CLASSPATH" $JAVA_OPTS "$ZOOMAIN" "$ZOOCFG"'
in /etc/zookeeper/conf/environment
file is CLASSPATH
set only for archive
install method:
<% if scope.lookupvar('zookeeper::install_method') != 'archive' -%>
# TODO this is really ugly
# How to find out, which jars are needed?
# seems, that log4j requires the log4j.properties file to be in the classpath
CLASSPATH="$ZOOCFGDIR:/usr/share/java/jline.jar:/usr/share/java/log4j-1.2.jar:/usr/share/java/xercesImpl.jar:/usr/share/java/xmlParserAPIs.jar:/usr/share/java/netty.jar:/usr/share/java/slf4j-api.jar:/usr/share/java/slf4j-log4j12.jar:/usr/share/java/zookeeper.jar:$CLASSPATH"
<% end -%>
Each OS might have slightly different CLASSPATH
:
/usr/share/java/zookeeper.jar
/usr/lib/zookeeper/lib/*:/usr/lib/zookeeper/zookeeper.jar
Originally reported in #103.
Hi Deric,
Are you close to releasing 0.3.4 to the forge? I would like to use your module, but it fails when using --parser future
because of this line https://github.com/deric/puppet-zookeeper/blob/v0.3.3/manifests/os/debian.pp#L28
Thanks in advance
esnure_resource 'user' sets shell to /sbin/nologin
But on ubutnu Ubuntu 14.04.3 LTS nologin is located at /usr/sbin/nologin
dpkg -S /usr/sbin/nologin
login: /usr/sbin/nologin
so it fails when installing zookeeper:
Error: /Stage[main]/Zookeeper::Install/User[zookeeper]/shell: change from /bin/false to /sbin/nologin failed: Shell /sbin/nologin must exist
I fixed this by simply symlinking /usr/sbin/nologin to /sbin/nologin
The zookeeper docs say the myid
file should be in the dataDir but in config.pp
myid
is placed in the config directory
file { "${cfg_dir}/myid":
ensure => file,
content => template('zookeeper/conf/myid.erb'),
owner => $user,
group => $group,
mode => '0644',
require => File[$cfg_dir],
notify => Class['zookeeper::service'],
}
Is this intentional or by accident? I haven't been able to get a multiserver setup working with myid in the config directory.
https://github.com/deric/puppet-zookeeper/blob/master/templates/conf/zoo.cfg.erb#L30 generates lines of the form server.i with i counting up. Unless the i is also synchronized with the content of the servers myid file this is never generating a runnable configuration at all - the i in server.i and the content of the myid file need to be identical at all times.
So the approach documented in https://github.com/deric/puppet-zookeeper/#cluster-setup can only generate a valid configuration when you manually keep the order of ip numbers in " servers => ['192.168.1.1', '192.168.1.2', '192.168.1.3']" and the myids specified as zookeeper::id in hiera/host/$hostname synchronized. This is a very poor approach.
Also, you may never insert an ip into the servers array, you can only append at the moment. Not very helpful.
Hi.
I'm using PE 2016.4, and including your Zookeeper module. I've set the rollingfile_threshold
to "INFO"
, but for some reason, this parameter change never gets propagated through to the .erb file for the log4j.properties definition.
I've read through the Puppet code, and it looks perfectly correct. No idea why it isn't working for me.
For now, I've just modified the init.pp file to default to 'INFO' instead of 'ERROR', but obviously this is not an ideal solution. :) Any idea why this might be happening?
Thanks!
Chris
Hi guys,
If os family is RedHat, $environment_file
is assigned to env.java
in params.pp:50
.
Then a double file declaration will be produce if SASL is enabled, one in file.pp:67
an another one in sasl.pp:14
.
We have solved the problem assigning environment
to $environment_file
in params.pp:50
.
Cheers,
Daniel
hi
We have seen an issue (CentOS 7.1) in which ZK fails to start since the unit file is not dependent on the networking being available (that is 'network-online.target'). Because of that the process starts before the bond interfaces do and fails.
If this is agreed as a bug I am happy to provide a pull request with a fix.
Got error:
Error: Failed to apply catalog: Found 1 dependency cycle:
(Anchor[zookeeper::install::end] => Class[Zookeeper::Post_install] => Group[zookeeper] => File[/opt/zookeeper] => Class[Zookeeper::Install::Archive] => Anchor[zookeeper::install::end])
Hiera zookeeper yaml:
---
zookeeper::election_port: '2889'
zookeeper::leader_port: '3889'
zookeeper::install_java: true
zookeeper::java_package: 'java-1.8.0-openjdk-headless'
zookeeper::install_method: 'archive'
zookeeper::archive_version: '3.4.9'
classes:
- 'zookeeper'
Full puppet apply log:
Debug: Runtime environment: puppet_version=3.8.7, ruby_version=2.0.0, run_mode=user, default_encoding=UTF-8
XXX
Debug: importing '/etc/puppet/modules/zookeeper/manifests/install.pp' in environment production
Debug: Automatically imported zookeeper::install from zookeeper/install into production
Debug: importing '/etc/puppet/modules/zookeeper/manifests/install/repo.pp' in environment production
Debug: Automatically imported zookeeper::install::repo from zookeeper/install/repo into production
Debug: Resource package[java-1.8.0-openjdk-headless] was not determined to be defined
Debug: Create new resource package[java-1.8.0-openjdk-headless] with params {"ensure"=>"present", "allow_virtual"=>true, "before"=>Anchor[zookeeper::install::intermediate]{:name=>"zookeeper::install::intermediate"}, "require"=>Anchor[zookeeper::install::begin]{:name=>"zookeeper::install::begin"}}
Debug: importing '/etc/puppet/modules/zookeeper/manifests/install/archive.pp' in environment production
Debug: Automatically imported zookeeper::install::archive from zookeeper/install/archive into production
Debug: Evicting cache entry for environment 'production'
Debug: Caching environment 'production' (ttl = 0 sec)
Debug: Evicting cache entry for environment 'production'
Debug: Caching environment 'production' (ttl = 0 sec)
Debug: Evicting cache entry for environment 'production'
Debug: Caching environment 'production' (ttl = 0 sec)
Debug: Evicting cache entry for environment 'production'
Debug: Caching environment 'production' (ttl = 0 sec)
Debug: Evicting cache entry for environment 'production'
Debug: Caching environment 'production' (ttl = 0 sec)
Debug: importing '/etc/puppet/modules/zookeeper/manifests/post_install.pp' in environment production
Debug: Automatically imported zookeeper::post_install from zookeeper/post_install into production
Debug: Evicting cache entry for environment 'production'
Debug: Caching environment 'production' (ttl = 0 sec)
Debug: Resource group[zookeeper] was not determined to be defined
Debug: Create new resource group[zookeeper] with params {"ensure"=>"present"}
Debug: Evicting cache entry for environment 'production'
Debug: Caching environment 'production' (ttl = 0 sec)
Debug: Resource user[zookeeper] was not determined to be defined
Debug: Create new resource user[zookeeper] with params {"ensure"=>"present", "home"=>"/var/lib/zookeeper", "comment"=>"Zookeeper", "gid"=>"zookeeper", "shell"=>"/sbin/nologin", "require"=>Group[zookeeper]{:name=>"zookeeper"}}
Debug: importing '/etc/puppet/modules/zookeeper/manifests/config.pp' in environment production
Debug: Automatically imported zookeeper::config from zookeeper/config into production
Debug: Scope(Class[Zookeeper::Config]): Retrieving template zookeeper/conf/myid.erb
Debug: template[/etc/puppet/modules/zookeeper/templates/conf/myid.erb]: Bound template variables for /etc/puppet/modules/zookeeper/templates/conf/myid.erb in 0.00 seconds
Debug: template[/etc/puppet/modules/zookeeper/templates/conf/myid.erb]: Interpolated template /etc/puppet/modules/zookeeper/templates/conf/myid.erb in 0.00 seconds
Debug: Scope(Class[Zookeeper::Config]): Retrieving template zookeeper/conf/zoo.cfg.erb
Debug: template[/etc/puppet/modules/zookeeper/templates/conf/zoo.cfg.erb]: Bound template variables for /etc/puppet/modules/zookeeper/templates/conf/zoo.cfg.erb in 0.00 seconds
Debug: template[/etc/puppet/modules/zookeeper/templates/conf/zoo.cfg.erb]: Interpolated template /etc/puppet/modules/zookeeper/templates/conf/zoo.cfg.erb in 0.01 seconds
Debug: Scope(Class[Zookeeper::Config]): Retrieving template zookeeper/conf/environment.erb
Debug: template[/etc/puppet/modules/zookeeper/templates/conf/environment.erb]: Bound template variables for /etc/puppet/modules/zookeeper/templates/conf/environment.erb in 0.00 seconds
Debug: template[/etc/puppet/modules/zookeeper/templates/conf/environment.erb]: Interpolated template /etc/puppet/modules/zookeeper/templates/conf/environment.erb in 0.00 seconds
Debug: Scope(Class[Zookeeper::Config]): Retrieving template zookeeper/conf/log4j.properties.erb
Debug: template[/etc/puppet/modules/zookeeper/templates/conf/log4j.properties.erb]: Bound template variables for /etc/puppet/modules/zookeeper/templates/conf/log4j.properties.erb in 0.00 seconds
Debug: template[/etc/puppet/modules/zookeeper/templates/conf/log4j.properties.erb]: Interpolated template /etc/puppet/modules/zookeeper/templates/conf/log4j.properties.erb in 0.00 seconds
Debug: importing '/etc/puppet/modules/zookeeper/manifests/service.pp' in environment production
Debug: Automatically imported zookeeper::service from zookeeper/service into production
Debug: Adding relationship from Anchor[zookeeper::start] to Class[Zookeeper::Install] with 'before'
Debug: Adding relationship from Class[Zookeeper::Install] to Class[Zookeeper::Config] with 'before'
Notice: Compiled catalog for XXX in environment production in 0.83 seconds
Debug: Puppet::Type::Archive::ProviderWget: file wget does not exist
Debug: /File[/opt/zookeeper]/seluser: Found seluser default 'system_u' for /opt/zookeeper
Debug: /File[/opt/zookeeper]/selrole: Found selrole default 'object_r' for /opt/zookeeper
Debug: /File[/opt/zookeeper]/seltype: Found seltype default 'usr_t' for /opt/zookeeper
Debug: /File[/opt/zookeeper]/selrange: Found selrange default 's0' for /opt/zookeeper
Debug: Puppet::Type::Group::ProviderDirectoryservice: file /usr/bin/dscl does not exist
Debug: Failed to load library 'ldap' for feature 'ldap'
Debug: Puppet::Type::Group::ProviderLdap: feature ldap is missing
Debug: Puppet::Type::Group::ProviderPw: file pw does not exist
Debug: Puppet::Type::User::ProviderDirectoryservice: file /usr/bin/dsimport does not exist
Debug: Failed to load library 'ldap' for feature 'ldap'
Debug: Puppet::Type::User::ProviderLdap: feature ldap is missing
Debug: Puppet::Type::User::ProviderPw: file pw does not exist
Debug: Puppet::Type::User::ProviderUser_role_add: file roleadd does not exist
Debug: /File[/etc/zookeeper/conf]/seluser: Found seluser default 'system_u' for /etc/zookeeper/conf
Debug: /File[/etc/zookeeper/conf]/selrole: Found selrole default 'object_r' for /etc/zookeeper/conf
Debug: /File[/etc/zookeeper/conf]/seltype: Found seltype default 'etc_t' for /etc/zookeeper/conf
Debug: /File[/etc/zookeeper/conf]/selrange: Found selrange default 's0' for /etc/zookeeper/conf
Debug: /File[/var/log/zookeeper]/seluser: Found seluser default 'system_u' for /var/log/zookeeper
Debug: /File[/var/log/zookeeper]/selrole: Found selrole default 'object_r' for /var/log/zookeeper
Debug: /File[/var/log/zookeeper]/seltype: Found seltype default 'var_log_t' for /var/log/zookeeper
Debug: /File[/var/log/zookeeper]/selrange: Found selrange default 's0' for /var/log/zookeeper
Debug: /File[/var/lib/zookeeper]/seluser: Found seluser default 'system_u' for /var/lib/zookeeper
Debug: /File[/var/lib/zookeeper]/selrole: Found selrole default 'object_r' for /var/lib/zookeeper
Debug: /File[/var/lib/zookeeper]/seltype: Found seltype default 'var_lib_t' for /var/lib/zookeeper
Debug: /File[/var/lib/zookeeper]/selrange: Found selrange default 's0' for /var/lib/zookeeper
Debug: /File[/etc/zookeeper/conf/myid]/seluser: Found seluser default 'system_u' for /etc/zookeeper/conf/myid
Debug: /File[/etc/zookeeper/conf/myid]/selrole: Found selrole default 'object_r' for /etc/zookeeper/conf/myid
Debug: /File[/etc/zookeeper/conf/myid]/seltype: Found seltype default 'etc_t' for /etc/zookeeper/conf/myid
Debug: /File[/etc/zookeeper/conf/myid]/selrange: Found selrange default 's0' for /etc/zookeeper/conf/myid
Debug: /File[/var/lib/zookeeper/myid]/seluser: Found seluser default 'system_u' for /var/lib/zookeeper/myid
Debug: /File[/var/lib/zookeeper/myid]/selrole: Found selrole default 'object_r' for /var/lib/zookeeper/myid
Debug: /File[/var/lib/zookeeper/myid]/seltype: Found seltype default 'var_lib_t' for /var/lib/zookeeper/myid
Debug: /File[/var/lib/zookeeper/myid]/selrange: Found selrange default 's0' for /var/lib/zookeeper/myid
Debug: /File[/etc/zookeeper/conf/zoo.cfg]/seluser: Found seluser default 'system_u' for /etc/zookeeper/conf/zoo.cfg
Debug: /File[/etc/zookeeper/conf/zoo.cfg]/selrole: Found selrole default 'object_r' for /etc/zookeeper/conf/zoo.cfg
Debug: /File[/etc/zookeeper/conf/zoo.cfg]/seltype: Found seltype default 'etc_t' for /etc/zookeeper/conf/zoo.cfg
Debug: /File[/etc/zookeeper/conf/zoo.cfg]/selrange: Found selrange default 's0' for /etc/zookeeper/conf/zoo.cfg
Debug: /File[/etc/zookeeper/conf/java.env]/seluser: Found seluser default 'system_u' for /etc/zookeeper/conf/java.env
Debug: /File[/etc/zookeeper/conf/java.env]/selrole: Found selrole default 'object_r' for /etc/zookeeper/conf/java.env
Debug: /File[/etc/zookeeper/conf/java.env]/seltype: Found seltype default 'etc_t' for /etc/zookeeper/conf/java.env
Debug: /File[/etc/zookeeper/conf/java.env]/selrange: Found selrange default 's0' for /etc/zookeeper/conf/java.env
Debug: /File[/etc/zookeeper/conf/log4j.properties]/seluser: Found seluser default 'system_u' for /etc/zookeeper/conf/log4j.properties
Debug: /File[/etc/zookeeper/conf/log4j.properties]/selrole: Found selrole default 'object_r' for /etc/zookeeper/conf/log4j.properties
Debug: /File[/etc/zookeeper/conf/log4j.properties]/seltype: Found seltype default 'etc_t' for /etc/zookeeper/conf/log4j.properties
Debug: /File[/etc/zookeeper/conf/log4j.properties]/selrange: Found selrange default 's0' for /etc/zookeeper/conf/log4j.properties
Debug: Creating default schedules
Debug: Using settings: adding file resource 'confdir': 'File[/etc/puppet]{:path=>"/etc/puppet", :ensure=>:directory, :loglevel=>:debug, :links=>:follow, :backup=>false}'
Debug: Using settings: adding file resource 'vardir': 'File[/var/lib/puppet]{:path=>"/var/lib/puppet", :owner=>"puppet", :group=>"puppet", :ensure=>:directory, :loglevel=>:debug, :links=>:follow, :backup=>false}'
Debug: Using settings: adding file resource 'logdir': 'File[/var/log/puppet]{:path=>"/var/log/puppet", :mode=>"750", :owner=>"puppet", :group=>"puppet", :ensure=>:directory, :loglevel=>:debug, :links=>:follow, :backup=>false}'
Debug: Using settings: adding file resource 'statedir': 'File[/var/lib/puppet/state]{:path=>"/var/lib/puppet/state", :mode=>"1755", :ensure=>:directory, :loglevel=>:debug, :links=>:follow, :backup=>false}'
Debug: Using settings: adding file resource 'rundir': 'File[/var/run/puppet]{:path=>"/var/run/puppet", :mode=>"755", :owner=>"puppet", :group=>"puppet", :ensure=>:directory, :loglevel=>:debug, :links=>:follow, :backup=>false}'
Debug: Using settings: adding file resource 'libdir': 'File[/var/lib/puppet/lib]{:path=>"/var/lib/puppet/lib", :ensure=>:directory, :loglevel=>:debug, :links=>:follow, :backup=>false}'
Debug: Using settings: adding file resource 'hiera_config': 'File[/var/XXX/XXX-puppet/hieradata/hiera.yaml]{:path=>"/var/XXX/XXX-puppet/hieradata/hiera.yaml", :ensure=>:file, :loglevel=>:debug, :links=>:follow, :backup=>false}'
Debug: Using settings: adding file resource 'preview_outputdir': 'File[/var/lib/puppet/preview]{:path=>"/var/lib/puppet/preview", :mode=>"750", :owner=>"puppet", :group=>"puppet", :ensure=>:directory, :loglevel=>:debug, :links=>:follow, :backup=>false}'
Debug: Using settings: adding file resource 'certdir': 'File[/var/lib/puppet/ssl/certs]{:path=>"/var/lib/puppet/ssl/certs", :mode=>"755", :owner=>"puppet", :group=>"puppet", :ensure=>:directory, :loglevel=>:debug, :links=>:follow, :backup=>false}'
Debug: Using settings: adding file resource 'ssldir': 'File[/var/lib/puppet/ssl]{:path=>"/var/lib/puppet/ssl", :mode=>"771", :owner=>"puppet", :group=>"puppet", :ensure=>:directory, :loglevel=>:debug, :links=>:follow, :backup=>false}'
Debug: Using settings: adding file resource 'publickeydir': 'File[/var/lib/puppet/ssl/public_keys]{:path=>"/var/lib/puppet/ssl/public_keys", :mode=>"755", :owner=>"puppet", :group=>"puppet", :ensure=>:directory, :loglevel=>:debug, :links=>:follow, :backup=>false}'
Debug: Using settings: adding file resource 'requestdir': 'File[/var/lib/puppet/ssl/certificate_requests]{:path=>"/var/lib/puppet/ssl/certificate_requests", :mode=>"755", :owner=>"puppet", :group=>"puppet", :ensure=>:directory, :loglevel=>:debug, :links=>:follow, :backup=>false}'
Debug: Using settings: adding file resource 'privatekeydir': 'File[/var/lib/puppet/ssl/private_keys]{:path=>"/var/lib/puppet/ssl/private_keys", :mode=>"750", :owner=>"puppet", :group=>"puppet", :ensure=>:directory, :loglevel=>:debug, :links=>:follow, :backup=>false}'
Debug: Using settings: adding file resource 'privatedir': 'File[/var/lib/puppet/ssl/private]{:path=>"/var/lib/puppet/ssl/private", :mode=>"750", :owner=>"puppet", :group=>"puppet", :ensure=>:directory, :loglevel=>:debug, :links=>:follow, :backup=>false}'
Debug: Using settings: adding file resource 'statefile': 'File[/var/lib/puppet/state/state.yaml]{:path=>"/var/lib/puppet/state/state.yaml", :mode=>"660", :ensure=>:file, :loglevel=>:debug, :links=>:follow, :backup=>false}'
Debug: Using settings: adding file resource 'clientyamldir': 'File[/var/lib/puppet/client_yaml]{:path=>"/var/lib/puppet/client_yaml", :mode=>"750", :ensure=>:directory, :loglevel=>:debug, :links=>:follow, :backup=>false}'
Debug: Using settings: adding file resource 'client_datadir': 'File[/var/lib/puppet/client_data]{:path=>"/var/lib/puppet/client_data", :mode=>"750", :ensure=>:directory, :loglevel=>:debug, :links=>:follow, :backup=>false}'
Debug: Using settings: adding file resource 'clientbucketdir': 'File[/var/lib/puppet/clientbucket]{:path=>"/var/lib/puppet/clientbucket", :mode=>"750", :ensure=>:directory, :loglevel=>:debug, :links=>:follow, :backup=>false}'
Debug: Using settings: adding file resource 'lastrunfile': 'File[/var/lib/puppet/state/last_run_summary.yaml]{:path=>"/var/lib/puppet/state/last_run_summary.yaml", :mode=>"644", :ensure=>:file, :loglevel=>:debug, :links=>:follow, :backup=>false}'
Debug: Using settings: adding file resource 'lastrunreport': 'File[/var/lib/puppet/state/last_run_report.yaml]{:path=>"/var/lib/puppet/state/last_run_report.yaml", :mode=>"640", :ensure=>:file, :loglevel=>:debug, :links=>:follow, :backup=>false}'
Debug: Using settings: adding file resource 'graphdir': 'File[/var/lib/puppet/state/graphs]{:path=>"/var/lib/puppet/state/graphs", :ensure=>:directory, :loglevel=>:debug, :links=>:follow, :backup=>false}'
Debug: Using settings: adding file resource 'pluginfactdest': 'File[/var/lib/puppet/facts.d]{:path=>"/var/lib/puppet/facts.d", :ensure=>:directory, :loglevel=>:debug, :links=>:follow, :backup=>false}'
Debug: /File[/etc/puppet]/seluser: Found seluser default 'system_u' for /etc/puppet
Debug: /File[/etc/puppet]/selrole: Found selrole default 'object_r' for /etc/puppet
Debug: /File[/etc/puppet]/seltype: Found seltype default 'puppet_etc_t' for /etc/puppet
Debug: /File[/etc/puppet]/selrange: Found selrange default 's0' for /etc/puppet
Debug: /File[/var/lib/puppet]/seluser: Found seluser default 'system_u' for /var/lib/puppet
Debug: /File[/var/lib/puppet]/selrole: Found selrole default 'object_r' for /var/lib/puppet
Debug: /File[/var/lib/puppet]/seltype: Found seltype default 'puppet_var_lib_t' for /var/lib/puppet
Debug: /File[/var/lib/puppet]/selrange: Found selrange default 's0' for /var/lib/puppet
Debug: /File[/var/log/puppet]/seluser: Found seluser default 'system_u' for /var/log/puppet
Debug: /File[/var/log/puppet]/selrole: Found selrole default 'object_r' for /var/log/puppet
Debug: /File[/var/log/puppet]/seltype: Found seltype default 'puppet_log_t' for /var/log/puppet
Debug: /File[/var/log/puppet]/selrange: Found selrange default 's0' for /var/log/puppet
Debug: /File[/var/lib/puppet/state]/seluser: Found seluser default 'system_u' for /var/lib/puppet/state
Debug: /File[/var/lib/puppet/state]/selrole: Found selrole default 'object_r' for /var/lib/puppet/state
Debug: /File[/var/lib/puppet/state]/seltype: Found seltype default 'puppet_var_lib_t' for /var/lib/puppet/state
Debug: /File[/var/lib/puppet/state]/selrange: Found selrange default 's0' for /var/lib/puppet/state
Debug: /File[/var/run/puppet]/seluser: Found seluser default 'system_u' for /var/run/puppet
Debug: /File[/var/run/puppet]/selrole: Found selrole default 'object_r' for /var/run/puppet
Debug: /File[/var/run/puppet]/seltype: Found seltype default 'puppet_var_run_t' for /var/run/puppet
Debug: /File[/var/run/puppet]/selrange: Found selrange default 's0' for /var/run/puppet
Debug: /File[/var/lib/puppet/lib]/seluser: Found seluser default 'system_u' for /var/lib/puppet/lib
Debug: /File[/var/lib/puppet/lib]/selrole: Found selrole default 'object_r' for /var/lib/puppet/lib
Debug: /File[/var/lib/puppet/lib]/seltype: Found seltype default 'puppet_var_lib_t' for /var/lib/puppet/lib
Debug: /File[/var/lib/puppet/lib]/selrange: Found selrange default 's0' for /var/lib/puppet/lib
Debug: /File[/var/XXX/XXX-puppet/hieradata/hiera.yaml]/seluser: Found seluser default 'system_u' for /var/XXX/XXX-puppet/hieradata/hiera.yaml
Debug: /File[/var/XXX/XXX-puppet/hieradata/hiera.yaml]/selrole: Found selrole default 'object_r' for /var/XXX/XXX-puppet/hieradata/hiera.yaml
Debug: /File[/var/XXX/XXX-puppet/hieradata/hiera.yaml]/seltype: Found seltype default 'var_t' for /var/XXX/XXX-puppet/hieradata/hiera.yaml
Debug: /File[/var/XXX/XXX-puppet/hieradata/hiera.yaml]/selrange: Found selrange default 's0' for /var/XXX/XXX-puppet/hieradata/hiera.yaml
Debug: /File[/var/lib/puppet/preview]/seluser: Found seluser default 'system_u' for /var/lib/puppet/preview
Debug: /File[/var/lib/puppet/preview]/selrole: Found selrole default 'object_r' for /var/lib/puppet/preview
Debug: /File[/var/lib/puppet/preview]/seltype: Found seltype default 'puppet_var_lib_t' for /var/lib/puppet/preview
Debug: /File[/var/lib/puppet/preview]/selrange: Found selrange default 's0' for /var/lib/puppet/preview
Debug: /File[/var/lib/puppet/ssl/certs]/seluser: Found seluser default 'system_u' for /var/lib/puppet/ssl/certs
Debug: /File[/var/lib/puppet/ssl/certs]/selrole: Found selrole default 'object_r' for /var/lib/puppet/ssl/certs
Debug: /File[/var/lib/puppet/ssl/certs]/seltype: Found seltype default 'puppet_var_lib_t' for /var/lib/puppet/ssl/certs
Debug: /File[/var/lib/puppet/ssl/certs]/selrange: Found selrange default 's0' for /var/lib/puppet/ssl/certs
Debug: /File[/var/lib/puppet/ssl]/seluser: Found seluser default 'system_u' for /var/lib/puppet/ssl
Debug: /File[/var/lib/puppet/ssl]/selrole: Found selrole default 'object_r' for /var/lib/puppet/ssl
Debug: /File[/var/lib/puppet/ssl]/seltype: Found seltype default 'puppet_var_lib_t' for /var/lib/puppet/ssl
Debug: /File[/var/lib/puppet/ssl]/selrange: Found selrange default 's0' for /var/lib/puppet/ssl
Debug: /File[/var/lib/puppet/ssl/public_keys]/seluser: Found seluser default 'system_u' for /var/lib/puppet/ssl/public_keys
Debug: /File[/var/lib/puppet/ssl/public_keys]/selrole: Found selrole default 'object_r' for /var/lib/puppet/ssl/public_keys
Debug: /File[/var/lib/puppet/ssl/public_keys]/seltype: Found seltype default 'puppet_var_lib_t' for /var/lib/puppet/ssl/public_keys
Debug: /File[/var/lib/puppet/ssl/public_keys]/selrange: Found selrange default 's0' for /var/lib/puppet/ssl/public_keys
Debug: /File[/var/lib/puppet/ssl/certificate_requests]/seluser: Found seluser default 'system_u' for /var/lib/puppet/ssl/certificate_requests
Debug: /File[/var/lib/puppet/ssl/certificate_requests]/selrole: Found selrole default 'object_r' for /var/lib/puppet/ssl/certificate_requests
Debug: /File[/var/lib/puppet/ssl/certificate_requests]/seltype: Found seltype default 'puppet_var_lib_t' for /var/lib/puppet/ssl/certificate_requests
Debug: /File[/var/lib/puppet/ssl/certificate_requests]/selrange: Found selrange default 's0' for /var/lib/puppet/ssl/certificate_requests
Debug: /File[/var/lib/puppet/ssl/private_keys]/seluser: Found seluser default 'system_u' for /var/lib/puppet/ssl/private_keys
Debug: /File[/var/lib/puppet/ssl/private_keys]/selrole: Found selrole default 'object_r' for /var/lib/puppet/ssl/private_keys
Debug: /File[/var/lib/puppet/ssl/private_keys]/seltype: Found seltype default 'puppet_var_lib_t' for /var/lib/puppet/ssl/private_keys
Debug: /File[/var/lib/puppet/ssl/private_keys]/selrange: Found selrange default 's0' for /var/lib/puppet/ssl/private_keys
Debug: /File[/var/lib/puppet/ssl/private]/seluser: Found seluser default 'system_u' for /var/lib/puppet/ssl/private
Debug: /File[/var/lib/puppet/ssl/private]/selrole: Found selrole default 'object_r' for /var/lib/puppet/ssl/private
Debug: /File[/var/lib/puppet/ssl/private]/seltype: Found seltype default 'puppet_var_lib_t' for /var/lib/puppet/ssl/private
Debug: /File[/var/lib/puppet/ssl/private]/selrange: Found selrange default 's0' for /var/lib/puppet/ssl/private
Debug: /File[/var/lib/puppet/state/state.yaml]/seluser: Found seluser default 'system_u' for /var/lib/puppet/state/state.yaml
Debug: /File[/var/lib/puppet/state/state.yaml]/selrole: Found selrole default 'object_r' for /var/lib/puppet/state/state.yaml
Debug: /File[/var/lib/puppet/state/state.yaml]/seltype: Found seltype default 'puppet_var_lib_t' for /var/lib/puppet/state/state.yaml
Debug: /File[/var/lib/puppet/state/state.yaml]/selrange: Found selrange default 's0' for /var/lib/puppet/state/state.yaml
Debug: /File[/var/lib/puppet/client_yaml]/seluser: Found seluser default 'system_u' for /var/lib/puppet/client_yaml
Debug: /File[/var/lib/puppet/client_yaml]/selrole: Found selrole default 'object_r' for /var/lib/puppet/client_yaml
Debug: /File[/var/lib/puppet/client_yaml]/seltype: Found seltype default 'puppet_var_lib_t' for /var/lib/puppet/client_yaml
Debug: /File[/var/lib/puppet/client_yaml]/selrange: Found selrange default 's0' for /var/lib/puppet/client_yaml
Debug: /File[/var/lib/puppet/client_data]/seluser: Found seluser default 'system_u' for /var/lib/puppet/client_data
Debug: /File[/var/lib/puppet/client_data]/selrole: Found selrole default 'object_r' for /var/lib/puppet/client_data
Debug: /File[/var/lib/puppet/client_data]/seltype: Found seltype default 'puppet_var_lib_t' for /var/lib/puppet/client_data
Debug: /File[/var/lib/puppet/client_data]/selrange: Found selrange default 's0' for /var/lib/puppet/client_data
Debug: /File[/var/lib/puppet/clientbucket]/seluser: Found seluser default 'system_u' for /var/lib/puppet/clientbucket
Debug: /File[/var/lib/puppet/clientbucket]/selrole: Found selrole default 'object_r' for /var/lib/puppet/clientbucket
Debug: /File[/var/lib/puppet/clientbucket]/seltype: Found seltype default 'puppet_var_lib_t' for /var/lib/puppet/clientbucket
Debug: /File[/var/lib/puppet/clientbucket]/selrange: Found selrange default 's0' for /var/lib/puppet/clientbucket
Debug: /File[/var/lib/puppet/state/last_run_summary.yaml]/seluser: Found seluser default 'system_u' for /var/lib/puppet/state/last_run_summary.yaml
Debug: /File[/var/lib/puppet/state/last_run_summary.yaml]/selrole: Found selrole default 'object_r' for /var/lib/puppet/state/last_run_summary.yaml
Debug: /File[/var/lib/puppet/state/last_run_summary.yaml]/seltype: Found seltype default 'puppet_var_lib_t' for /var/lib/puppet/state/last_run_summary.yaml
Debug: /File[/var/lib/puppet/state/last_run_summary.yaml]/selrange: Found selrange default 's0' for /var/lib/puppet/state/last_run_summary.yaml
Debug: /File[/var/lib/puppet/state/last_run_report.yaml]/seluser: Found seluser default 'system_u' for /var/lib/puppet/state/last_run_report.yaml
Debug: /File[/var/lib/puppet/state/last_run_report.yaml]/selrole: Found selrole default 'object_r' for /var/lib/puppet/state/last_run_report.yaml
Debug: /File[/var/lib/puppet/state/last_run_report.yaml]/seltype: Found seltype default 'puppet_var_lib_t' for /var/lib/puppet/state/last_run_report.yaml
Debug: /File[/var/lib/puppet/state/last_run_report.yaml]/selrange: Found selrange default 's0' for /var/lib/puppet/state/last_run_report.yaml
Debug: /File[/var/lib/puppet/state/graphs]/seluser: Found seluser default 'system_u' for /var/lib/puppet/state/graphs
Debug: /File[/var/lib/puppet/state/graphs]/selrole: Found selrole default 'object_r' for /var/lib/puppet/state/graphs
Debug: /File[/var/lib/puppet/state/graphs]/seltype: Found seltype default 'puppet_var_lib_t' for /var/lib/puppet/state/graphs
Debug: /File[/var/lib/puppet/state/graphs]/selrange: Found selrange default 's0' for /var/lib/puppet/state/graphs
Debug: /File[/var/lib/puppet/facts.d]/seluser: Found seluser default 'system_u' for /var/lib/puppet/facts.d
Debug: /File[/var/lib/puppet/facts.d]/selrole: Found selrole default 'object_r' for /var/lib/puppet/facts.d
Debug: /File[/var/lib/puppet/facts.d]/seltype: Found seltype default 'puppet_var_lib_t' for /var/lib/puppet/facts.d
Debug: /File[/var/lib/puppet/facts.d]/selrange: Found selrange default 's0' for /var/lib/puppet/facts.d
Debug: /File[/var/lib/puppet/state]: Autorequiring File[/var/lib/puppet]
Debug: /File[/var/lib/puppet/lib]: Autorequiring File[/var/lib/puppet]
Debug: /File[/var/lib/puppet/preview]: Autorequiring File[/var/lib/puppet]
Debug: /File[/var/lib/puppet/ssl/certs]: Autorequiring File[/var/lib/puppet/ssl]
Debug: /File[/var/lib/puppet/ssl]: Autorequiring File[/var/lib/puppet]
Debug: /File[/var/lib/puppet/ssl/public_keys]: Autorequiring File[/var/lib/puppet/ssl]
Debug: /File[/var/lib/puppet/ssl/certificate_requests]: Autorequiring File[/var/lib/puppet/ssl]
Debug: /File[/var/lib/puppet/ssl/private_keys]: Autorequiring File[/var/lib/puppet/ssl]
Debug: /File[/var/lib/puppet/ssl/private]: Autorequiring File[/var/lib/puppet/ssl]
Debug: /File[/var/lib/puppet/state/state.yaml]: Autorequiring File[/var/lib/puppet/state]
Debug: /File[/var/lib/puppet/client_yaml]: Autorequiring File[/var/lib/puppet]
Debug: /File[/var/lib/puppet/client_data]: Autorequiring File[/var/lib/puppet]
Debug: /File[/var/lib/puppet/clientbucket]: Autorequiring File[/var/lib/puppet]
Debug: /File[/var/lib/puppet/state/last_run_summary.yaml]: Autorequiring File[/var/lib/puppet/state]
Debug: /File[/var/lib/puppet/state/last_run_report.yaml]: Autorequiring File[/var/lib/puppet/state]
Debug: /File[/var/lib/puppet/state/graphs]: Autorequiring File[/var/lib/puppet/state]
Debug: /File[/var/lib/puppet/facts.d]: Autorequiring File[/var/lib/puppet]
Debug: /File[/var/lib/puppet/state/last_run_report.yaml]/seluser: seluser changed 'unconfined_u' to 'system_u'
Debug: /File[/var/lib/puppet/state/state.yaml]/seluser: seluser changed 'unconfined_u' to 'system_u'
Debug: /File[/var/lib/puppet/state/last_run_summary.yaml]/seluser: seluser changed 'unconfined_u' to 'system_u'
Debug: Finishing transaction 31670620
Debug: Loaded state in 0.00 seconds
Debug: Loaded state in 0.00 seconds
Debug: /Stage[main]/Zookeeper/Anchor[zookeeper::start]/before: requires Class[Zookeeper::Install]
Debug: /Stage[main]/Zookeeper::Install/before: requires Class[Zookeeper::Config]
Debug: /Stage[main]/Zookeeper::Install::Repo/require: requires Anchor[zookeeper::install::begin]
Debug: /Stage[main]/Zookeeper::Install/Package[java-1.8.0-openjdk-headless]/require: requires Anchor[zookeeper::install::begin]
Debug: /Stage[main]/Zookeeper::Install/Package[java-1.8.0-openjdk-headless]/before: requires Anchor[zookeeper::install::intermediate]
Debug: /Stage[main]/Zookeeper::Install::Archive/require: requires Anchor[zookeeper::install::intermediate]
Debug: /Stage[main]/Zookeeper::Install::Archive/before: requires Anchor[zookeeper::install::end]
Debug: /Stage[main]/Zookeeper::Install::Archive/Archive[/opt/zookeeper-3.4.9.tar.gz]/notify: subscribes to Exec[chown_zookeeper_directory]
Debug: /Stage[main]/Zookeeper::Install::Archive/Exec[chown_zookeeper_directory]/require: requires Archive[/opt/zookeeper-3.4.9.tar.gz]
Debug: /Stage[main]/Zookeeper::Install::Archive/File[/opt/zookeeper]/require: requires Archive[/opt/zookeeper-3.4.9.tar.gz]
Debug: /Stage[main]/Zookeeper::Post_install/require: requires Anchor[zookeeper::install::end]
Debug: /Stage[main]/Zookeeper::Post_install/User[zookeeper]/require: requires Group[zookeeper]
Debug: /Stage[main]/Zookeeper::Config/require: requires Class[Zookeeper::Install]
Debug: /Stage[main]/Zookeeper::Config/File[/etc/zookeeper/conf/myid]/require: requires File[/etc/zookeeper/conf]
Debug: /Stage[main]/Zookeeper::Config/File[/var/lib/zookeeper/myid]/require: requires File[/etc/zookeeper/conf/myid]
Debug: /Stage[main]/Zookeeper::Service/require: requires Class[Zookeeper::Config]
Debug: /Stage[main]/Zookeeper::Service/require: requires Class[Zookeeper::Install]
Debug: /Stage[main]/Zookeeper::Service/before: requires Anchor[zookeeper::end]
Debug: /Stage[main]/Zookeeper::Service/Service[zookeeper-server]/require: requires Class[Zookeeper::Install]
Debug: /Stage[main]/Zookeeper::Service/Service[zookeeper-server]/require: requires File[/etc/zookeeper/conf/zoo.cfg]
Debug: /Stage[main]/Zookeeper::Service/Service[zookeeper-server]/subscribe: subscribes to File[/etc/zookeeper/conf/myid]
Debug: /Stage[main]/Zookeeper::Service/Service[zookeeper-server]/subscribe: subscribes to File[/etc/zookeeper/conf/zoo.cfg]
Debug: /Stage[main]/Zookeeper::Service/Service[zookeeper-server]/subscribe: subscribes to File[/etc/zookeeper/conf/java.env]
Debug: /Stage[main]/Zookeeper::Service/Service[zookeeper-server]/subscribe: subscribes to File[/etc/zookeeper/conf/log4j.properties]
Debug: /Stage[main]/Zookeeper::Install::Archive/File[/opt/zookeeper]: Autorequiring User[zookeeper]
Debug: /Stage[main]/Zookeeper::Install::Archive/File[/opt/zookeeper]: Autorequiring Group[zookeeper]
Debug: /Stage[main]/Zookeeper::Config/File[/etc/zookeeper/conf]: Autorequiring User[zookeeper]
Debug: /Stage[main]/Zookeeper::Config/File[/etc/zookeeper/conf]: Autorequiring Group[zookeeper]
Debug: /Stage[main]/Zookeeper::Config/File[/var/log/zookeeper]: Autorequiring User[zookeeper]
Debug: /Stage[main]/Zookeeper::Config/File[/var/log/zookeeper]: Autorequiring Group[zookeeper]
Debug: /Stage[main]/Zookeeper::Config/File[/var/lib/zookeeper]: Autorequiring User[zookeeper]
Debug: /Stage[main]/Zookeeper::Config/File[/var/lib/zookeeper]: Autorequiring Group[zookeeper]
Debug: /Stage[main]/Zookeeper::Config/File[/etc/zookeeper/conf/myid]: Autorequiring User[zookeeper]
Debug: /Stage[main]/Zookeeper::Config/File[/etc/zookeeper/conf/myid]: Autorequiring Group[zookeeper]
Debug: /Stage[main]/Zookeeper::Config/File[/var/lib/zookeeper/myid]: Autorequiring File[/var/lib/zookeeper]
Debug: /Stage[main]/Zookeeper::Config/File[/etc/zookeeper/conf/zoo.cfg]: Autorequiring File[/etc/zookeeper/conf]
Debug: /Stage[main]/Zookeeper::Config/File[/etc/zookeeper/conf/zoo.cfg]: Autorequiring User[zookeeper]
Debug: /Stage[main]/Zookeeper::Config/File[/etc/zookeeper/conf/zoo.cfg]: Autorequiring Group[zookeeper]
Debug: /Stage[main]/Zookeeper::Config/File[/etc/zookeeper/conf/java.env]: Autorequiring File[/etc/zookeeper/conf]
Debug: /Stage[main]/Zookeeper::Config/File[/etc/zookeeper/conf/java.env]: Autorequiring User[zookeeper]
Debug: /Stage[main]/Zookeeper::Config/File[/etc/zookeeper/conf/java.env]: Autorequiring Group[zookeeper]
Debug: /Stage[main]/Zookeeper::Config/File[/etc/zookeeper/conf/log4j.properties]: Autorequiring File[/etc/zookeeper/conf]
Debug: /Stage[main]/Zookeeper::Config/File[/etc/zookeeper/conf/log4j.properties]: Autorequiring User[zookeeper]
Debug: /Stage[main]/Zookeeper::Config/File[/etc/zookeeper/conf/log4j.properties]: Autorequiring Group[zookeeper]
Info: Applying configuration version '1484327675'
Debug: Storing state
Debug: Stored state in 0.01 seconds
Error: Failed to apply catalog: Found 1 dependency cycle:
(Anchor[zookeeper::install::end] => Class[Zookeeper::Post_install] => Group[zookeeper] => File[/opt/zookeeper] => Class[Zookeeper::Install::Archive] => Anchor[zookeeper::install::end])
Try the '--graph' option and opening the resulting '.dot' file in OmniGraffle or GraphViz
Since 885efc2 (I think), the ensure
value passed to the zookeeper
class doesn't mean the same thing it did. Before, the ensure
value was only passed to the package (at least on Ubuntu 14.04), which meant you could pass it interesting values such as installed
, purged
, 3.4.5+dfsg-1
, etc. This is no longer possible as the ensure
value is also used for the creation of the zookeeper user/group in zookeeper::post_install
. The possible values are now limited to present
and absent
.
I'd like to be able to specify the ensure
value just for the package as it makes it possible to ensure that a certain version of Zookeeper is installed.
The following example shows how to configure a system with three groups of three servers each:
group.1=1:2:3
group.2=4:5:6
group.3=7:8:9
weight.1=1
weight.2=1
weight.3=1
weight.4=1
weight.5=1
weight.6=1
weight.7=1
weight.8=1
weight.9=1
When running the system, we are able to form a quorum once we have a majority of votes from a majority of non-zero-weight groups. Groups that have zero weight are discarded and not considered when forming quorums. Looking at the example, we are able to form a quorum once we have votes from at least two servers from each of two different groups.
from ZooKeeper docs.
I did a fresh install of zookeeper using this module and noticed that logging is not working. Looking into the log4j.properties files I see that there are variables being called that are not defined. I checked with the default configuration from Apache and there is a chunk of variables missing from the erb file.
generated environment file does not work for debian strech /systemd launch
variables are not taken into account, leading java process to be launched with variable names instead of content, for instance '$ZOOCFGDIR/zoo.cfg'
real fix : use systemd environment variables (is hardcoding them into service script better than in config file ? ;-) )
current fix : see attached patch to remove variable references in environment : $CLASSPATH and $ZOOCFGDIR
works fine with 0.7.5 and this patch on debian stretch amd64
all of them get myID = 1
class { '::zookeeper':
servers => ['x', 'y', 'z''],
client_ip => $::ipaddress_eth0,
election_port => 2889,
leader_port => 3889,
require => Class['java'],
}
shouldn't this be automated? instead I need to create hierarchy which is for me not needed, or am I doing sth wrong?
See https://issues.apache.org/jira/browse/ZOOKEEPER-1030
A client connection limit of 10 is very low and it's quite easy to hit this limit without realising it.
Although 1.8.7 is long past its end of life it seems to be still used (see #71). 8a9d837 uses with_index
method that was introduced in 1.9.3.
Hi, So I installed the puppet module and I have this :
class { 'zookeeper':
election_port => 2889,
leader_port => 3889,
servers => {
1 => '10.0.1.2',
2 => '10.0.1.3',
3 => '10.0.1.4',
},
}
Everything gets installed but then it does not start and I donยดt get any log files. Iยดm on Ubuntu 16.04.1 LTS How Can I debug this ?
When checking versions the V0.7.7 isn't listed as the latest release:
https://github.com/deric/puppet-zookeeper/releases/tag/v0.7.7
Also the Puppet Forge doesn't show 0.7.6 as the latest version.
Hi Deric,
I'm trying to upgrade deric-zookeeper from (v0.7.2 -> v0.8.0) and seeing below error. Can you please help here
[[email protected] bharaths]# puppet module upgrade deric-zookeeper --modulepath=/etc/puppetlabs/code/environments/bharaths/site
Notice: Preparing to upgrade 'deric-zookeeper' ...
Notice: Found 'deric-zookeeper' (v0.7.2) in /etc/puppetlabs/code/environments/bharaths/site ...
Notice: Downloading from https://forgeapi.puppet.com ...
Error: Could not upgrade module 'deric-zookeeper' (v0.7.2 -> latest)
There are 6 newer versions
No combination of dependency upgrades would satisfy all dependencies
Dependencies will not be automatically upgraded across major versions
Upgrading one or more of these modules may permit the upgrade to succeed:
- puppetlabs-stdlib
- puppet-archive
- puppetlabs-pe_gem
- richardc-datacat
Use puppet module upgrade --force
to upgrade only this module
I'm using this module with the default settings to start a cluster:
class { 'zookeeper':
service_provider => "systemd",
manage_service_file => false,
servers => {
1 => 'ip-10-0-8-10',
2 => 'ip-10-0-16-10',
3 => 'ip-10-0-24-10',
},
}
However, zk fails to come up in quorum mode, instead it comes up in standalone. The root cause of this is something blocking on :2181, and zk complains accordingly:
2017-04-15 06:37:57,711 [myid:1] - INFO [main:NIOServerCnxnFactory@89] - binding to port 0.0.0.0/0.0.0.0:2181
2017-04-15 06:37:57,712 [myid:1] - ERROR [main:QuorumPeerMain@89] - Unexpected exception, exiting abnormally
java.net.BindException: Address already in use
My zoo.cfg:
# .. cut ..
clientPort=2181
server.1=ip-10-0-8-10:2888:3888
server.2=ip-10-0-16-10:2888:3888
server.3=ip-10-0-24-10:2888:3888
Looking at the process table, I can see something is blocking on 2181, and it's a java process calling zkServer. I don't think this is the intended behavior, and I'm not sure what is starting it. This is a brand new host, with nothing on it - I'm only applying this module to it so I assume something is happening with how the init script is built, but that's an arm chair guess.
This only happens when I first run the module. Once I kill the lone zk process and execute systemctl restart zookeeper
things come back up as I'd expect.
This is running on Ubuntu 16.04 on AWS.
Any help on this greatly appreciated. Thanks in advance.
I have tried many ways to prevent the package openjdk-8-jre-headless
from installing including setting the parameter install_java => false
to class ordering to banning the package in Ubuntu, yet somehow invariably the zookeeper class installs it, causes the service to start using this openjdk in a standalone mode and then causes the zookeeper java process to hang. Only when I manually touch the server and kill the initial standalone process can I restart and have the service use the oracle jdk I have installed. Why is this?
Hello, I'm using this module with
librarian-puppet (1.5.0)
puppet --version
3.8.2
ruby -v
ruby 1.8.7 (2013-06-27 patchlevel 374) [x86_64-linux]
Install goes well rpm -qa | grep zookeeper-server zookeeper-server-3.4.5+cdh5.8.0+94-1.cdh5.8.0.p0.76.el6.x86_64
is a Red Hat Enterprise Linux Server release 6.4 version, but when looking at file /etc/init.d/zookeeper-server
file on line 28 I noticed a blank line like this
pidfile=
I see you are passing the template pidfile=<%= @pid_path %>
the value should be
pidfile="/var/run/$prog.pid"
Here is the manifest .
class { 'zookeeper':
repo => 'cloudera',
cdhver => '5',
packages => ['zookeeper', 'zookeeper-server'],
manage_service => true,
service_provider => 'init',
manage_service_file => true,
require => Class['jdk_oracle']
}
Thanks for your help.
Hi Deric,
I am working on Vagrant with puppet for zookeeper installation.
While on Ubuntu-14.04 the zookeeper version that got installed was 3.4.5, but the version installed on Ubuntu-12.04 was 3.3.5.
I needed to use zookeeper version above 3.4. Do we have a way to specify the same.
And why the zookeeper versions are different on different OS version, even though I did not specify the version explicitly.
Images used on vagrant:
puppetlabs/ubuntu-12.04-64-puppet
puppetlabs/ubuntu-14.04-64-puppet
config.vm.provision :shell do |shell|
shell.inline = "puppet module install puppetlabs-apt;
puppet module install deric-zookeeper;
exit 0"
Puppet configuration:
exec { 'update-apt-packages':
command => '/usr/bin/apt-get update -y',
}
class { 'zookeeper':
client_ip => $::ipaddress_lo,
require => Exec['update-apt-packages']
}
Any help is appreciated.
regards,
Jose
Hello Team,
I'm installing this module to a docker container OS Centro 7, so I used repo => 'cloudera', cdhver => '5',
But I want to set manage_service => false
, so zookeeper the service is not started when installing the module.
My code look like this .
class { 'zookeeper':
repo => 'cloudera',
cdhver => '5',
packages => ['zookeeper', 'zookeeper-server'],
manage_service => false,
}
Getting this when doing so .
Warning: Could not find resource 'Class[Zookeeper::Service]' in parameter 'notify'
(at /tmp/puppet/modules/zookeeper/manifests/config.pp:115)
Notice: Compiled catalog for f77e60ad5dfc.personal.corp in environment production in 1.39 seconds
Debug: Creating default schedules
Error: Could not find dependent Class[Zookeeper::Service] for File[/etc/zookeeper/conf/myid] at /tmp/puppet/modules/zookeeper/manifests/config.pp:108
Not sure if it is a bug. But I also read that the default is set to true (so puppet will ensure that the service is running).
When I use ubuntu 14.04 and 'upstart' as service provider, the init script is not created, so puppet fails.
Then, If I select other provider, the script is created but not working.
This is my conf:
class { '::zookeeper':
id => $_id,
servers => $_servers,
install_java => true,
java_package => $java_package,
packages => ['zookeeper', 'zookeeperd'],
service_name => 'zookeeper',
initialize_datastore => false,
manage_service_file => true,
service_provider => 'upstart',
install_method => 'archive',
archive_version => '3.4.11',
archive_install_dir => '/opt',
ensure_cron => false,
snap_retain_count => '5',
purge_interval => '3',
restart_on_change => false
}
I think that we are missing on puppet-zookeeper/manifests/service.pp
line 20 the provider upstart?
We are using upstart instead of systemd
Using ubuntu 14.04
Thanks
In https://github.com/deric/puppet-zookeeper/#observers you say that observers can be listed as
observers => ['192.168.1.4', '192.168.1.5']
You do not highlight that observers ALSO need to be listed as "servers". You code does a "if @observers.include? h", though, so observer ips need to be listed twice, as servers and as observers.
I'm getting a failure when installing zookeeper along with zookeeper-service and setting "initialize_datastore" to "true". It seems that puppet is trying to start the service before the initialization has run.
I believe the reason is that "initialize_datastore" step relies on the absense of ${datastore}/myid, but that is already created earlier in the process. Modifying this step to the following seems to work:
# Initialize the datastore if required
if $initialize_datastore {
exec { 'initialize_datastore':
command => "/usr/bin/zookeeper-server-initialize --myid=${id}",
user => $user,
creates => "${datastore}/version-2",
require => File[$datastore],
}
}
See Pull Request #23
Hi,
zkEnv.sh set the ZOO_LOG4J_PROP environment variable (which in turn can be overridden from the environment file) however zookeeper.service ignores that value as it is hard-coded to:
-Dzookeeper.root.logger=INFO,CONSOLE
While it should have been:
-Dzookeeper.root.logger=${ZOO_LOG4J_PROP}
This PR #35 add support for cloudera's cdh5
Hello
We experience an issue where Puppet runs take over 1700 seconds on our zookeeper instances. We found out Puppet's state.yaml is over 500MB in size due to a file resource managing $datastore recursively in config.pp:
file { $datastore:
ensure => directory,
owner => $user,
group => $group,
mode => '0644',
recurse => true,
}
Our state.yaml contains mostly ZooKeeper snapshots:
File[/var/lib/zookeeper/version-2/snapshot.18730c54a5]:
!ruby/sym checked: 2016-01-07 18:40:26.182027 -05:00
File[/var/lib/zookeeper/version-2/log.17d2e5191f]:
!ruby/sym checked: 2015-12-29 05:17:05.593017 -05:00
File[/var/lib/zookeeper/version-2/snapshot.139d2c865a]:
!ruby/sym checked: 2015-10-26 17:17:32.388460 -05:00
File[/var/lib/zookeeper/version-2/snapshot.170f6fdcc1]:
Seems like Puppet keeps state.yaml entries forever, even if the file was already deleted: https://tickets.puppetlabs.com/browse/PUP-3647
Is there any specific reason for managing $datastore recursively?
I got following error when starting the zookeeper.
2016-02-16 01:46:56 +0000 Puppet (debug): Executing: '/sbin/status zookeeper'
2016-02-16 01:46:56 +0000 Puppet (debug): Executing: '/sbin/initctl --version'
2016-02-16 01:46:56 +0000 Puppet (debug): Executing: '/sbin/start zookeeper'
2016-02-16 01:46:56 +0000 Puppet (err): Could not start Service[zookeeper]: Execution of '/sbin/start zookeeper' returned 1: start: Job failed to start
/var/lib/gems/2.0.0/gems/puppet-4.3.2/lib/puppet/util/execution.rb:232:in `execute'
/var/lib/gems/2.0.0/gems/puppet-4.3.2/lib/puppet/provider.rb:102:in `execute'
/var/lib/gems/2.0.0/gems/puppet-4.3.2/lib/puppet/provider/service/service.rb:25:in `texecute'
/var/lib/gems/2.0.0/gems/puppet-4.3.2/lib/puppet/provider/service/init.rb:172:in `texecute'
/var/lib/gems/2.0.0/gems/puppet-4.3.2/lib/puppet/provider/service/service.rb:39:in `ucommand'
/var/lib/gems/2.0.0/gems/puppet-4.3.2/lib/puppet/provider/service/base.rb:80:in `start'
/var/lib/gems/2.0.0/gems/puppet-4.3.2/lib/puppet/type/service.rb:92:in `block (3 levels) in <module:Puppet>'
/var/lib/gems/2.0.0/gems/puppet-4.3.2/lib/puppet/property.rb:427:in `set'
/var/lib/gems/2.0.0/gems/puppet-4.3.2/lib/puppet/property.rb:501:in `sync'
/var/lib/gems/2.0.0/gems/puppet-4.3.2/lib/puppet/type/service.rb:103:in `sync'
/var/lib/gems/2.0.0/gems/puppet-4.3.2/lib/puppet/transaction/resource_harness.rb:214:in `sync'
/var/lib/gems/2.0.0/gems/puppet-4.3.2/lib/puppet/transaction/resource_harness.rb:139:in `sync_if_needed'
/var/lib/gems/2.0.0/gems/puppet-4.3.2/lib/puppet/transaction/resource_harness.rb:81:in `perform_changes'
/var/lib/gems/2.0.0/gems/puppet-4.3.2/lib/puppet/transaction/resource_harness.rb:20:in `evaluate'
/var/lib/gems/2.0.0/gems/puppet-4.3.2/lib/puppet/transaction.rb:207:in `apply'
/var/lib/gems/2.0.0/gems/puppet-4.3.2/lib/puppet/transaction.rb:223:in `eval_resource'
/var/lib/gems/2.0.0/gems/puppet-4.3.2/lib/puppet/transaction.rb:150:in `call'
/var/lib/gems/2.0.0/gems/puppet-4.3.2/lib/puppet/transaction.rb:150:in `block (2 levels) in evaluate'
/var/lib/gems/2.0.0/gems/puppet-4.3.2/lib/puppet/util.rb:292:in `block in thinmark'
/usr/lib/ruby/2.0.0/benchmark.rb:296:in `realtime'
/var/lib/gems/2.0.0/gems/puppet-4.3.2/lib/puppet/util.rb:291:in `thinmark'
/var/lib/gems/2.0.0/gems/puppet-4.3.2/lib/puppet/transaction.rb:150:in `block in evaluate'
/var/lib/gems/2.0.0/gems/puppet-4.3.2/lib/puppet/graph/relationship_graph.rb:118:in `traverse'
/var/lib/gems/2.0.0/gems/puppet-4.3.2/lib/puppet/transaction.rb:141:in `evaluate'
/var/lib/gems/2.0.0/gems/puppet-4.3.2/lib/puppet/resource/catalog.rb:202:in `block in apply'
/var/lib/gems/2.0.0/gems/puppet-4.3.2/lib/puppet/util/log.rb:153:in `with_destination'
/var/lib/gems/2.0.0/gems/puppet-4.3.2/lib/puppet/transaction/report.rb:107:in `as_logging_destination'
/var/lib/gems/2.0.0/gems/puppet-4.3.2/lib/puppet/resource/catalog.rb:201:in `apply'
/var/lib/gems/2.0.0/gems/puppet-4.3.2/lib/puppet/configurer.rb:119:in `block in apply_catalog'
/var/lib/gems/2.0.0/gems/puppet-4.3.2/lib/puppet/util.rb:129:in `block in benchmark'
/usr/lib/ruby/2.0.0/benchmark.rb:296:in `realtime'
/var/lib/gems/2.0.0/gems/puppet-4.3.2/lib/puppet/util.rb:128:in `benchmark'
/var/lib/gems/2.0.0/gems/puppet-4.3.2/lib/puppet/configurer.rb:118:in `apply_catalog'
/var/lib/gems/2.0.0/gems/puppet-4.3.2/lib/puppet/configurer.rb:232:in `run_internal'
/var/lib/gems/2.0.0/gems/puppet-4.3.2/lib/puppet/configurer.rb:134:in `block in run'
/var/lib/gems/2.0.0/gems/puppet-4.3.2/lib/puppet/context.rb:65:in `override'
/var/lib/gems/2.0.0/gems/puppet-4.3.2/lib/puppet.rb:240:in `override'
/var/lib/gems/2.0.0/gems/puppet-4.3.2/lib/puppet/configurer.rb:133:in `run'
/var/lib/gems/2.0.0/gems/puppet-4.3.2/lib/puppet/application/apply.rb:347:in `apply_catalog'
/var/lib/gems/2.0.0/gems/puppet-4.3.2/lib/puppet/application/apply.rb:274:in `block in main'
/var/lib/gems/2.0.0/gems/puppet-4.3.2/lib/puppet/context.rb:65:in `override'
/var/lib/gems/2.0.0/gems/puppet-4.3.2/lib/puppet.rb:240:in `override'
/var/lib/gems/2.0.0/gems/puppet-4.3.2/lib/puppet/application/apply.rb:225:in `main'
/var/lib/gems/2.0.0/gems/puppet-4.3.2/lib/puppet/application/apply.rb:170:in `run_command'
/var/lib/gems/2.0.0/gems/puppet-4.3.2/lib/puppet/application.rb:344:in `block in run'
/var/lib/gems/2.0.0/gems/puppet-4.3.2/lib/puppet/util.rb:446:in `exit_on_fail'
/var/lib/gems/2.0.0/gems/puppet-4.3.2/lib/puppet/application.rb:344:in `run'
/var/lib/gems/2.0.0/gems/puppet-4.3.2/lib/puppet/util/command_line.rb:128:in `run'
/var/lib/gems/2.0.0/gems/puppet-4.3.2/lib/puppet/util/command_line.rb:72:in `execute'
/var/lib/gems/2.0.0/gems/puppet-4.3.2/bin/puppet:5:in `<top (required)>'
/usr/local/bin/puppet:23:in `load'
/usr/local/bin/puppet:23:in `<main>'
2016-02-16 01:46:56 +0000 /Stage[main]/Zookeeper::Service/Service[zookeeper]/ensure (err): change from stopped to running failed: Could not start Service[zookeeper]: Execution of '/sbin/start zookeeper' returned 1: start: Job failed to start
Hi! The cloudera RPM package with zookeeper (version 3.4.5+cdh5.12.0+112) has this inside the /usr/lib/zookeeper/bin/zkEnv.sh
file:
if [ -f "$ZOOCFGDIR/java.env" ]
then
. "$ZOOCFGDIR/java.env"
fi
This resolves into the /etc/zookeeper/conf/java.env
file, which is created by puppet-zookeeper module. It has this line:
CLASSPATH="$ZOOCFGDIR:/usr/share/java/jline.jar:/usr/share/java/log4j-1.2.jar:/usr/share/java/xercesImpl.jar:/usr/share/java/xmlParserAPIs.jar:/usr/share/java/netty.jar:/usr/share/java/slf4j-api.jar:/usr/share/java/slf4j-log4j12.jar:/usr/share/java/zookeeper.jar"
So it overwrites the CLASSPATH and removes the folder added by systemd service file:
CLASSPATH="/usr/lib/zookeeper/zookeeper.jar:/usr/lib/zookeeper/lib/*:$CLASSPATH"; \
This results in buggy systemd service file, so it is impossible to start the zookeeper. Getting the error:
Error: Could not find or load main class org.apache.zookeeper.server.quorum.QuorumPeerMain
This is the CLASSPATH that is the result of all that include and substitutions: CLASSPATH='/usr/bin/../build/classes:/usr/bin/../build/lib/*.jar:/usr/bin/../lib/*.jar:/usr/bin/../zookeeper-*.jar:/usr/bin/../src/java/lib/*.jar:/etc/zookeeper/conf:/etc/zookeeper/conf:/usr/share/java/jline.jar:/usr/share/java/log4j-1.2.jar:/usr/share/java/xercesImpl.jar:/usr/share/java/xmlParserAPIs.jar:/usr/share/java/netty.jar:/usr/share/java/slf4j-api.jar:/usr/share/java/slf4j-log4j12.jar:/usr/share/java/zookeeper.jar'
The easiest way should be to fix the java.env file, as it is managed by puppet module. So it'll not overwrite the CLASSPATH.
current template (zoo.cfg.erb) ignores the case in which maxSessionTimeout and/or minSessionTimeout are not configured. In such case the end of the file will look like:
# The minimum session timeout in milliseconds that the server will allow the # client to negotiate. Defaults to 2 times the tickTime.
# The maximum session timeout in milliseconds that the server will allow the # client to negotiate. Defaults to 20 times the tickTime.
While there is no error in that it would be much more readable and aligned with other if the actual directive and its default value will be included in the file, as in:
#minSessionTimeout=2
Zookeeper service template file - zookeeper/templates/zookeeper.service.erb - needs to be modified to handle archived based installation.
I use zookeeper-3.4.9.tar.gz to install zookeeper.
zookeeper.jar file present inside the archive is of the format - zookeeper-3.4.9.jar (instead of the expected, zookeeper.jar). I am not sure if rpm based installation installs with default zookeeper.jar name.
However, the service template file creates zookeeper.service with 'zookeeper.jar' in its classpath. This results in service not coming up, as main jar file is not found.
CLASSPATH="<%= @_zoo_dir %>/zookeeper.jar
Need to add an additional check, like - If 'install_method' is 'archive', then
zookeeper-<%= scope.lookupvar("zookeeper::archive_version") %>.jar
Hi Deric,
Starting the zookeeper service fails with the below error.
==> centos-6.6: Error: /Stage[main]/Zookeeper::Service/Service[zookeeper-server]/ensure: change from stopped to running failed: Command update_rc is missing
I think, update_rc
is not used with centos-6. Please correct me if I am wrong.
Enviroment
-> Vagrant 1.8.1
-> Virtualbox 5.0.14
-> ISO image - puppetlabs/centos-6.6-64-puppet
Below are the configuration used
Vagrantfile
puppet module install puppetlabs-stdlib;
puppet module install richardc-datacat;
puppet module install deric-zookeeper;
puppet file
exec { 'update-rpm-packages':
command => '/usr/bin/yum update -y',
timeout => 1800
}
package {'epel-release':
ensure => 'installed',
require => Exec['update-rpm-packages'],
before => Class['java']
}
class { 'java':
distribution => 'jre',
before => Class['zookeeper'],
require => Exec['update-rpm-packages']
}
# Install Zookeeper at 127.0.0.1
class { 'zookeeper':
repo => 'cloudera',
cdhver => '5',
packages => ['zookeeper', 'zookeeper-server'],
service_name => 'zookeeper-server',
initialize_datastore => true,
client_ip => $::ipaddress_lo,
require => Exec['update-rpm-packages']
}
Full puppet logs for zookeeper.
==> centos-6.6: Notice: /Stage[main]/Main/Node[centos]/Exec[update-rpm-packages]/returns: executed successfully
==> centos-6.6: Notice: /Stage[main]/Main/Node[centos]/Package[epel-release]/ensure: created
==> centos-6.6: Notice: /Stage[main]/Java/Package[java]/ensure: created
==> centos-6.6: Notice: /Stage[main]/Zookeeper::Os::Redhat/Package[zookeeper]/ensure: created
==> centos-6.6: Notice: /Stage[main]/Zookeeper::Os::Redhat/Package[zookeeper-server]/ensure: created
==> centos-6.6: Notice: /Stage[main]/Zookeeper::Post_install/User[zookeeper]/comment: comment changed 'ZooKeeper' to 'Zookeeper'
==> centos-6.6: Notice: /Stage[main]/Zookeeper::Config/File[/etc/zookeeper/conf]/ensure: ensure changed 'link' to 'directory'
==> centos-6.6: Notice: /Stage[main]/Zookeeper::Config/File[/etc/zookeeper/conf/environment]/ensure: defined content as '{md5}d03659a53bb0c3c67aa62bc4640ece6b'
==> centos-6.6: Notice: /Stage[main]/Zookeeper::Config/File[/etc/zookeeper/conf/log4j.properties]/ensure: defined content as '{md5}45a4cc016b7400b596b3321f8f0466cd'
==> centos-6.6: Notice: /Stage[main]/Zookeeper::Config/File[/etc/zookeeper/conf/zoo.cfg]/ensure: defined content as '{md5}ffdecec87c01dc3a1ef433ebb77f9a1d'
==> centos-6.6: Notice: /Stage[main]/Zookeeper::Config/File[/etc/zookeeper/conf/myid]/ensure: defined content as '{md5}b026324c6904b2a9cb4b88d6d61c81d1'
==> centos-6.6: Notice: /Stage[main]/Zookeeper::Config/Exec[initialize_datastore]/returns: executed successfully
==> centos-6.6: Notice: /Stage[main]/Zookeeper::Config/File[/var/lib/zookeeper/myid]/ensure: ensure changed 'file' to 'link'
==> centos-6.6: Error: Command update_rc is missing
==> centos-6.6: Error: /Stage[main]/Zookeeper::Service/Service[zookeeper-server]/ensure: change from stopped to running failed: Command update_rc is missing
==> centos-6.6: Notice: /Stage[main]/Zookeeper::Service/Service[zookeeper-server]: Triggered 'refresh' from 1 events
==> centos-6.6: Notice: /Stage[main]/Zookeeper/Anchor[zookeeper::end]: Dependency Service[zookeeper-server] has failures: true
==> centos-6.6: Warning: /Stage[main]/Zookeeper/Anchor[zookeeper::end]: Skipping because of failed dependencies
==> centos-6.6: Notice: Finished catalog run in 481.43 seconds
Trying to install the cloudera yum repository for zookeeper on RHEL 7 as follows:
[mcassidy1@X]$ sudo /usr/local/bin/puppet apply -e 'class {"zookeeper::repo": source => 'cloudera', cdhver => '5' }' --noop --basemodulepath=$PWD --verbose
...
Error: Evaluation Error: Error while evaluating a Function Call, CDH version'5' is not a supported cloudera repo. at /home/mcassidy1/modules/zookeeper/manifests/repo.pp:59:17 on node X
The error message is generated by the default
case of $cdhver
in repo.pp; however the 5 value is a valid case. Why is it hitting the default?
Determine whether a server is an observer based on an attribute. e.g.:
class {'zookeeper':
role => 'observer', # default value would `master`
}
or using some kind of configuration hash:
zookeeper:cluster:
'foo.example.com':
id: 1
ip: "192.168.1.1"
election_port: 2889
leader_port: 3999
role: 'master'
'bar.example.com':
id: 2
ip: "192.168.1.2"
election_port: 2889
leader_port: 3999
role: 'observer'
Hi,
We are using the this puppet module and are running into an issue where the zookeeper doesn't seem to consider the environment file and only reads the zookeeper-env.sh file. The is causing zookeeper to not start.
We tried to symlink the zookeeper-env.sh to environment but then again it doesn't seem to read anything from it.
Adding the values below as you would expect in a fresh install of zookeeper works.
export ZOO_LOG_DIR=/var/log/zookeeper
export JAVA_HOME=/usr/lib/jvm/j2sdk1.7-oracle/jre
Is there a different init file that the zookeeper needs to start from so it can read from the environment file.
Please help!
Thanks!
-shashank
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.