On Thu, 2010-08-26 at 01:08 -0700, kit wrote: > I've never coded any ruby and don't know much about debugging, > but I tried nevertheless to follow the guide so here's what I got. > There's a lot of > output here so please bear with me.. > > First, I ran ruby --debug puppetd --trace --test, here's the output: > # ruby --debug /usr/local/sbin/puppetd --server puppet.kulturit.no -- > rundir /var/run/puppet --vardir /var/puppet --trace --verbose --test
You ran ruby in debug mode, but in fact we don't care, what we want is to run puppet in debug mode. Can you try: ruby /usr/local/sbin/puppetd --server puppet.kulturit.no --rundir /var/run/puppet --vardir /var/puppet --trace --test --debug > [snip] > The process is stuck here, tailing the however logfile claims puppetd > is done...: > > Aug 26 09:54:15 kitbackup002 puppet-agent[50287]: Reopening log files > Aug 26 09:54:21 kitbackup002 puppet-agent[50287]: Finished catalog run > in 3.03 seconds Hmm, why does it say "reopening log files"? Did you restart it or change puppet.conf? > > Second, I start gdb: > # gdb `which ruby` 50403 > > [Switching to Thread 0x28a7a130 (LWP 100152)] > 0x2819d1a7 in __error () from /lib/libthr.so.3 Looks like there is a problem. > (gdb) set $ary = (int)backtrace(-1) > (gdb) set $count = *($ary+8) > (gdb) set $index = 0 > (gdb) while $index < $count > >x/1s *((int)rb_ary_entry($ary, $index)+12) > >set $index = $index + 1 > >end > 0x29e020c0: "/usr/local/lib/ruby/1.8/net/protocol.rb:126:in > `readline'" Apparently the thread is stuck in the net/http waiting for answer from the master. It looks like it is downloading some sourced files from the master. > 0x29e02100: "/usr/local/lib/ruby/1.8/net/http.rb:2024:in > `read_status_line'" > 0x29e02140: "/usr/local/lib/ruby/1.8/net/http.rb:2013:in > `read_new'" > 0x29e02180: "/usr/local/lib/ruby/1.8/net/http.rb:1050:in > `request'" > 0x29e021c0: "/usr/local/lib/ruby/1.8/net/http.rb:1037:in > `request'" > 0x29e02200: "/usr/local/lib/ruby/1.8/net/http.rb:543:in `start'" > 0x29e02240: "/usr/local/lib/ruby/1.8/net/http.rb:1035:in > `request'" > 0x29e02280: "/usr/local/lib/ruby/1.8/net/http.rb:772:in `get'" > 0x29e03060: "/usr/local/lib/ruby/site_ruby/1.8/puppet/indirector/ > rest.rb:71:in `find'" > 0x29e04040: "/usr/local/lib/ruby/site_ruby/1.8/puppet/indirector/ > indirection.rb:193:in `find'" > 0x29e030b0: "/usr/local/lib/ruby/site_ruby/1.8/puppet/ > indirector.rb:50:in `find'" > 0x29e040a0: "/usr/local/lib/ruby/site_ruby/1.8/puppet/type/file/ > source.rb:141:in `init_metadata'" > 0x29e03100: "/usr/local/lib/ruby/site_ruby/1.8/puppet/type/file/ > source.rb:139:in `each'" > 0x29e04100: "/usr/local/lib/ruby/site_ruby/1.8/puppet/type/file/ > source.rb:139:in `init_metadata'" > 0x29e03150: "/usr/local/lib/ruby/site_ruby/1.8/puppet/util/ > cacher.rb:106:in `send'" > 0x29e031a0: "/usr/local/lib/ruby/site_ruby/1.8/puppet/util/ > cacher.rb:106:in `cached_value'" > 0x29e022c0: "/usr/local/lib/ruby/1.8/monitor.rb:242:in > `synchronize'" > 0x29e031f0: "/usr/local/lib/ruby/site_ruby/1.8/puppet/util/ > cacher.rb:98:in `cached_value'" > 0x29e03240: "/usr/local/lib/ruby/site_ruby/1.8/puppet/util/ > cacher.rb:48:in `metadata'" > 0x29e04160: "/usr/local/lib/ruby/site_ruby/1.8/puppet/type/file/ > source.rb:99:in `copy_source_values'" > 0x29e03290: "/usr/local/lib/ruby/site_ruby/1.8/puppet/type/ > file.rb:632:in `retrieve'" > 0x29e032e0: "/usr/local/lib/ruby/site_ruby/1.8/puppet/type.rb: > 695:in `retrieve_resource'" > 0x29e07080: "/usr/local/lib/ruby/site_ruby/1.8/puppet/transaction/ > resource_harness.rb:39:in `changes_to_perform'" > 0x29e041c0: "/usr/local/lib/ruby/site_ruby/1.8/puppet/transaction/ > resource_harness.rb:87:in `evaluate'" > 0x29e03330: "/usr/local/lib/ruby/site_ruby/1.8/puppet/ > transaction.rb:49:in `apply'" > 0x29e070f0: "/usr/local/lib/ruby/site_ruby/1.8/puppet/ > transaction.rb:114:in `eval_children_and_apply_resource'" > 0x29e03380: "/usr/local/lib/ruby/site_ruby/1.8/puppet/ > transaction.rb:92:in `eval_resource'" > 0x29e033d0: "/usr/local/lib/ruby/site_ruby/1.8/puppet/ > transaction.rb:143:in `evaluate'" > 0x29e03420: "/usr/local/lib/ruby/site_ruby/1.8/puppet/util.rb: > 414:in `thinmark'" > 0x29e02080: "/usr/local/lib/ruby/1.8/benchmark.rb:308:in > `realtime'" > 0x29e03470: "/usr/local/lib/ruby/site_ruby/1.8/puppet/util.rb: > [snip] > (gdb) where > #0 0x2819d1a7 in __error () from /lib/libthr.so.3 > #1 0x2819cd88 in __error () from /lib/libthr.so.3 > #2 0x29e02060 in ?? () > #3 0x00000008 in ?? () > #4 0x00000001 in ?? () > #5 0x29e02040 in ?? () > #6 0xbc5f9f2c in ?? () > #7 0x80018738 in ?? () > #8 0x00000000 in ?? () > #9 0x2819b6df in pthread_setcancelstate () from /lib/libthr.so.3 > #10 0x2819af7d in pthread_cond_signal () from /lib/libthr.so.3 > #11 0x280a8710 in thread_timer () from /usr/local/lib/libruby18.so.18 > #12 0x281926ff in pthread_getprio () from /lib/libthr.so.3 > #13 0x00000000 in ?? () It would be great to compile ruby with the debug symbols so that we could see where it chokes. > I don't know why it won't let me run the "eval" functions. Anyways, > most of this doesn't make sense to me, hopefully it will to some of > you... :) This gdb ruby stuff is not really bullet-proof. Depending on the state of the ruby interpreter it can work or not. So the next stage is to run puppet with --debug. You'll get much more information about where it stops. What ruby version are you using? -- Brice Figureau Follow the latest Puppet Community evolutions on www.planetpuppet.org! -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
