Skip to content

Instantly share code, notes, and snippets.

View rberger's full-sized avatar

Robert J. Berger rberger

View GitHub Profile
diff --git a/lib/ohai/plugins/ec2.rb b/lib/ohai/plugins/ec2.rb
index efefc6b..01ab5e5 100644
--- a/lib/ohai/plugins/ec2.rb
+++ b/lib/ohai/plugins/ec2.rb
@@ -53,16 +53,37 @@ def can_metadata_connect?(addr, port, timeout=2)
end
rescue SystemCallError
end
-
+ Ohai::Log.debug("can_metadata_connect? == #{connected}")
root@swarm0_staging:~# chef-client -l debug
[Thu, 02 Sep 2010 21:33:32 +0000] DEBUG: Loading plugin os
[Thu, 02 Sep 2010 21:33:32 +0000] DEBUG: Loading plugin kernel
[Thu, 02 Sep 2010 21:33:32 +0000] DEBUG: Loading plugin ruby
[Thu, 02 Sep 2010 21:33:32 +0000] DEBUG: Loading plugin languages
[Thu, 02 Sep 2010 21:33:32 +0000] DEBUG: ---- Begin ruby -e "require 'rbconfig'; puts %Q(target_vendor=#{::Config::CONFIG['target_vendor']},target_os=#{::Config::CONFIG['target_os']},bin_dir=#{::Config::CONFIG['bindir']},host_cpu=#{::Config::CONFIG['host_cpu']},host_vendor=#{::Config::CONFIG['host_vendor']},target=#{::Config::CONFIG['target']},host=#{::Config::CONFIG['host']},release_date=#{RUBY_RELEASE_DATE},ruby_bin=#{::File.join(::Config::CONFIG['bindir'], ::Config::CONFIG['ruby_install_name'])},version=#{RUBY_VERSION},platform=#{RUBY_PLATFORM},target_cpu=#{::Config::CONFIG['target_cpu']},host_os=#{::Config::CONFIG['host_os']},)" STDOUT ----
[Thu, 02 Sep 2010 21:33:32 +0000] DEBUG: target_vendor=pc,target_os=linux,bin
1037 rberger $ ls -R swarm/
README.rdoc files metadata.json monitoring.features service_binding.rb
definitions libraries metadata.rb recipes templates
swarm//definitions:
deploy_thing.rb
swarm//files:
default
If I execute it with the vanilla java command line it works correctly:
$ java -jar testcake-1.0.0-SNAPSHOT-standalone.jar --foo "changed value"
foo: changed value
bar: 2
boolean?: nil
remaining: []
@rberger
rberger / knife cookbook bulk delete '.*' -p
Created November 1, 2010 00:03
knife cookbook bulk delete '.*' -p
1021 rberger $ knife cookbook bulk delete '.*' -p -c ~/.chef.production/knife.rb
[
"activemq",
"apache2",
"apparmor",
"application",
"apt",
"aws",
"boost",
"bootstrap",
$ knife cookbook site vendor nginx
INFO: Downloading nginx from the cookbooks site at version 0.14.3
INFO: Cookbook saved: /Users/rberger/work/runa/runa_repo/cookbooks/nginx.tar.gz
INFO: Checking out the master branch.
/Library/Ruby/Gems/1.8/gems/chef-0.9.12/lib/chef/mixin/command.rb:184:in `handle_command_failures': git checkout master returned 1, expected 0 (Chef::Exceptions::Exec)
from /Library/Ruby/Gems/1.8/gems/chef-0.9.12/lib/chef/mixin/command.rb:131:in `run_command'
from /Library/Ruby/Gems/1.8/gems/chef-0.9.12/lib/chef/knife/cookbook_site_vendor.rb:65:in `run'
from /Library/Ruby/Gems/1.8/gems/chef-0.9.12/lib/chef/knife.rb:127:in `run'
from /Library/Ruby/Gems/1.8/gems/chef-0.9.12/lib/chef/application/knife.rb:121:in `run'
from /Library/Ruby/Gems/1.8/gems/chef-0.9.12/bin/knife:25
@rberger
rberger / Server_side.log
Created November 1, 2010 00:14
Chef server side log of error when doing knife cookbook bulk delete '.*' -p
2010-10-31_23:14:25.56686 merb : chef-server (api) : worker (port 4000) ~ Started request handling: Sun Oct 31 23:14:25 +0000 2010
2010-10-31_23:14:25.56688 merb : chef-server (api) : worker (port 4000) ~ Params: {"purge"=>"true", "cookbook_version"=>"0.2.3", "action"=>"destroy", "cookbook_name"=>"rabbitmq", "controller"=>"cookbooks"}
2010-10-31_23:14:25.56689 merb : chef-server (api) : worker (port 4000) ~ Cannot find checksum 6551e94b1c34e20dd286bff31d7e66ad in CouchDB! - (Chef::Exceptions::CouchDBNotFound)
2010-10-31_23:14:25.56690 /usr/lib/ruby/gems/1.8/gems/chef-0.9.12/lib/chef/couchdb.rb:213:in `find_by_name'
2010-10-31_23:14:25.56690 /usr/lib/ruby/gems/1.8/gems/chef-0.9.12/lib/chef/couchdb.rb:136:in `load'
2010-10-31_23:14:25.56691 /usr/lib/ruby/gems/1.8/gems/chef-0.9.12/lib/chef/checksum.rb:158:in `cdb_load'
2010-10-31_23:14:25.56692 /usr/lib/ruby/gems/1.8/gems/chef-0.9.12/lib/chef/cookbook_version.rb:812:in `purge'
2010-10-31_23:14:25.56693 /usr/lib/ruby/gems/1.8/gems/chef-0.9.12/lib/chef/cookbook_ve
10/11/09 19:36:46 INFO zookeeper.ZooKeeper: Initiating client connection, connectString=ip-10-194-110-191.ec2.internal:2181 sessionTimeout=60000 watcher=org.apache.hadoop.hbase.client.HConnectionManager$ClientZKWatcher@1fd9e040
10/11/09 19:36:56 WARN zookeeper.ZooKeeperWrapper: Failed to create /hbase -- check quorum servers, currently=ip-10-194-110-191.ec2.internal:2181
java.lang.InterruptedException
       at java.lang.Object.wait(Native Method)
       at java.lang.Object.wait(Object.java:485)
       at org.apache.zookeeper.ClientCnxn.submitRequest(ClientCnxn.java:1099)
       at org.apache.zookeeper.ZooKeeper.create(ZooKeeper.java:606)
       at org.apache.hadoop.hbase.zookeeper.ZooKeeperWrapper.ensureExists(ZooKeeperWrapper.java:405)
       at org.apache.hadoop.hbase.zookeeper.ZooKeeperWrapper.ensureParentExists(ZooKeeperWrapper.java:428)
       at org.apache.hadoop.hbase.zookeeper.ZooKeeperWrapper.checkOutOfSafeMode(ZooKeeperWrapper.java:541)
2010-11-09 19:42:04,634 WARN org.apache.zookeeper.server.NIOServerCnxn: Exception causing close of session 0x12c0b5b820802ba due to java.io.IOException: Read error
2010-11-09 19:42:04,634 INFO org.apache.zookeeper.server.NIOServerCnxn: closing session:0x12c0b5b820802ba NIOServerCnxn: java.nio.channels.SocketChannel[connected local=/10.194.110.191:2181 remote=/10.242.201.171:34844]
2010-11-09 19:42:10,325 INFO org.apache.zookeeper.server.NIOServerCnxn: Connected to /10.242.201.171:42903 lastZxid 29905
2010-11-09 19:42:10,326 INFO org.apache.zookeeper.server.NIOServerCnxn: Finished init of 0x12c0b5b820802ba valid:true
2010-11-09 19:42:10,326 INFO org.apache.zookeeper.server.NIOServerCnxn: Renewing session 0x12c0b5b820802ba
2010-11-09 19:42:15,778 WARN org.apache.zookeeper.server.PrepRequestProcessor: Got exception when processing sessionid:0x12c0b5b820802b8 type:create cxid:0x10 zxid:0xfffffffffffffffe txntype:unknown n/a
org.apache.zookeeper.KeeperException$NodeExistsException: KeeperErrorCode = NodeExists
@rberger
rberger / gist:749253
Created December 20, 2010 23:57
jstack on namenode
2010-12-20 23:48:36
Full thread dump Java HotSpot(TM) 64-Bit Server VM (14.1-b02 mixed mode):
"JMX server connection timeout 10087" daemon prio=10 tid=0x00000000421b3000 nid=0x5566 in Object.wait() [0x00007fbd305d1000]
java.lang.Thread.State: TIMED_WAITING (on object monitor)
at java.lang.Object.wait(Native Method)
- waiting on <0x00007fbd6882be78> (a [I)
at com.sun.jmx.remote.internal.ServerCommunicatorAdmin$Timeout.run(ServerCommunicatorAdmin.java:150)
- locked <0x00007fbd6882be78> (a [I)
at java.lang.Thread.run(Thread.java:619)