tarkovski
tarkovski

Reputation: 187

Rabbitmq start fails

My RabbitMQ server went down and it is impossible to restart it. I tried to restart, reinstall it... I still don't understand the error. This is what I get

BOOT FAILED

===========

Error description:
   {could_not_start,rabbit,
    {bad_return,
     {{rabbit,start,[normal,[]]},
      {'EXIT',
       {rabbit,failure_during_boot,
        {badmatch,
         {error,
          {{{function_clause,
             [{rabbit_queue_index,journal_minus_segment1,
               [{no_pub,del,no_ack},
                {{<<115,254,171,167,171,226,110,171,251,38,217,145,3,12,215,151>>,
                  {message_properties,1409712663123302,false},
                  true},
                 del,ack}],
               [{file,"src/rabbit_queue_index.erl"},{line,989}]},
              {rabbit_queue_index,'-journal_minus_segment/2-fun-0-',4,
               [{file,"src/rabbit_queue_index.erl"},{line,973}]},
              {array,sparse_foldl_3,7,[{file,"array.erl"},{line,1675}]},
              {array,sparse_foldl_2,9,[{file,"array.erl"},{line,1669}]},
              {rabbit_queue_index,'-recover_journal/1-fun-0-',1,
               [{file,"src/rabbit_queue_index.erl"},{line,701}]},
              {lists,map,2,[{file,"lists.erl"},{line,1224}]},
              {rabbit_queue_index,segment_map,2,
               [{file,"src/rabbit_queue_index.erl"},{line,819}]},
              {rabbit_queue_index,recover_journal,1,
               [{file,"src/rabbit_queue_index.erl"},{line,693}]}]},
            {gen_server2,call,[<0.186.0>,out,infinity]}},
           {child,undefined,msg_store_persistent,
            {rabbit_msg_store,start_link,
             [msg_store_persistent,
              "/var/lib/rabbitmq/mnesia/rabbit@host",[],
              {#Fun<rabbit_queue_index.2.132977059>,
               {start,
                [{resource,<<"/">>,queue,
                  <<"photos_to_be_tagged_user_36">>}]}}]},
            transient,4294967295,worker,
            [rabbit_msg_store]}}}}}}}}}

Can anyone help with this?

Thanks a lot

Upvotes: 14

Views: 14584

Answers (3)

Benjamin
Benjamin

Reputation: 2123

I had to delete everything in ...\AppData\Roaming\RabbitMQ\db, not just the Mnesia files (on Windows, obviously).

Upvotes: 1

Win T
Win T

Reputation: 66

I ran into the same issue and this is what helped me.

The Mnesia files in questions were located in /var/lib/rabbitmq/.

Upvotes: 5

Rush
Rush

Reputation: 453

For anyone else looking for this error rabbit,failure_during_boot,

{badmatch,  
     {error,  
      {{{function_clause,  
         [{rabbit_queue_index,journal_minus_segment1, ...

I just dealt with the same issue and what helped was going to the mnesia directories and deleting the queues and msg_store_transient directories.

From what I understand, what happens is that you end up with a bad queue db (for whatever reason -i.e. a sudden power failure, some other process touches the files) which rabbitmq can't parse and so it crashes. Once you clear the queue of messages, it works fine.

Upvotes: 30

Related Questions