Giter Club home page Giter Club logo

Comments (19)

jakedavis avatar jakedavis commented on July 18, 2024

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.

ctipper avatar ctipper commented on July 18, 2024

@ctippur over to you. :-)

from zookeeper-cookbook.

ctippur avatar ctippur commented on July 18, 2024

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.

ctippur avatar ctippur commented on July 18, 2024

Let me delete zookeeper. i will paste the error while it is installing zookeeper.

from zookeeper-cookbook.

ctippur avatar ctippur commented on July 18, 2024

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.

ctippur avatar ctippur commented on July 18, 2024

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.

jeffbyrnes avatar jeffbyrnes commented on July 18, 2024

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.

ctippur avatar ctippur commented on July 18, 2024

Any updates on this please?

  • Shekar

from zookeeper-cookbook.

ctippur avatar ctippur commented on July 18, 2024

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.

ctippur avatar ctippur commented on July 18, 2024

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.

ctippur avatar ctippur commented on July 18, 2024

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.

jeffbyrnes avatar jeffbyrnes commented on July 18, 2024

@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.

ctippur avatar ctippur commented on July 18, 2024

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.

jakedavis avatar jakedavis commented on July 18, 2024

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.

jeffbyrnes avatar jeffbyrnes commented on July 18, 2024

@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.

ctippur avatar ctippur commented on July 18, 2024

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.

jeffbyrnes avatar jeffbyrnes commented on July 18, 2024

@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.

ctippur avatar ctippur commented on July 18, 2024

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.

jeffbyrnes avatar jeffbyrnes commented on July 18, 2024

Great! Closing out.

from zookeeper-cookbook.

Related Issues (20)

Recommend Projects

  • React photo React

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

  • Vue.js photo Vue.js

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

  • Typescript photo Typescript

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

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

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

Recommend Topics

  • javascript

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

  • web

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

  • server

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

  • Machine learning

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

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

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

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.