title: RabbitMQ: Unable to enable rabbitmq-priority-queue plugin particularly, but why?
body: <p>I've installed RabbitMQ from RPM on a CentOS 6.4 machine at my work place.
  I was able to enable the <code>rabbitmq_management</code> plugin, and when I run <code>rabbitmqctl status</code>, I get this:</p>
  
  <pre><code>[root@p39dev-reportservice01 ~]# rabbitmqctl  status
  Status of node 'rabbit@p39dev-reportservice01' ...
  [{pid,11221},
   {running_applications,
       [{rabbitmq_management,"RabbitMQ Management Console","3.4.1"},
        {rabbitmq_management_agent,"RabbitMQ Management Agent","3.4.1"},
        {rabbit,"RabbitMQ","3.4.1"},
        {mnesia,"MNESIA  CXC 138 12","4.5"},
        {os_mon,"CPO  CXC 138 46","2.2.7"},
        {rabbitmq_web_dispatch,"RabbitMQ Web Dispatcher","3.4.1"},
        {webmachine,"webmachine","1.10.3-rmq3.4.1-gite9359c7"},
        {mochiweb,"MochiMedia Web Server","2.7.0-rmq3.4.1-git680dba8"},
        {amqp_client,"RabbitMQ AMQP Client","3.4.1"},
        {xmerl,"XML parser","1.2.10"},
        {inets,"INETS  CXC 138 49","5.7.1"},
        {sasl,"SASL  CXC 138 11","2.1.10"},
        {stdlib,"ERTS  CXC 138 10","1.17.5"},
        {kernel,"ERTS  CXC 138 10","2.14.5"}]},
   {os,{unix,linux}},
   {erlang_version,
       "Erlang R14B04 (erts-5.8.5) [source] [64-bit] [smp:4:4] [rq:4] [async-threads:30] [kernel-poll:true]\n"},
   {memory,
       [{total,31534688},
        {connection_readers,0},
        {connection_writers,0},
        {connection_channels,0},
        {connection_other,5408},
        {queue_procs,2704},
        {queue_slave_procs,0},
        {plugins,290736},
        {other_proc,9278088},
        {mnesia,60768},
        {mgmt_db,57944},
        {msg_index,46864},
        {other_ets,1100576},
        {binary,10728},
        {code,17196379},
        {atom,1547225},
        {other_system,1937268}]},
   {alarms,[]},
   {listeners,[{clustering,25672,"::"},{amqp,5672,"::"}]},
   {vm_memory_high_watermark,0.4},
   {vm_memory_limit,1607422771},
   {disk_free_limit,50000000},
   {disk_free,39843336192},
   {file_descriptors,
       [{total_limit,924},{total_used,3},{sockets_limit,829},{sockets_used,1}]},
   {processes,[{limit,1048576},{used,177}]},
   {run_queue,0},
   {uptime,140}]
  [root@p39dev-reportservice01 ~]# 
  </code></pre>
  
  <p>This is the first time I'm installing this RabbitMQ and as far as it seems it looks like it's running ok.</p>
  
  <p>The problem starts when I try to enable another plugin which is called <code>rabbitmq_priority_queue</code>which is required by the dev team in my company:</p>
  
  <pre><code>[root@p39dev-reportservice01 ~]# rabbitmq-plugins enable --online rabbitmq_priority_queue
  The following plugins have been enabled:
    rabbitmq_priority_queue
  
  Applying plugin configuration to rabbit@p39dev-reportservice01... failed.
  Error: {"no such file or directory","rabbitmq_priority_queue.app"}
  [root@p39dev-reportservice01 ~]#
  </code></pre>
  
  <p>I've tried many different things, including installing <code>erlang</code> and <code>rabbitmq-server</code> from source, I've tried enabling other plugins and got them working... only this particular plugin doesn't work.</p>
  
  <p>If I look for <code>*priority_queue</code> in the system I can find the next files, so it does look like it's installed:</p>
  
  <pre><code>/usr/lib/rabbitmq/lib/rabbitmq_server-3.4.1/ebin/priority_queue.beam
  /usr/lib/rabbitmq/lib/rabbitmq_server-3.4.1/plugins/rabbitmq_priority_queue-3.4.x-3431dc1e.ez
  /var/lib/rabbitmq/rabbitmq-public-umbrella/rabbitmq-erlang-client/deps/rabbit_common-0.0.0/ebin/priority_queue.beam
  /var/lib/rabbitmq/rabbitmq-public-umbrella/rabbitmq-erlang-client/dist/rabbit_common-0.0.0/ebin/priority_queue.beam
  /var/lib/rabbitmq/rabbitmq-public-umbrella/rabbitmq-priority-queue/build/rabbitmq_priority_queue.app.0.0.0
  /var/lib/rabbitmq/rabbitmq-public-umbrella/rabbitmq-priority-queue/build/app/rabbitmq_priority_queue-0.0.0
  /var/lib/rabbitmq/rabbitmq-public-umbrella/rabbitmq-priority-queue/build/app/rabbitmq_priority_queue-0.0.0/ebin
  /var/lib/rabbitmq/rabbitmq-public-umbrella/rabbitmq-priority-queue/build/app/rabbitmq_priority_queue-0.0.0/include
  /var/lib/rabbitmq/rabbitmq-public-umbrella/rabbitmq-priority-queue/build/app/rabbitmq_priority_queue-0.0.0/ebin/rabbit_priority_queue.beam
  /var/lib/rabbitmq/rabbitmq-public-umbrella/rabbitmq-priority-queue/build/app/rabbitmq_priority_queue-0.0.0/ebin/rabbitmq_priority_queue.app
  /var/lib/rabbitmq/rabbitmq-public-umbrella/rabbitmq-priority-queue/build/dep-apps/rabbit_common-0.0.0/ebin/priority_queue.beam
  /var/lib/rabbitmq/rabbitmq-public-umbrella/rabbitmq-priority-queue/dist/rabbitmq_priority_queue-0.0.0.ez
  /var/lib/rabbitmq/rabbitmq-public-umbrella/rabbitmq-priority-queue/ebin/rabbit_priority_queue.beam
  /var/lib/rabbitmq/rabbitmq-public-umbrella/rabbitmq-priority-queue/ebin/rabbitmq_priority_queue.app
  /var/lib/rabbitmq/rabbitmq-public-umbrella/rabbitmq-priority-queue/src/rabbit_priority_queue.erl
  /var/lib/rabbitmq/rabbitmq-public-umbrella/rabbitmq-priority-queue/src/rabbitmq_priority_queue.app.src
  /var/lib/rabbitmq/rabbitmq-public-umbrella/rabbitmq-priority-queue/test/src/rabbit_priority_queue_test.erl
  /var/lib/rabbitmq/rabbitmq-public-umbrella/rabbitmq-server/ebin/priority_queue.beam
  /var/lib/rabbitmq/rabbitmq-public-umbrella/rabbitmq-server/src/priority_queue.erl
  /var/lib/rabbitmq/rabbitmq-public-umbrella/rabbitmq-stomp/build/dep-apps/rabbit_common-0.0.0/ebin/priority_queue.beam
  /var/lib/rabbitmq/rabbitmq-public-umbrella/rabbitmq-test/build/dep-apps/rabbit_common-0.0.0/ebin/priority_queue.beam
  </code></pre>
  
  <p>So how come the server doesn't find this file? or where does it expect the file to be?</p>
  
  <p>Edit #1:
  I've also tried this:</p>
  
  <pre><code>[root@p39dev-reportservice01 rabbitmq-priority-queue]# rabbitmq-plugins enable --offline rabbitmq_priority_queue
  Plugin configuration unchanged.
  [root@p39dev-reportservice01 rabbitmq-priority-queue]# rabbitmqctl stop_app &amp; rabbitmqctl start_app
  [1] 12190
  Stopping node 'rabbit@p39dev-reportservice01' ...
  Starting node 'rabbit@p39dev-reportservice01' ...
  [1]+  Done                    rabbitmqctl stop_app
  [root@p39dev-reportservice01 rabbitmq-priority-queue]# rabbitmqctl status
  Status of node 'rabbit@p39dev-reportservice01' ...
  [{pid,11221},
   {running_applications,[{xmerl,"XML parser","1.2.10"},
                          {inets,"INETS  CXC 138 49","5.7.1"},
                          {sasl,"SASL  CXC 138 11","2.1.10"},
                          {stdlib,"ERTS  CXC 138 10","1.17.5"},
                          {kernel,"ERTS  CXC 138 10","2.14.5"}]},
   {os,{unix,linux}},
   {erlang_version,"Erlang R14B04 (erts-5.8.5) [source] [64-bit] [smp:4:4] [rq:4] [async-threads:30] [kernel-poll:true]\n"},
   {memory,[{total,30807688},
            {connection_readers,0},
            {connection_writers,0},
            {connection_channels,0},
            {connection_other,0},
            {queue_procs,0},
            {queue_slave_procs,0},
            {plugins,0},
            {other_proc,9193816},
            {mnesia,0},
            {mgmt_db,0},
            {msg_index,0},
            {other_ets,927744},
            {binary,4424},
            {code,17196379},
            {atom,1547225},
            {other_system,1938100}]},
   {alarms,[]},
   {listeners,[]},
   {processes,[{limit,1048576},{used,58}]},
   {run_queue,0},
   {uptime,2527}]
  </code></pre>
  
  <p>Now the <code>rabbitmqctl status</code> doesn't show which plugins are enabled so I suspect that it's not loaded properly...</p>
  
  <p>Edit #2:
  Okay here it is:</p>
  
  <pre><code>[root@p39dev-reportservice01 rabbitmq-priority-queue]# rabbitmqctl stop_app &amp; rabbitmqctl start_app
  [1] 12411
  Starting node 'rabbit@p39dev-reportservice01' ...
  Stopping node 'rabbit@p39dev-reportservice01' ...
  
  
  BOOT FAILED
  ===========
  
  Error description:
     {error,{"no such file or directory","rabbitmq_priority_queue.app"}}
  
  Log files (may contain more information):
     /var/log/rabbitmq/rabbit@p39dev-reportservice01.log
     /var/log/rabbitmq/rabbit@p39dev-reportservice01-sasl.log
  
  Stack trace:
     [{app_utils,load_applications,2},
      {app_utils,load_applications,1},
      {rabbit,start_apps,1},
      {rabbit,broker_start,0},
      {rabbit,start_it,1},
      {rpc,'-handle_call_call/6-fun-0-',5}]
  
  Error: {rabbit,failure_during_boot,
                 {error,{"no such file or directory",
                         "rabbitmq_priority_queue.app"}}}
  [1]+  Done                    rabbitmqctl stop_app
  [root@p39dev-reportservice01 rabbitmq-priority-queue]# 
  </code></pre>
  
  <p>Still gives me the same error...</p>