I am running Celery in a Django application with RabbitMQ as a message broker. However, RabbitMQ continues to break like that. The first error I get from Django. Tracing is mostly inconsequential because I know what causes the error, as you will see.
Traceback (most recent call last): ... File "/usr/local/lib/python2.6/dist-packages/amqplib/client_0_8/transport.py", line 85, in __init__ raise socket.error, msg error: [Errno 111] Connection refused
I know this is due to a damaged rabbit_persister.log file. This is because after I kill all the processes associated with RabbitMQ, I run "sudo rabbitmq-server start" to get the following failure:
... starting queue recovery ...done starting persister ...BOOT ERROR: FAILED Reason: {{badmatch,{error,{{{badmatch,eof}, [{rabbit_persister,internal_load_snapshot,2}, {rabbit_persister,init,1}, {gen_server,init_it,6}, {proc_lib,init_p_do_apply,3}]}, {child,undefined,rabbit_persister, {rabbit_persister,start_link,[]}, transient,100,worker, [rabbit_persister]}}}}, [{rabbit_sup,start_child,2}, {rabbit,'-run_boot_step/1-lc$^1/1-1-',1}, {rabbit,run_boot_step,1}, {rabbit,'-start/2-lc$^0/1-0-',1}, {rabbit,start,2}, {application_master,start_it_old,4}]} Erlang has closed
My current fix:. Each time this happens, I rename the corresponding rabbit_persister.log file to something else (rabbit_persister.log.bak) and can successfully run RabbitMQ. But the problem continues to occur, and I cannot understand why. Any ideas?
Also, as a disclaimer, I have no experience with Erlang; I only use RabbitMQ because he uses Celery as a broker.
Thanks in advance, this problem really annoys me because I keep doing the same fix over and over again.