Comments (19)
Hey @ctipper,
That's a bummer ... can you post the entire stacktrace and the expanded run list? I am not sure off the top of my head what's up. Thanks!
from zookeeper-cookbook.
@ctippur over to you. :-)
from zookeeper-cookbook.
Here is the knife bootstrap log :) :
Recipe: zookeeper::config_render
* zookeeper_config[/opt/zookeeper/zookeeper-3.4.6/conf/zoo.cfg] action renderRecipe: <Dynamically Defined Resource>
* file[/opt/zookeeper/zookeeper-3.4.6/conf/zoo.cfg] action create (up to date)
(up to date)
* service[zookeeper] action nothing (skipped due to action :nothing)
Recipe: zookeeper::service
* runit_service[zookeeper] action enable
================================================================================
Error executing action `enable` on resource 'runit_service[zookeeper]'
================================================================================
RuntimeError
------------
Could not locate main runit sv_bin at "/sbin/sv". Did you remember to install runit before declaring a "runit_service" resource?
Try adding the following to the top of your recipe:
include_recipe "runit"
Cookbook Trace:
---------------
/var/chef/cache/cookbooks/runit/libraries/provider_runit_service.rb:71:in `load_current_resource'
Resource Declaration:
---------------------
# In /var/chef/cache/cookbooks/zookeeper/recipes/service.rb
46: runit_service 'zookeeper' do
47: default_logger true
48: options({
49: exec: executable_path
50: })
51: action [:enable, :start]
52: end
53: when 'exhibitor'
Compiled Resource:
------------------
# Declared in /var/chef/cache/cookbooks/zookeeper/recipes/service.rb:46:in `from_file'
runit_service("zookeeper") do
provider Chef::Provider::Service::Runit
action [:enable, :start]
supports {:restart=>true, :reload=>true, :status=>true}
retries 0
retry_delay 2
service_name "zookeeper"
pattern "zookeeper"
status_command "/sbin/sv status /etc/service"
startup_type :automatic
sv_bin "/sbin/sv"
sv_dir "/etc/sv"
service_dir "/etc/service"
lsb_init_dir "/etc/init.d"
options {:exec=>"/opt/zookeeper/zookeeper-3.4.6/bin/zkServer.sh"}
log true
default_logger true
restart_on_update true
run_template_name "zookeeper"
log_template_name "zookeeper"
check_script_template_name "zookeeper"
finish_script_template_name "zookeeper"
sv_templates true
service_mirror # Declared in
service("zookeeper") do
provider Chef::Provider::Service::Simple
action [:nothing]
supports {:restart=>true, :reload=>true, :status=>true}
retries 0
retry_delay 2
service_name "zookeeper"
pattern "zookeeper"
start_command "/sbin/sv start /etc/service/zookeeper"
stop_command "/sbin/sv stop /etc/service/zookeeper"
status_command "/sbin/sv status /etc/service/zookeeper"
restart_command "/sbin/sv restart /etc/service/zookeeper"
startup_type :automatic
end
cookbook_name "zookeeper"
recipe_name "service"
end
[2014-11-17T10:53:22-08:00] ERROR: Running exception handlers
[2014-11-17T10:53:22-08:00] ERROR: Exception handlers complete
[2014-11-17T10:53:22-08:00] FATAL: Stacktrace dumped to /var/chef/cache/chef-stacktrace.out
Chef Client failed. 7 resources updated
[2014-11-17T10:53:23-08:00] FATAL: Chef::Exceptions::ChildConvergeError: Chef run process exited unsuccessfully (exit code 1)
from zookeeper-cookbook.
Let me delete zookeeper. i will paste the error while it is installing zookeeper.
from zookeeper-cookbook.
Here it is .. While installing zookeeper, for whatever reason, it times out! The error was different when I tried 1 hour ago. I used to get:
chef_gem[zookeeper] action install[2014-11-17T10:14:28-08:00] WARN: failed to find gem zookeeper (>= 0) from [http://rubygems.org/]
#########################################
Recipe: zookeeper::install
* zookeeper[3.4.6] action installRecipe: <Dynamically Defined Resource>
* chef_gem[zookeeper] action installWARNING: Error fetching data: Errno::ETIMEDOUT: Connection timed out - connect(2) (http://rubygems.org/latest_specs.4.8.gz)
================================================================================
Error executing action `install` on resource 'chef_gem[zookeeper]'
================================================================================
NoMethodError
-------------
undefined method `full_name' for nil:NilClass
Cookbook Trace:
---------------
/var/chef/cache/cookbooks/zookeeper/providers/default.rb:36:in `block (2 levels) in class_from_file'
/var/chef/cache/cookbooks/zookeeper/providers/default.rb:35:in `each'
/var/chef/cache/cookbooks/zookeeper/providers/default.rb:35:in `block in class_from_file'
Compiled Resource:
------------------
# Declared in
chef_gem("zookeeper") do
provider Chef::Provider::Package::Rubygems
action :install
retries 0
retry_delay 2
package_name "zookeeper"
version "1.4.9"
end
================================================================================
Error executing action `install` on resource 'zookeeper[3.4.6]'
================================================================================
NoMethodError
-------------
chef_gem[zookeeper] (dynamically defined) had an error: NoMethodError: undefined method `full_name' for nil:NilClass
Cookbook Trace:
---------------
/var/chef/cache/cookbooks/zookeeper/providers/default.rb:36:in `block (2 levels) in class_from_file'
/var/chef/cache/cookbooks/zookeeper/providers/default.rb:35:in `each'
/var/chef/cache/cookbooks/zookeeper/providers/default.rb:35:in `block in class_from_file'
Resource Declaration:
---------------------
# In /var/chef/cache/cookbooks/zookeeper/recipes/install.rb
22: zookeeper node[:zookeeper][:version] do
23: user node[:zookeeper][:user]
24: mirror node[:zookeeper][:mirror]
25: checksum node[:zookeeper][:checksum]
26: install_dir node[:zookeeper][:install_dir]
27: action :install
28: end
Compiled Resource:
------------------
# Declared in /var/chef/cache/cookbooks/zookeeper/recipes/install.rb:22:in `from_file'
zookeeper("3.4.6") do
action [:install]
retries 0
retry_delay 2
cookbook_name "zookeeper"
recipe_name "install"
user "zookeeper"
mirror "http://apache.mesi.com.ar/zookeeper/"
checksum "01b3938547cd620dc4c93efe07c0360411f4a66962a70500b163b59014046994"
install_dir "/opt/zookeeper"
version "3.4.6"
end
[2014-11-17T12:45:31-08:00] ERROR: Running exception handlers
[2014-11-17T12:45:31-08:00] ERROR: Exception handlers complete
[2014-11-17T12:45:31-08:00] FATAL: Stacktrace dumped to /var/chef/cache/chef-stacktrace.out
Chef Client failed. 6 resources updated
[2014-11-17T12:45:34-08:00] FATAL: Chef::Exceptions::ChildConvergeError: Chef run process exited unsuccessfully (exit code 1)
from zookeeper-cookbook.
I can run a wget without a issue.
# wget http://rubygems.org/latest_specs.4.8.gz
--2014-11-17 13:29:34-- http://rubygems.org/latest_specs.4.8.gz
Resolving qy1prdproxy01.ie.intuit.net... 10.158.64.16
Connecting to qy1prdproxy01.ie.intuit.net|10.158.64.16|:80... connected.
Proxy request sent, awaiting response... 302 Found
Location: http://production.s3.rubygems.org/latest_specs.4.8.gz [following]
--2014-11-17 13:29:34-- http://production.s3.rubygems.org/latest_specs.4.8.gz
Connecting to qy1prdproxy01.ie.intuit.net|10.158.64.16|:80... connected.
Proxy request sent, awaiting response... 200 OK
Length: 777714 (759K) []
Saving to: “latest_specs.4.8.gz”
100%[=============================================================================================================>] 777,714 1.11M/s in 0.7s
2014-11-17 13:29:37 (1.11 MB/s) - “latest_specs.4.8.gz” saved [777714/777714]
from zookeeper-cookbook.
Added some additional formatting to more easily see said output pasted in by @ctippur. Wrapping code & CLI output in three backpacks will render it in this fashion, which makes things easier to read through.
from zookeeper-cookbook.
Any updates on this please?
- Shekar
from zookeeper-cookbook.
For now, I have installed zookeeper via cli
gem install zookeeper
when I try to use chef now, I see
Could not locate main runit sv_bin at "/sbin/sv". Did you remember to install runit before declaring a "runit_service" resource?
for runit_service[zookeeper]
from zookeeper-cookbook.
I have seen jakedavis's one of earlier comment to include
include_recipe 'runit::default'
on service.rb file - which I did. I still see this error.
from zookeeper-cookbook.
Found couple more issues
had to create a folder called /etc/service
Create 2 symlinks
ln -s /etc/sv/zookeeper /etc/service/zookeeper
and
ln -s /usr/local/bin/sv /sbin/sv
Now when I run, I get this error:
---- Begin output of /sbin/sv start /etc/service/zookeeper ----
STDOUT: warning: /etc/service/zookeeper: unable to open supervise/ok: file does not exist
STDERR:
---- End output of /sbin/sv start /etc/service/zookeeper ----
Ran /sbin/sv start /etc/service/zookeeper returned 1
from zookeeper-cookbook.
@ctippur I haven't investigated at all, but it’s sounding like runit isn’t being set up properly. Are you sure that runit::default
is happening before the Zookeeper runit service is being managed/installed?
By the way, @jakedavis, it seems as though, if we’re using runit
, we should include runit::default
at line 46 of zookeeper::service
. Any reason we’re not doing that if it’s definitely needed? Users can alter that recipe’s behavior using the runit cookbook’s attributes in a wrapper cookbook if need be.
from zookeeper-cookbook.
I am not sure but I do see that runit gets installed earlier.
- Shekar
On Wed, Nov 19, 2014 at 8:18 AM, Jeff Byrnes [email protected]
wrote:
@ctippur https://github.com/ctippur I haven't investigated at all, but
it’s sounding like runit isn’t being set up properly. Are you sure that
runit::default is happening before the Zookeeper runit service is being
managed/installed?By the way, @jakedavis https://github.com/jakedavis, it seems as
though, if we’re using runit, we should include runit::default at line 46
of zookeeper::service
https://github.com/SimpleFinance/chef-zookeeper/blob/d922ed6d0cda600200308fa9c42d2ff12928b3f9/recipes/service.rb#L46.
Any reason we’re not doing that if it’s definitely needed? Users can alter
that recipe’s behavior using the runit cookbook’s attributes in a wrapper
cookbook if need be.—
Reply to this email directly or view it on GitHub
#112 (comment)
.
from zookeeper-cookbook.
Hey all, I am on vacation / at Clojure/conj this week and won't be able to help until next week. Sorry.
from zookeeper-cookbook.
@ctippur if runit
is being installed properly, you shouldn’t need to create/symlink anything. The runit_service
LWRP should be placing the Zookeeper service in the right place.
This seems to be an issue with installed the RubyGem via the chef_gem
resource. I’m not entirely sure why you’re able to manually install said gem, but unable to do so using Chef & it’s chef_gem
resource.
from zookeeper-cookbook.
Jeffbyrnes,
I agree. I removed runit pkg and reinstalled the rpm
I see this installed now:
runit-2.1.1-3mdv2011.0.x86_64
In the linking section, I still see this issue
link[/etc/service/zookeeper] action create
Error executing action create
on resource 'link[/etc/service/zookeeper]'
No such file or directory - (/etc/sv/zookeeper, /etc/service/zookeeper)
I am not sure if this is a issue with runit
from zookeeper-cookbook.
@ctippur this isn’t an issue with this cookbook, but instead, how the runit cookbook is creating the zookeeper service, using its runit_service
resource.
If you take a look at line 41 of libraries/resource_runit_service.rb
in the runit cookbook, you'll see that it’s pulling that value from either the node attribute node['runit']['service_dir']
, or falling back to /etc/service
.
You can see the attributes being set by runit on lines 39–42 of its default attributes file.
Based on all of this, I believe your issue lies with the setup of runit, not Zookeeper. I’d suggest experimenting with wrapping the runit cookbook and trying to set up a simple service on one of your servers, and seeing if the runit_service
resource works correctly that way.
If it doesn’t work well, then the culprit isn’t with the zookeeper cookbook, and we’ll close this issue out.
from zookeeper-cookbook.
Jeff,
You are right. This was a internal issue and got resolved after whitelisting smarden.org (from where it resolves the pkg contents for runit)
- Sekar
from zookeeper-cookbook.
Great! Closing out.
from zookeeper-cookbook.
Related Issues (20)
- Upstart services fail to start zookeeper HOT 8
- Question about your pinning strategy HOT 2
- link logic for ZK not working. HOT 1
- No way to set Java Opts? HOT 2
- service[zookeeper] cannot be found in the resource collection. HOT 10
- cookbook dependancies in the metadata HOT 4
- Support "package" install style HOT 4
- Make the defaults for install_dir consistent across resources HOT 1
- Checksum has not changed with 3.4.9 update HOT 1
- Any feedback with ZK 3.5.2 dynamic configuration ? HOT 3
- Zookeeper sysv script
- How to run ZooKeeper as a service HOT 1
- Support Ubuntu 16.04 HOT 3
- support direct link to tar for download path HOT 2
- zookeeper-3.5.3-beta artifact breaks due to (lack of) gzip compression HOT 3
- 2.6.0 version error using chef-client 12 HOT 2
- MYID HOT 4
- Passing java options with special characters has unexpected output HOT 6
- Default install fails with failure to download Zookeeper 3.4.12 HOT 2
- Inconsistency in username properties across resources HOT 2
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 zookeeper-cookbook.