title: Using RabbitMQ connector for MCollective
body: <p>Here's my client.cfg file:</p>
  
  <pre><code>main_collective = mcollective
  collectives = mcollective
  libdir = /usr/share/mcollective/plugins
  logger_type = console
  loglevel = warn
  
  # Plugins
  securityprovider = psk
  plugin.psk = unset
  
  connector = rabbitmq 
  plugin.rabbitmq.pool.size = 1
  plugin.rabbitmq.pool.1.host = myserver 
  plugin.rabbitmq.pool.1.port = 61613 
  plugin.rabbitmq.pool.1.user = guest
  plugin.rabbitmq.pool.1.password = password
  
  # Facts
  factsource = yaml
  plugin.yaml = /etc/mcollective/facts.yaml
  </code></pre>
  
  <p>I have set up RabbitMQ server on my Puppet Master server. RabbitMQ is configured correctly as far as I know. The ports are open and it is ready to accept connections.</p>
  
  <p>On MCollective client I am getting the following error:</p>
  
  <pre><code>mco ping -v
  
  =&gt; debug 2015/07/17 15:10:54: pluginmanager.rb:167:in `loadclass' Loading
  =&gt; Mcollective::Facts::Yaml_facts from mcollective/facts/yaml_facts.rb
  =&gt; debug 2015/07/17 15:10:54: pluginmanager.rb:44:in `&lt;&lt;' Registering
  =&gt; plugin facts_plugin with class MCollective::Facts::Yaml_facts
  =&gt; single_instance: true debug 2015/07/17 15:10:54:
  =&gt; pluginmanager.rb:167:in `loadclass' Loading
  =&gt; Mcollective::Connector::Rabbitmq from
  =&gt; mcollective/connector/rabbitmq.rb debug 2015/07/17 15:10:54:
  =&gt; cache.rb:117:in `block in ttl' Cache miss on 'ddl' key
  =&gt; 'connector/rabbitmq' debug 2015/07/17 15:10:54: base.rb:94:in `block
  =&gt; in findddlfile' Found rabbitmq ddl at
  =&gt; /usr/local/lib/site_ruby/1.9.1/mcollective/connector/rabbitmq.ddl
  =&gt; debug 2015/07/17 15:10:54: pluginmanager.rb:44:in `&lt;&lt;' Registering
  =&gt; plugin connector_plugin with class MCollective::Connector::Rabbitmq
  =&gt; single_instance: true debug 2015/07/17 15:10:54:
  =&gt; pluginmanager.rb:167:in `loadclass' Loading Mcollective::Security::Psk
  =&gt; from mcollective/security/psk.rb debug 2015/07/17 15:10:54:
  =&gt; pluginmanager.rb:44:in `&lt;&lt;' Registering plugin security_plugin with
  =&gt; class MCollective::Security::Psk single_instance: true debug
  =&gt; 2015/07/17 15:10:54: pluginmanager.rb:167:in `loadclass' Loading
  =&gt; Mcollective::Registration::Agentlist from
  =&gt; mcollective/registration/agentlist.rb debug 2015/07/17 15:10:54:
  =&gt; pluginmanager.rb:44:in `&lt;&lt;' Registering plugin registration_plugin
  =&gt; with class MCollective::Registration::Agentlist single_instance: true
  =&gt; debug 2015/07/17 15:10:54: pluginmanager.rb:47:in `&lt;&lt;' Registering
  =&gt; plugin global_stats with class MCollective::RunnerStats
  =&gt; single_instance: true info 2015/07/17 15:10:54: config.rb:167:in
  =&gt; `loadconfig' The Marionette Collective version 2.8.2 started by
  =&gt; /usr/bin/mco using config file /etc/mcollective/client.cfg debug
  =&gt; 2015/07/17 15:10:54: pluginmanager.rb:167:in `loadclass' Loading
  =&gt; MCollective::Application::Ping from mcollective/application/ping.rb
  =&gt; debug 2015/07/17 15:10:54: pluginmanager.rb:44:in `&lt;&lt;' Registering
  =&gt; plugin ping_application with class MCollective::Application::Ping
  =&gt; single_instance: true debug 2015/07/17 15:10:54:
  =&gt; pluginmanager.rb:80:in `[]' Returning new plugin ping_application with
  =&gt; class MCollective::Application::Ping debug 2015/07/17 15:10:54:
  =&gt; pluginmanager.rb:80:in `[]' Returning new plugin connector_plugin with
  =&gt; class MCollective::Connector::Rabbitmq info 2015/07/17 15:10:54:
  =&gt; rabbitmq.rb:106:in `initialize' RabbitMQ connector initialized.  Using
  =&gt; stomp-gem 1.3.2 debug 2015/07/17 15:10:54: pluginmanager.rb:80:in `[]'
  =&gt; Returning new plugin security_plugin with class
  =&gt; MCollective::Security::Psk debug 2015/07/17 15:10:54:
  =&gt; pluginmanager.rb:83:in `[]' Returning cached plugin global_stats with
  =&gt; class MCollective::RunnerStats debug 2015/07/17 15:10:54:
  =&gt; rabbitmq.rb:136:in `block in connect' Adding
  =&gt; server:61613 to the connection pool
  =&gt; info 2015/07/17 15:10:54: rabbitmq.rb:201:in `connection_headers'
  =&gt; Connecting without STOMP 1.1 heartbeats, consider setting
  =&gt; plugin.rabbitmq.heartbeat_interval info 2015/07/17 15:10:54:
  =&gt; rabbitmq.rb:10:in `on_connecting' TCP Connection attempt 0 to
  =&gt; stomp://server:61613 info
  =&gt; 2015/07/17 15:10:54: rabbitmq.rb:15:in `on_connected' Connected to
  =&gt; stomp://guest@server:61613 debug
  =&gt; 2015/07/17 15:10:54: pluginmanager.rb:83:in `[]' Returning cached
  =&gt; plugin security_plugin with class MCollective::Security::Psk debug
  =&gt; 2015/07/17 15:10:54: base.rb:178:in `create_request' Encoding a
  =&gt; request for agent 'discovery' in collective mcollective with request
  =&gt; id c93c6c5c19ed5a96abaa93eb2da8e6b1 debug 2015/07/17 15:10:54:
  =&gt; psk.rb:98:in `callerid' Setting callerid to uid=0 based on
  =&gt; callertype=uid debug 2015/07/17 15:10:54: client.rb:96:in `subscribe'
  =&gt; Subscribing to reply target for agent discovery debug 2015/07/17
  =&gt; 15:10:54: pluginmanager.rb:83:in `[]' Returning cached plugin
  =&gt; connector_plugin with class MCollective::Connector::Rabbitmq debug
  =&gt; 2015/07/17 15:10:54: client.rb:225:in `start_publisher' Starting
  =&gt; publishing with publish timeout of  debug 2015/07/17 15:10:54:
  =&gt; client.rb:228:in `block in start_publisher' Sending request
  =&gt; c93c6c5c19ed5a96abaa93eb2da8e6b1 to the discovery agent with ttl 60 in
  =&gt; collective mcollective debug 2015/07/17 15:10:54:
  =&gt; pluginmanager.rb:83:in `[]' Returning cached plugin connector_plugin
  =&gt; with class MCollective::Connector::Rabbitmq debug 2015/07/17 15:10:54:
  =&gt; rabbitmq.rb:332:in `publish' Sending a broadcast message to RabbitMQ
  =&gt; target '/exchange/mcollective_broadcast/discovery' with headers
  =&gt; '{"reply-to"=&gt;"/temp-queue/mcollective_reply_discovery",
  =&gt; "expiration"=&gt;"70000", "mc_sender"=&gt;"ubuntu"}' debug 2015/07/17
  =&gt; 15:10:54: client.rb:239:in `start_receiver' Starting response receiver
  =&gt; with timeout of 5 debug 2015/07/17 15:10:54: rabbitmq.rb:287:in
  =&gt; `receive' Waiting for a message from RabbitMQ debug 2015/07/17
  =&gt; 15:10:54: rabbitmq.rb:309:in `receive' Unexpected 'ERROR' frame.
  =&gt; Headers: {"message"=&gt;"AMQP channel died",
  =&gt; "content-type"=&gt;"text/plain", "version"=&gt;"1.0,1.1,1.2",
  =&gt; "content-length"=&gt;"144"} Body: "Reason: {shutdown,\n
  =&gt; {server_initiated_close,404,\n                &lt;&lt;\"NOT_FOUND - no
  =&gt; exchange 'mcollective_broadcast' in vhost '/'\"&gt;&gt;}}" debug 2015/07/17
  =&gt; 15:10:54: client.rb:106:in `unsubscribe' Unsubscribing reply target
  =&gt; for discovery debug 2015/07/17 15:10:54: pluginmanager.rb:83:in `[]'
  =&gt; Returning cached plugin connector_plugin with class
  =&gt; MCollective::Connector::Rabbitmq
  =&gt;
  =&gt; The ping application failed to run: Received frame of type 'ERROR'
  =&gt; expected 'MESSAGE'
  =&gt;
  =&gt; Received frame of type 'ERROR' expected 'MESSAGE'
  =&gt; (MCollective::UnexpectedMessageType)  from
  =&gt; /usr/local/lib/site_ruby/1.9.1/mcollective/connector/rabbitmq.rb:310:in
  =&gt; `receive'  &lt;----  from
  =&gt; /usr/local/lib/site_ruby/1.9.1/mcollective/client.rb:122:in `receive'
  =&gt;   from /usr/local/lib/site_ruby/1.9.1/mcollective/client.rb:244:in
  =&gt; `block in start_receiver'   from /usr/lib/ruby/1.9.1/timeout.rb:69:in
  =&gt; `timeout'   from
  =&gt; /usr/local/lib/site_ruby/1.9.1/mcollective/client.rb:242:in
  =&gt; `start_receiver'  from
  =&gt; /usr/local/lib/site_ruby/1.9.1/mcollective/client.rb:197:in
  =&gt; `unthreaded_req'  from
  =&gt; /usr/local/lib/site_ruby/1.9.1/mcollective/client.rb:183:in `req'
  =&gt;   from
  =&gt; /usr/share/mcollective/plugins/mcollective/application/ping.rb:58:in
  =&gt; `main'  from
  =&gt; /usr/local/lib/site_ruby/1.9.1/mcollective/application.rb:293:in `run'
  =&gt;   from /usr/local/lib/site_ruby/1.9.1/mcollective/applications.rb:23:in
  =&gt; `run'   from /usr/bin/mco:20:in `&lt;main&gt;' debug 2015/07/17 15:10:54:
  =&gt; pluginmanager.rb:83:in `[]' Returning cached plugin connector_plugin
  =&gt; with class MCollective::Connector::Rabbitmq debug 2015/07/17 15:10:54:
  =&gt; rabbitmq.rb:449:in `disconnect' Disconnecting from RabbitMQ info
  =&gt; 2015/07/17 15:10:54: rabbitmq.rb:20:in `on_disconnect' Disconnected
  =&gt; from stomp://guest@server:61613
  </code></pre>
  
  <p>How do I fix the error for RabbitMQ connector?</p>
  
  <p>Thanks!</p>