Skip to content

Instantly share code, notes, and snippets.

@celldee
Last active December 11, 2015 05:09
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save celldee/4550692 to your computer and use it in GitHub Desktop.
Save celldee/4550692 to your computer and use it in GitHub Desktop.
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