- From: Daniel DeLeo <
>
- To:
- Subject: [chef] Re: FATAL: Connection to rabbitmq refused. Check your rabbitmq configuration and chef's amqp* settings
- Date: Wed, 25 Jan 2012 08:34:57 -0800
On Tuesday, January 24, 2012 at 8:16 PM, xinhui wrote:
>
I am new with chef ec2. After installing a chef-server locally, then I
>
created
>
two servers by knife-ec2. but suffering problem with bootstrap and client
>
registry. Returned message is server connection refused. Then I tried to
>
test
>
server functions and found: "knife client list" works fine but server error
>
came out with cookbook upload, below is screen log. Also attached is server
>
log:
>
Looks like you're having trouble with rabbitmq somehow. It seems to work in
this message:
>
[Wed, 25 Jan 2012 12:04:12 +0800] INFO: Sending
>
cookbook_version(41f907f0-371e-4187-9d6d-59d6ca52c607) to the index queue
>
for
>
addition.
>
[Wed, 25 Jan 2012 12:04:12 +0800] DEBUG: Pushing item to index queue for
>
addition:
>
enqueued_at1327464252id41f907f0-371e-4187-9d6d-59d6ca52c607typecookbook_versiondatabasechefitemdefinitionsnamechef-client-1.0.4_rev14-fd231a4afef946399b8188ede13cfa92attributesnamedefault.rbchecksumb5e6f2819d2f286dd46408dba4b4bb31pathattributes/default.rbspecificitydefaultfilesjson_classChef::
>
>
(mailto:
)
>
2.0suggestionsplatformsopenbsd>= 0.0.0debian>= 0.0.0centos>= 0.0.0fedora>=
>
0.0.0mac_os_x>= 0.0.0ubuntu>= 0.0.0freebsd>= 0.0.0redhat>=
>
0.0.0maintainerOpscode, Inc.long_descriptionDescription
But this error indicates that Chef Server cannot connect to rabbitmq. Is
rabbit running?
>
[Wed, 25 Jan 2012 12:04:12 +0800] DEBUG: Starting AMQP connection with
>
client
>
settings: #<Bunny::Client:0xb658e948 @queues={}, @status=:not_connected,
>
@port="5672", @connecting=false, @verify_ssl=true, @pass="testing",
>
@user="chef", @channel=#<Bunny::Channel:0xb6588d18 @number=0,
>
@frame_buffer=[],
>
@active=false, @client=#<Bunny::Client:0xb658e948 ...>>,
>
@disconnect_timeout=5.0, @__opts__={:pass=>"testing", :vhost=>"/chef",
>
:host=>"0.0.0.0", :spec=>"08", :user=>"chef", :port=>"5672"}, @exchanges={},
>
@connect_timeout=5.0, @message_out=false, @heartbeat=0, @logging=false,
>
@spec="0-8", @insist=nil, @logger=nil, @ssl=false, @host="0.0.0.0",
>
@message_in=false, @frame_max=131072, @logfile=nil, @read_write_timeout=nil,
>
@channels=[#<Bunny::Channel:0xb6588d18 @number=0, @frame_buffer=[],
>
@active=false, @client=#<Bunny::Client:0xb658e948 ...>>], @channel_max=0,
>
@vhost="/chef">
>
[Wed, 25 Jan 2012 12:04:15 +0800] FATAL: Connection to rabbitmq refused.
>
Check
>
your rabbitmq configuration and chef's amqp* settings
>
>
>
===============my server.rb=================
>
#
>
# Chef Server Config File
>
#
>
# Dynamically generated by Chef - local modifications will be replaced
>
>
log_level :debug
>
log_location "/root/chef-server"
>
chef_server_url "http://localhost:4000"
>
file_cache_path "/var/cache/chef"
>
sandbox_path "/var/cache/chef/sandboxes"
>
checksum_path "/var/lib/chef/cookbook_index"
>
node_path "/var/lib/chef/node"
>
cookbook_tarball_path "/var/lib/chef/cookbook-tarballs"
>
>
validation_client_name "chef-validator"
>
>
web_ui_admin_user_name "admin"
>
>
supportdir = "/var/lib/chef"
>
solr_jetty_path File.join(supportdir, "solr", "jetty")
>
solr_data_path File.join(supportdir, "solr", "data")
>
solr_home_path File.join(supportdir, "solr", "home")
>
solr_heap_size "256M"
>
>
solr_url "http://localhost:8983"
>
>
umask 0022
>
>
signing_ca_cert "/etc/chef/certificates/cert.pem"
>
signing_ca_key "/etc/chef/certificates/key.pem"
>
signing_ca_user "chef"
>
signing_ca_group "chef"
>
>
=============my knife.rb=====================
>
>
keypair_path = '/root/.ssh/knife.pem'
>
>
log_level :debug
>
log_location STDOUT
>
node_name 'root'
>
client_key '/root/.chef/root.pem'
>
validation_client_name 'chef-validator'
>
validation_key '/etc/chef/validation.pem'
>
chef_server_url 'http://server2:4000'
>
cache_type 'BasicFile'
>
cache_options( :path => '/root/.chef/checksums' )
>
>
# The first things have lowest priority (so, site-cookbooks gets to win)
>
cookbook_path [
>
"/root/chef-repo/cookbooks", # std cookbooks from opscode/cookbooks
>
"/root/chef-repo/cluster_chef/cookbooks",
>
"/root/chef-repo/homebase/cookbooks", # your internal cookbooks
>
]
>
>
# If you primarily use AWS cloud services:
>
knife[:ssh_address_attribute] = 'ec2.ap-northeast-1.compute.amazonaws.com'
>
knife[:ssh_user] = 'ubuntu'
>
>
# Configure bootstrapping
>
knife[:bootstrap_runs_chef_client] = true
>
bootstrap_chef_version "~> 0.10.0"
>
>
knife[:aws_access_key_id] = "AKIAJHFRBNRAZZOMBYOA"
>
knife[:aws_secret_access_key] = "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"
There's some coverage of rabbitmq administration on the wiki page for Chef
Indexer:
http://wiki.opscode.com/display/chef/Chef+Indexer
HTH,
--
Dan DeLeo
Archive powered by MHonArc 2.6.16.