Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Rabbitmq server start failed with file locked

Rabbitmq 3.6.5 start failed with this. How to fix it?

BOOT FAILED
   ===========

   Error description:    "Found lock file at ~s.\n            Either previous upgrade is in progress or has failed.\n            Database
   backup path: ~s"

   Log files (may contain more information):   
   /var/log/rabbitmq/[email protected]   
   /var/log/rabbitmq/[email protected]

   Stack trace:    [{rabbit_upgrade,ensure_backup_taken,
       ["/var/lib/rabbitmq/mnesia/rabbit@vm-10-111-29-211/schema_upgrade_lock", "/var/lib/rabbitmq/mnesia/rabbit@vm-10-111-29-211-upgrade-backup"],
       [{file,"src/rabbit_upgrade.erl"},{line,101}]},
       {rabbit_upgrade,maybe_upgrade_mnesia,0,
                       [{file,"src/rabbit_upgrade.erl"},{line,144}]},
       {rabbit,'-boot/0-fun-0-',0,[{file,"src/rabbit.erl"},{line,271}]},
       {rabbit,start_it,1,[{file,"src/rabbit.erl"},{line,403}]},
       {init,start_it,1,[]},
       {init,start_em,1,[]}]

   {"init terminating in do_boot","Found lock file at ~s.\n           
   Either previous upgrade is in progress or has failed.\n           
   Database backup path: ~s"}

   Crash dump was written to: erl_crash.dump init terminating in do_boot
   (Found lock file at ~s.
               Either previous upgrade is in progress or has failed.
               Database backup path: ~s)
like image 373
Liang Avatar asked Dec 23 '16 03:12

Liang


1 Answers

you have had a problem during the database upgrade, it would be interesting see what happened checking the logs

BTW To solve quickly the problem is enough to remove your mnesia directory.

The directory is usually located in /var/lib/rabbitmq/mnesia , check here for detail.

NOTE

By removing the mnesia directory you will lose all your messages

like image 154
Gabriele Santomaggio Avatar answered Nov 14 '22 23:11

Gabriele Santomaggio