Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save samkeen/472601 to your computer and use it in GitHub Desktop.
Save samkeen/472601 to your computer and use it in GitHub Desktop.

If unable to start rabbitmq

$ rabbitmq-server 

+---+   +---+
|   |   |   |
|   |   |   |
|   |   |   |
|   +---+   +-------+
|                   |
| RabbitMQ  +---+   |
|           |   |   |
|   v1.7.2  +---+   |
|                   |
+-------------------+
AMQP 8-0
Copyright (C) 2007-2010 LShift Ltd., Cohesive Financial Technologies LLC., and Rabbit Technologies Ltd.
Licensed under the MPL.  See http://www.rabbitmq.com/

node          : rabbit@workmac
app descriptor: /usr/local/Cellar/rabbitmq/1.7.2/lib/rabbitmq/erlang/lib/rabbitmq-1.7.2/ebin/rabbit.app
home dir      : /Users/sam
cookie hash   : miF/RFCtvGJMVOGNEEMPbA==
log           : /usr/local/var/log/rabbitmq/rabbit.log
sasl log      : /usr/local/var/log/rabbitmq/rabbit-sasl.log
database dir  : /usr/local/var/lib/rabbitmq/mnesia/rabbit

starting internal event notification system                           ...done
starting logging server                                               ...done
starting database                                                     ...{"init terminating in do_boot",{{nocatch,{error,{cannot_start_application,rabbit,{bad_return,{{rabbit,start,[normal,[]]},{'EXIT',{{case_clause,{error,{timeout_waiting_for_tables,[rabbit_user,rabbit_user_permission,rabbit_vhost,rabbit_config,rabbit_listener,rabbit_durable_route,rabbit_route,rabbit_reverse_route,rabbit_durable_exchange,rabbit_exchange,rabbit_durable_queue,rabbit_queue]}}},[{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}]}}}}}}},[{init,start_it,1},{init,start_em,1}]}}

Crash dump was written to: erl_crash.dump
init terminating in do_boot ()

Do this

$ rm -fr /usr/local/var/lib/rabbitmq/mnesia/rabbit
$ rabbitmq-server

in new term

$ rabbitmqctl add_user zamboni zamboni
$ rabbitmqctl add_vhost zamboni
$ rabbitmqctl set_permissions -p zamboni zamboni ".*" ".*" ".*"
$ rabbitmqctl stop

if rabbitmqctl cannot connect, be sure that whatever host that rabbitmq

is running as, is in your host file. workmac in this case (node : rabbit@workmac)

then restart in prev term

$ rabbitmq-server

start celery

$ ./manage.py celeryd $OPTIONS
celery@workmac.ptp v1.0.2 is starting.
/Users/sam/.virtualenvs/zamboni/lib/python2.6/site-packages/celery/bin/celeryd.py:149: UserWarning: Using settings.DEBUG leads to a memory leak, never use this setting in a production environment!
  warnings.warn("Using settings.DEBUG leads to a memory leak, "
Configuration ->
    . broker -> amqp://zamboni@localhost:5672/zamboni
    . queues ->
        . celery -> exchange:celery (direct) binding:celery
    . concurrency -> 2
    . loader -> celery.loaders.djangoapp.Loader
    . logfile -> [stderr]@WARNING
    . events -> OFF
    . beat -> OFF

celery@workmac.ptp has started.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment