This is probably a silly question but it really baffles me right now.
The original issue is this: I'm trying to use JInterface to connect to
a rabbitmq cluster hosted on EC2. But I keep getting "Cannot connect
to peer node". My understanding is that this error is happening
because I'm using the address 'rab...@domain.org' to contact the
remote RabbitMQ node named: rabbit@domain. (Note the missing TLD).
That is, because there is no exact match between the node name given
to JInterface and the name of the node it is connecting to, the
connection fails.
I desperately tried configuring RabbitMQ to take the complete domain
name (domain.org) instead of just the short domain name (domain). Any
suggestion on how to resolve this issue?
Beyond this, this problem begs the question of how do RabbitMQ nodes
located on different machines across different domains communicate
with each other if the only way they can be referred to each other by
short name? Up until now, I've only clustered nodes on the same
machine.
I'm sure missing something. Please enlighten me.
Sincerely,
Max.
_______________________________________________
rabbitmq-discuss mailing list
rabbitmq...@lists.rabbitmq.com
https://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss
That's the way Erlang uses to specify long names.
See http://erlang.org/doc/man/erl.html and then modify your rabbitmq-server script accordingly.
Cheers,
Alvaro
Sent from my iFad
I believe you are right. The according modification of the rabbitmq
scripts seems not that straightforward. Here is what I've got sofar:
a) Changed the option -sname to -name in rabbitmq-multi
b) Changed the node name initialization in rabbitmq-env from
NODENAME=rabbit@${HOSTNAME%%.*} to #NODENAME=rabbit@${HOSTNAME}
c) Changed the node names in rabbitmq.config to use full host names.
d) Cleared the mnesia database.
Now, when I attempt to start the nodes, hereunder is what I get.
Apparently, despite these modifications rabbitmq/erlang is still
attempting to set the short name.
Any idea what else I'm missing?
Thanks,
Max.
============================================
Starting all nodes...
Starting node rab...@ec2-174-122-225-215.compute-1.amazonaws.com...
Activating RabbitMQ plugins ...
0 plugins activated:
{error_logger,{{2011,2,19},{12,33,32}},"Can't set short node
name!\nPlease check your configuration\n",[]}
Hope that helps.
Sent from my iFad
a) Stop rabbitmq
b) Change the option -sname to -name in rabbitmq-multi
c) Change the node name initialization in rabbitmq-env from
NODENAME=rabbit@${HOSTNAME%%.*} to #NODENAME=rabbit@${HOSTNAME}
d) Change the node names in rabbitmq.config to use full host names.
e) Cleare the mnesia database.
f) Reboot the complete machine
g) Start rabbitmq
The error message remains the same:
{error_logger,{{2011,2,19},{16,4,40}},"Can't set short node
name!\nPlease check your configuration\n",[]}
Regards,
Max.
Max Bridgewater wrote:
> Thanks Alvaro. Unfortunately this still doesn't work for me. The steps
> I followed are:
>
> a) Stop rabbitmq
> b) Change the option -sname to -name in rabbitmq-multi
You'd also need to change this in rabbitmq-server.
However, ...
>>>>> The original issue is this: I'm trying to use JInterface to connect to
>>>>> a rabbitmq cluster hosted on EC2. But I keep getting "Cannot connect
>>>>> to peer node". My understanding is that this error is happening
>>>>> because I'm using the address 'rab...@domain.org' to contact the
>>>>> remote RabbitMQ node named: rabbit@domain. (Note the missing TLD).
>>>>> That is, because there is no exact match between the node name given
>>>>> to JInterface and the name of the node it is connecting to, the
>>>>> connection fails.
>>>>>
>>>>> I desperately tried configuring RabbitMQ to take the complete domain
>>>>> name (domain.org) instead of just the short domain name (domain). Any
>>>>> suggestion on how to resolve this issue?
I'd suggest configuring your local name resolution s.t. the hostname of
the machine rabbit is running on resolves to the correct IP. That way
you don't have to mess with long names.
Btw, what are you trying to accomplish with JInterface?
Regards,
Matthias.