Skip to content

Instantly share code, notes, and snippets.

View greenmoss's full-sized avatar

Kurt Yoder greenmoss

View GitHub Profile
@greenmoss
greenmoss / gist:333979
Created March 16, 2010 14:02
client run
# chef-client
[Tue, 16 Mar 2010 10:02:13 -0400] INFO: Starting Chef Run
[Tue, 16 Mar 2010 10:02:17 -0400] INFO: Client key /etc/chef/client.pem is not present - registering
/usr/lib/ruby/1.8/net/http.rb:2097:in `error!': 401 "Unauthorized" (Net::HTTPServerException)
from /usr/lib/ruby/1.8/chef/rest.rb:296:in `run_request'
from /usr/lib/ruby/1.8/chef/rest.rb:116:in `post_rest'
from /usr/lib/ruby/1.8/chef/api_client.rb:235:in `save'
from /usr/lib/ruby/1.8/chef/rest.rb:79:in `register'
from /usr/lib/ruby/1.8/chef/rest.rb:77:in `upto'
from /usr/lib/ruby/1.8/chef/rest.rb:77:in `register'
@greenmoss
greenmoss / client config
Created March 16, 2010 14:15
client config
chef_server_url "http://chef.not.real.host:4000"
validation_key "/etc/chef/validation.pem"
@greenmoss
greenmoss / gist:334066
Created March 16, 2010 15:06
server config
log_level :info
log_location STDOUT
ssl_verify_mode :verify_none
chef_server_url "http://localhost:4000"
cookbook_path [ "/srv/chef/cookbooks" ]
file_cache_path "/var/cache/chef"
node_path "/srv/chef/nodes"
openid_store_path "/var/lib/chef/openid/store"
openid_cstore_path "/var/lib/chef/openid/cstore"
Mixlib::Log::Formatter.show_time = true
@greenmoss
greenmoss / gist:334067
Created March 16, 2010 15:07
server log
merb : worker (port 4000) ~ Started request handling: Tue Mar 16 11:03:29 -0400 2010
merb : worker (port 4000) ~ Params: {"name"=>"my.fake.client.address", "action"=>"create", "admin"=>false, "controller"=>"chef_server_api/clients"}
merb : worker (port 4000) ~ Failed to authenticate! - (Merb::ControllerExceptions::Unauthorized)
/usr/share/chef-server-api/app/controllers/application.rb:77:in `authenticate_every'
/usr/lib/ruby/1.8/merb-core/controller/abstract_controller.rb:346:in `send'
/usr/lib/ruby/1.8/merb-core/controller/abstract_controller.rb:346:in `_call_filters'
/usr/lib/ruby/1.8/merb-core/controller/abstract_controller.rb:338:in `each'
/usr/lib/ruby/1.8/merb-core/controller/abstract_controller.rb:338:in `_call_filters'
/usr/lib/ruby/1.8/merb-core/controller/abstract_controller.rb:283:in `_dispatch'
/usr/lib/ruby/1.8/merb-core/controller/abstract_controller.rb:281:in `catch'
$ /usr/bin/python /usr/lib/ruby/gems/1.8/gems/chef-0.8.8/lib/chef/provider/package/yum-dump.py | wc
8669 8669 395280
$ which python
/usr/local/bin/python
$ /usr/local/bin/python /usr/lib/ruby/gems/1.8/gems/chef-0.8.8/lib/chef/provider/package/yum-dump.py
Traceback (most recent call last):
File "/usr/lib/ruby/gems/1.8/gems/chef-0.8.8/lib/chef/provider/package/yum-dump.py", line 33, in <module>
import yum
ImportError: No module named yum
nodes = Hash.new
#search(:node, 'keys_ssh:host_*', nil, 0, 1) do |node|
search(:node, 'name:[a TO g]', nil, 0, 1) do |node|
Chef::Log.info("search result: #{node.name}")
nodes[node.name] = node.ipaddress
#nodes[node.name]['host_rsa_public'] = node[:keys][:ssh][:host_rsa_public]
#nodes[node.name]['host_dsa_public'] = node[:keys][:ssh][:host_dsa_public]
end
Chef::Log.info(nodes)
2010-04-02_16:28:07.31220 merb : worker (port 4000) ~ undefined method `each' for nil:NilClass - (NoMethodError)
2010-04-02_16:28:07.31221 /usr/lib/ruby/gems/1.8/gems/chef-server-api-0.8.8/app/controllers/application.rb:195:in `expand_cookbook_deps'
2010-04-02_16:28:07.31222 /usr/lib/ruby/gems/1.8/gems/chef-server-api-0.8.8/app/controllers/application.rb:196:in `expand_cookbook_deps'
2010-04-02_16:28:07.31222 /usr/lib/ruby/gems/1.8/gems/chef-server-api-0.8.8/app/controllers/application.rb:195:in `each'
2010-04-02_16:28:07.31222 /usr/lib/ruby/gems/1.8/gems/chef-server-api-0.8.8/app/controllers/application.rb:195:in `expand_cookbook_deps'
2010-04-02_16:28:07.31222 /usr/lib/ruby/gems/1.8/gems/chef-server-api-0.8.8/app/controllers/application.rb:183:in `specific_cookbooks'
2010-04-02_16:28:07.31223 /usr/lib/ruby/gems/1.8/gems/chef-server-api-0.8.8/app/controllers/application.rb:182:in `each'
2010-04-02_16:28:07.31225 /usr/lib/ruby/gems/1.8/gems/chef-server-api-0.8.8/app/controllers/application.rb:182:in `specific
DEBUG: Synchronizing cookbook rdiff_backup
DEBUG: Synchronizing cookbook xml
DEBUG: Synchronizing cookbook runit
DEBUG: Synchronizing cookbook zlib
DEBUG: Synchronizing cookbook couchdb
DEBUG: Synchronizing cookbook nagios
DEBUG: Synchronizing cookbook java
DEBUG: Synchronizing cookbook openssl
DEBUG: Synchronizing cookbook chef
DEBUG: Synchronizing cookbook rdc
$ rake upload_cookbook[ssh]
(in /home/me/chef-repo)
INFO: ** ssh **
INFO: Running syntax check on ssh
DEBUG: Staging at /tmp/chef-ssh-build20100506-23487-1iz45s8-0
INFO: Nothing to copy from ./cookbooks/ssh
INFO: Nothing to copy from ./site-cookbooks/ssh
FATAL: Could not find cookbook ssh!
$ ls
certificates config cookbooks last-commit-id Rakefile README roles site-cookbooks
2010-05-26_18:28:14.24976 May 26, 2010 2:28:14 PM org.apache.solr.servlet.SolrDispatchFilter init
2010-05-26_18:28:14.24981 SEVERE: Could not start SOLR. Check solr/home property
2010-05-26_18:28:14.24981 java.lang.RuntimeException: java.io.FileNotFoundException: /var/chef/solr/data/index/_59kp_b.del (No such file or directory)
2010-05-26_18:28:14.24981 at org.apache.solr.core.SolrCore.getSearcher(SolrCore.java:1042)
2010-05-26_18:28:14.24981 at org.apache.solr.core.SolrCore.<init>(SolrCore.java:563)
2010-05-26_18:28:14.24982 at org.apache.solr.core.CoreContainer$Initializer.initialize(CoreContainer.java:128)
2010-05-26_18:28:14.24982 at org.apache.solr.servlet.SolrDispatchFilter.init(SolrDispatchFilter.java:83)
2010-05-26_18:28:14.24982 at org.mortbay.jetty.servlet.FilterHolder.doStart(FilterHolder.java:99)
2010-05-26_18:28:14.24983 at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:40)
2010-05-26_18:28:14.24983 at org.mortbay.jetty.servlet.Servl