<div dir="ltr">This is rabbitmq 3.1.5 - I'm not sure what the erlang version is, but the erts version is 5.8.5. I'm a little new to the whole erlang thing, so I just picked a component with 'e' in it :P<div>
<br></div><div>I'm planning to get these machines into the DNS proper to see if that helps. It would be pretty weird if it works, since everyone else works OK with just /etc/hosts resolution, but it's worth a try.</div>
</div><div class="gmail_extra"><br><br><div class="gmail_quote">On 25 September 2013 11:16, Simon MacMullen <span dir="ltr"><<a href="mailto:simon@rabbitmq.com" target="_blank">simon@rabbitmq.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">You may (depending on Erlang version) need to make sure that each machine can resolve its own hostname too, as well as the other one.<br>
<br>
Cheers, Simon<br>
<br>
On 25/09/13 16:04, Derek Wyatt wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Damn. That's exactly the setup I have.<br>
<br>
<br>
On 25 September 2013 10:55, Robin Lawrie - HostelBookers<br>
<<a href="mailto:Robin.Lawrie@hostelbookers.com" target="_blank">Robin.Lawrie@hostelbookers.<u></u>com</a> <mailto:<a href="mailto:Robin.Lawrie@hostelbookers.com" target="_blank">Robin.Lawrie@<u></u>hostelbookers.com</a>>><br>
wrote:<br>
<br>
Hi,<br>
<br>
In my case, I have a 2 node cluster (called cache1 and cache2) and I<br>
needed to add an entry to the hosts file on both nodes to ensure<br>
each node can resolve the name of the other node before clustering<br>
worked for me.<br>
<br>
My hosts file is in /etc and is called hosts<br>
<br>
In there I entered the following:<br>
<br>
On cache1.lon.hosting, enter the line 192.168.3.1 <a href="http://Cache2.domain.com" target="_blank">Cache2.domain.com</a><br>
<<a href="http://Cache2.domain.com" target="_blank">http://Cache2.domain.com</a>> Cache2<br>
<br>
On cache2.lon.hosting, enter the line 192.168.3.0 <a href="http://Cache1.domain.com" target="_blank">Cache1.domain.com</a><br>
<<a href="http://Cache1.domain.com" target="_blank">http://Cache1.domain.com</a>> Cache1<br>
<br>
Once done, I needed to confirm I could ping each node using it’s<br>
hostname from the other node. I don’t care about DNS or nslookup<br>
working/resolving the name.<br>
<br>
HTH<br>
<br>
Robin<br>
<br>
*From:*<a href="mailto:rabbitmq-discuss-bounces@lists.rabbitmq.com" target="_blank">rabbitmq-discuss-<u></u>bounces@lists.rabbitmq.com</a><br>
<mailto:<a href="mailto:rabbitmq-discuss-bounces@lists.rabbitmq.com" target="_blank">rabbitmq-discuss-<u></u>bounces@lists.rabbitmq.com</a>><br>
[mailto:<a href="mailto:rabbitmq-discuss-bounces@lists.rabbitmq.com" target="_blank">rabbitmq-discuss-<u></u>bounces@lists.rabbitmq.com</a><br>
<mailto:<a href="mailto:rabbitmq-discuss-bounces@lists.rabbitmq.com" target="_blank">rabbitmq-discuss-<u></u>bounces@lists.rabbitmq.com</a>>] *On Behalf Of<br>
*Derek Wyatt<br>
*Sent:* 25 September 2013 15:47<br>
*To:* Discussions about RabbitMQ<br>
*Subject:* Re: [rabbitmq-discuss] Clustering - just can't get it going<br>
<br>
Ah, I do have more information though:<br>
<br>
DIAGNOSTICS<br>
<br>
===========<br>
<br>
nodes in question: ['RMQ1']<br>
<br>
hosts, their running nodes and ports:<br>
<br>
- unable to connect to epmd on RMQ1: nxdomain (non-existing domain)<br>
<br>
current node details:<br>
<br>
- node name: 'rabbitmqctl1577@RMQ2'<br>
<br>
- home dir: /var/lib/rabbitmq<br>
<br>
- cookie hash: ohQKEF09peb6bAgNqawvKA==<br>
<br>
And just to be clear, the cookie is the same:<br>
<br>
*01*:~$ sudo md5sum /var/lib/rabbitmq/.erlang.<u></u>cookie<br>
<br>
a2140a105d3da5e6fa6c080da9ac2f<u></u>28 /var/lib/rabbitmq/.erlang.<u></u>cookie<br>
<br>
*02*:~$ sudo md5sum /var/lib/rabbitmq/.erlang.<u></u>cookie<br>
<br>
a2140a105d3da5e6fa6c080da9ac2f<u></u>28 /var/lib/rabbitmq/.erlang.<u></u>cookie<br>
<br>
Somehow, telnet to epmd works just fine, but something that RMQ is<br>
doing fails to make that happen. Is there some sort of DNS work<br>
that it's doing, instead of using the hosts files?<br>
<br>
i.e. one thing I found is that nslookup fails:<br>
<br>
02:~$ nslookup RMQ1<br>
<br>
;; Got SERVFAIL reply from <ipaddress>, trying next server<br>
<br>
Server: <ipaddress><br>
<br>
Address: <ipaddress><br>
<br>
** server can't find RMQ1: SERVFAIL<br>
<br>
But if I ping RMQ1 it works fine. /etc/nsswitch.conf specifies that<br>
files should be tried first, before DNS w.r.t. hosts.<br>
<br>
So, it looks like RMQ is doing something more rigorous to resolve<br>
the host, and I don't know how to change that. I also don't have<br>
access to the DNS server configuration in order to modify it in any way.<br>
<br>
On 25 September 2013 09:57, Jason McIntosh <<a href="mailto:mcintoshj@gmail.com" target="_blank">mcintoshj@gmail.com</a><br>
<mailto:<a href="mailto:mcintoshj@gmail.com" target="_blank">mcintoshj@gmail.com</a>>> wrote:<br>
<br>
Check your erlang cookie on both servers to make sure it matches I<br>
think it's in - /var/lib/rabbitmq/ - then you can use rabbitmqctl<br>
from one machine and see if you can connect to another to list<br>
queues. I THINK that's rabbitmqctl -n <servernode> list_queues for<br>
example. If both servers can talk to each other then it should be<br>
rabbitmqctl stop_app, join_cluster, start_app.<br>
<br>
Jason<br>
<br>
On Wed, Sep 25, 2013 at 8:50 AM, Derek Wyatt <<a href="mailto:derek@derekwyatt.org" target="_blank">derek@derekwyatt.org</a><br>
<mailto:<a href="mailto:derek@derekwyatt.org" target="_blank">derek@derekwyatt.org</a>>> wrote:<br>
<br>
Hi,<br>
<br>
I've seen a number of people failing to get clustering running and,<br>
unfortunately, I can't get it going either. Here's the summary of<br>
what I've got:<br>
<br>
* Two nodes - RMQ1 and RMQ2<br>
* I can ping RMQ1 from RMQ2, and vice versa<br>
* I can telnet from RMQ1 to RMQ2:epmd, and vice versa<br>
* I can telnet from RMQ1 to RMQ2:amqp, and vice versa<br>
* The cookie file is identical, as is clear from the startup INFO<br>
<br>
My goal is to have RMQ2 join RMQ1 in a cluster.<br>
<br>
The servers are started using the init script in Ubuntu (i.e.<br>
service rabbitmq-server start). This is different than the script<br>
at <a href="http://www.rabbitmq.com/clustering.html" target="_blank">http://www.rabbitmq.com/<u></u>clustering.html</a>, which says to start with<br>
"rabbitmq-server -detached". I've tried that and it doesn't seem to<br>
make any difference so I always use the init script instead.<br>
<br>
So, the script says to stop the RMQ2 server and then join the<br>
cluster. The following transcript shows how well all this goes:<br>
<br>
02:~$ sudo rabbitmqctl stop_app<br>
<br>
Stopping node 'rabbit@RMQ2' ...<br>
<br>
...done.<br>
<br>
02:~$ sudo rabbitmqctl join_cluster --ram rabbit@RMQ1<br>
<br>
Clustering node 'rabbit@RMQ2' with 'rabbit@RMQ1' ...<br>
<br>
Error: {cannot_discover_cluster,"The nodes provided are either<br>
offline or not running"}<br>
<br>
However, as I said above, telnetting to the ports works just fine:<br>
<br>
02:~$ telnet RMQ1 epmd<br>
<br>
Trying <ip address>...<br>
<br>
Connected to RMQ1<br>
<br>
Escape character is '^]'.<br>
<br>
booger!<br>
<br>
Connection closed by foreign host.<br>
<br>
02:~$ telnet RMQ1 amqp<br>
<br>
Trying <ip address>...<br>
<br>
Connected to RMQ1<br>
<br>
Escape character is '^]'.<br>
<br>
booger!<br>
<br>
AMQP Connection closed by foreign host.<br>
<br>
I'm stuck for what else to test. Does anyone know how to<br>
troubleshoot this thing further?<br>
<br>
Thanks,<br>
<br>
Derek<br>
<br>
<br>
______________________________<u></u>_________________<br>
rabbitmq-discuss mailing list<br>
<a href="mailto:rabbitmq-discuss@lists.rabbitmq.com" target="_blank">rabbitmq-discuss@lists.<u></u>rabbitmq.com</a><br>
<mailto:<a href="mailto:rabbitmq-discuss@lists.rabbitmq.com" target="_blank">rabbitmq-discuss@<u></u>lists.rabbitmq.com</a>><br>
<a href="https://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss" target="_blank">https://lists.rabbitmq.com/<u></u>cgi-bin/mailman/listinfo/<u></u>rabbitmq-discuss</a><br>
<br>
<br>
<br>
--<br>
Jason McIntosh<br>
<a href="http://mcintosh.poetshome.com/blog/" target="_blank">http://mcintosh.poetshome.com/<u></u>blog/</a><br>
<a href="tel:573-424-7612" value="+15734247612" target="_blank">573-424-7612</a> <tel:<a href="tel:573-424-7612" value="+15734247612" target="_blank">573-424-7612</a>><br>
<br>
<br>
______________________________<u></u>_________________<br>
rabbitmq-discuss mailing list<br>
<a href="mailto:rabbitmq-discuss@lists.rabbitmq.com" target="_blank">rabbitmq-discuss@lists.<u></u>rabbitmq.com</a><br>
<mailto:<a href="mailto:rabbitmq-discuss@lists.rabbitmq.com" target="_blank">rabbitmq-discuss@<u></u>lists.rabbitmq.com</a>><br>
<a href="https://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss" target="_blank">https://lists.rabbitmq.com/<u></u>cgi-bin/mailman/listinfo/<u></u>rabbitmq-discuss</a><br>
<br>
------------------------------<u></u>------------------------------<u></u>------------<br>
<br>
This email is from Hostelbookers.com Limited. Registered office:<br>
52-54 High Holborn, London, WC1V 6RL, UK. Registered in England<br>
under Company No.: 2841908. This email and any files transmitted<br>
with it are confidential and may be privileged and are intended<br>
solely for the use of the individual or entity to whom they are<br>
addressed. As email can be subject to operational or technical<br>
difficulties and time delays, communications that are subject to<br>
deadlines should also be sent by post. Any unauthorised direct or<br>
indirect dissemination, distribution or copying of this message and<br>
any attachments is strictly prohibited. If you have received the<br>
email in error, please notify <a href="mailto:postmaster@hostelbookers.com" target="_blank">postmaster@hostelbookers.com</a><br>
<mailto:<a href="mailto:postmaster@hostelbookers.com" target="_blank">postmaster@<u></u>hostelbookers.com</a>><br>
<br>
------------------------------<u></u>------------------------------<u></u>------------<br>
<br>
______________________________<u></u>_________________<br>
rabbitmq-discuss mailing list<br>
<a href="mailto:rabbitmq-discuss@lists.rabbitmq.com" target="_blank">rabbitmq-discuss@lists.<u></u>rabbitmq.com</a><br>
<mailto:<a href="mailto:rabbitmq-discuss@lists.rabbitmq.com" target="_blank">rabbitmq-discuss@<u></u>lists.rabbitmq.com</a>><br>
<a href="https://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss" target="_blank">https://lists.rabbitmq.com/<u></u>cgi-bin/mailman/listinfo/<u></u>rabbitmq-discuss</a><br>
<br>
<br>
<br>
<br>
______________________________<u></u>_________________<br>
rabbitmq-discuss mailing list<br>
<a href="mailto:rabbitmq-discuss@lists.rabbitmq.com" target="_blank">rabbitmq-discuss@lists.<u></u>rabbitmq.com</a><br>
<a href="https://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss" target="_blank">https://lists.rabbitmq.com/<u></u>cgi-bin/mailman/listinfo/<u></u>rabbitmq-discuss</a><br>
<br><span class="HOEnZb"><font color="#888888">
</font></span></blockquote><span class="HOEnZb"><font color="#888888">
<br>
<br>
-- <br>
Simon MacMullen<br>
RabbitMQ, Pivotal<br>
</font></span></blockquote></div><br></div>