Error while creating a cluster in rabbitmq - rabbitmq

I am new to rabbitmq and trying to set up a cluster. However I am getting the following error. The cookie is same in both machine in the C:\Windows and C:\Users\<user in context> directories
rabbitmqctl join_cluster rabbit#node1 Clustering node rabbit#node2
with rabbit#node1 ... Error: unable to connect to nodes
[rabbit#node1]: nodedown
DIAGNOSTICS
attempted to contact: [rabbit#node1]
rabbit#node1: * connected to epmd (port 4369) on node1 * epmd
reports node 'rabbit' running on port 25672 * TCP connection
succeeded but Erlang distribution failed * suggestion: hostname
mismatch? * suggestion: is the cookie set correctly? * suggestion:
is the Erlang distribution using TLS?
current node details:
- node name: 'rabbitmq-cli-552#node1'
- home dir: C:\Users\dataimports
- cookie hash: AWMNITV6TcxGSxvEF6Gndw==
Any help is much appreciated.

Looks like your rabbit#node2 node is looking for a node named rabbit#node1 when the node that exists is rabbitmq-cli-552#node1.
This happens when rabbitmq is started on install. Best way to get around this is to stop the rabbitmq process (sudo /etc/init.d/rabbitmq-server stop) then to start it (sudo /etc/init.d/rabbitmq-server start).
If the first command fails to stop it, you can always kill the rabbitmq server process, then start it again. The node coming up should have the correct name.

Related

unable to connect to epmd (port 4369) on node1: timeout (timed out) ubuntu 18.04

when I try to join - node to cluster:
sudo rabbitmqctl join_cluster rabbit#node1
Error: unable to connect to nodes [rabbit#node1]: nodedown
DIAGNOSTICS
attempted to contact: [rabbit#node1]
rabbit#node1:
unable to connect to epmd (port 4369) on node1: timeout (timed out)
In case you still expect this error, How I solved mine is by going to the hosts.file and check first if "127.0.0.1" is there.. if so I commented mine out and entered it again like this "127.0.0.1 rabbitmq". After that save the changes on the file, restart the rabbitmq service and try again.. for me it worked.

Run rabbitMq in centos7 raise unable to connect to node rabbit#localhost: nodedown

The rabbit service starts but will get an error by 'rabbitmqctl start_app'
attempted to contact: [rabbit#localhost]
rabbit#localhost:
* connected to epmd (port 4369) on localhost
* epmd reports: node 'rabbit' not running at all
no other nodes on localhost
* suggestion: start the node
current node details:
- node name: 'rabbitmq-cli-84#localhost'
- home dir: /var/lib/rabbitmq
- cookie hash: Pz0CBhr6fjk9nLbhBwXlnA==
I used https://gist.github.com/fernandoaleman/fe34e83781f222dfd8533b36a52dddcc to solve the issue, i uninstalled the rabbit and installed it again with the tips given by that link. i reckon the difference between the previous installation and this one was the: sudo firewall-cmd --reload

RabbitMQ is configured to use a custom epmd port, but the server still starts on the default epmd process

I have rabbitmq versions 3.7.7, with erlang 21.0.
I have started a epmd deamon on, let's say, port 20000.
I have also set the ERL_EPMD_PORT=20000 on the
rabbitmq-env.conf.
Now when I start ./rabbitmq-server, it still start a new epmd process on port 4369 (the default) and starts a node under that. So under epmd -port 20000 no rabbitmq node is active.
However, when I try to control the node, rabbitmqctl status DOES look under the epmd process under port 20000, and thus finds nothing.
How can I make sure rabbitmq-server uses the custom epmd port
Why are rabbitmq-server and rabbitmqctl using a different rabbitmq-env.conf file/environment?
Well, I ended up writing (after a struggle of one day to get it working the 'nice' way):
export ERL_EPMD_PORT=20000 in sbin/rabbitmq-defaults
Still I find it a lame answer, but is does work! Stored here for future reference and others with the same question

Can't enable rabbitmq-management plugin on Windows 7

I had installed Erlang and RabbitMQ. After I started RabbitMQ service. All those step were done without errors. But when I ran: C:...\rabbitmq-server-3.5.6\sbin>rabbitmq-plugins.bat enable rabbitmq_management
I got following error:
Applying plugin configuration to rabbit#AZE-PC05478... failed. *
Could not contact node rabbit#AZE-PC05478. Changes will take effect
at broker restart. * Options: --online - fail if broker cannot be
contacted.
--offline - do not try to contact broker.
I copied .erlang.cookie from /Windows to C:. But I still have the same result.
Is anything I missed? Thank you for help.
More infos: When I added : rabbitmqctl.bat status. I got:
Status of node 'rabbit#AZE-PC05478'
Error: unable to connect to node 'rabbit#AZE-PC05478': nodedown
DIAGNOSTICS
===========
attempted to contact: ['rabbit#AZE-PC05478']
rabbit#AZE-PC05478:
* connected to epmd (port 4369) on AZE-PC05478
* epmd reports node 'rabbit' running on port 25672
* TCP connection succeeded but Erlang distribution failed
* Authentication failed (rejected by the remote node), please check the Erlang cookie
current node details:
- node name: 'rabbitmq-cli-74#AZE-PC05478'
- home dir: C:\
- cookie hash: 1jjD3t2FUFyx/xXyPe0s4w==
On Windows, RabbitMQ had issues with hostnames being reported sometimes in lowercase, sometimes in uppercase, and this doesn't play well with Erlang distribution.
It was fixed in RabbitMQ 3.6.0:
https://github.com/rabbitmq/rabbitmq-server/commit/1fb451090a2557f35a2800f9d04c476ff1ad6a22
I suppose you're hitting this problem, because the output of rabbitmqctl shows that RabbitMQ is running:
epmd reports node 'rabbit' running on port 25672
It's just that rabbitmqctl fails to contact it. You can check this by specifying the lowercase version of your node name on rabbitmqctl command line:
rabbitmqctl -n rabbit#aze-pc05478 status

Can't join rabbitMQ cluster: Error: nodedown

I am new to rabbitMQ and Linux.
I am following clustering guide at
https://www.rabbitmq.com/clustering.html
I have three nodes all running CentOS 7 (On virtual machines with statics IPs).
I have copied the erlang cookie to all machines.
I have set hosts in hosts file as the following
This on machine 2
127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4
::1 localhost localhost.localdomain localhost6 localhost6.localdomain6
192.168.198.100 rabbit1
127.0.0.1 rabbit2
192.168.198.102 rabbit3
But hen trying to join rabbit2 to rabbit1 using
rabbitmqctl join_cluster rabbit#rabbit1
I get the following error
Clustering node rabbit#localhost with rabbit#rabbit1 ...
Error: unable to connect to nodes [rabbit#rabbit1]: nodedown
DIAGNOSTICS
===========
attempted to contact: [rabbit#rabbit1]
rabbit#rabbit1:
* connected to epmd (port 4369) on rabbit1
* epmd reports node 'rabbit' running on port 25672
* TCP connection succeeded but Erlang distribution failed
* suggestion: hostname mismatch?
* suggestion: is the cookie set correctly?
* suggestion: is the Erlang distribution using TLS?
current node details:
- node name: 'rabbitmq-cli-72#localhost'
- home dir: /var/lib/rabbitmq
- cookie hash: YlXmRhqgpV9H7lgqXslI1g==
Could anyone help me figure out what's wrong with this?
Your nodes are named rabbit#localhost:
Clustering node rabbit#localhost with rabbit#rabbit1
You need to verify what the hostname command returns. For clustering to work, it must return eg. rabbit1. If it returns localhost, verify the configuration of your hosts. How to do that depends on the distribution.
On the Debian and Fedora VMs I have here, the hostname is configured in /etc/hostname. So you would need something like:
echo rabbit1 > /etc/hostname
But please refer to your distribution documentation and tools first.
I'm assuming you have set 192.168.198.102 to your rabbit2 VM, so you could try and change the line in /etc/hosts from
127.0.0.1 rabbit2 to 192.168.198.102 rabbit2.
Also a tip, try using docker instead of VMs, it's faster and lighter.