Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
Play with RabbitMQ via Erlang REPL
If you want to connect to your rabbit node via the Erlang REPL then you can start another node in the REPL like this -
erl -sname test -setcookie "ERLANGCOOKIE"
then try -
net_adm:ping('rabbit@hostname').
If it returns 'pong' then you're in business, but if you see 'pang' returned then you have not managed to reach your rabbit node.
If you then run -
nodes().
Hopefully, you will see something like -
['rabbit@hostname']
I was doing this on an Ubuntu 12.04 machine and had to copy the cookie from my /var/lib/rabbitmq directory for this to work.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment