[rabbitmq-discuss] Question about starting a node
tim at rabbitmq.com
Wed May 1 11:00:10 BST 2013
On 30 Apr 2013, at 23:39, srd wrote:
> I'm new to rabbitMQ.
> Having trouble getting connection to my RabbitMQ node:
> I start fresh (ps shows nothing running)
> I had no .erlang.cookie prior to starting because I deleted it.
Erm, you need a cookie in order to do just about anything.
> I start the server (as rabbitmq user)
> -bash-4.1$ rabbitmqctl status
> Status of node rabbit at node1 ...
> Error: unable to connect to node rabbit at node1: nodedown
If you've got no cookie, then rabbitmqctl won't be able to connect to your broker...
> I've tried looking at the docs and this one puzzles me.
> 1) I could see why rabbit at node1 isn't able to connect because I just started it. Is that what the error pertains to?
Yes. It's not rabbit at node1 connecting to itself. It's `rabbitmqctl2469 at node1` trying to connect to rabbit at node1.
> 2) Why does it think my nodename is rabbitmqctl2469 at node1?
> Why isn't it rabbit at node1 ?
That's the node name of the rabbitmqctl process, not the broker process. They need to be able to 'talk to one another', which requires them to share the same erlang cookie.
> On top of all the problems trying to connect with rabbit at node1, it appears the node name is now different
> before it was:
> node name: rabbitmqctl24649 at node1
> now its
> node name: rabbitmqctl24868 at node1
> Would someone explain what is going on?
That's completely normal. As I mentioned previously, the rabbitmqctl node is different to the broker node. Each time you launch rabbitmqctl, it'll choose a different node name, so that if you're trying to run multiple rabbitmqctl commands simultaneously, the node names don't clash.
More information about the rabbitmq-discuss