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
Related
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.
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
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.
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.
I have RabbitMQ installed on a CentOS 5.x server which I use for message passing between my programs. I've installed rabbitmqadmin following the directions on https://www.rabbitmq.com/management-cli.html and have used it on my servers in the past.
From what I can tell it looks like this particular server is misconfigured. My web-searches have failed me on trying to get more information on how to troubleshoot this issue.
The error:
[root#server ~]# python26 /usr/local/bin/rabbitmqadmin list nodes
*** Could not connect: [Errno -2] Name or service not known
[root#server ~]#
I have tried several different rabbitmqadmin commands and they give the same result. If I run the command without the extra params it displays the normal help dialog. I have this setup and working on several other servers.
Any idea on what the root issue is? If not, anyway to get more details, like verbose?
Update:
I just tried to check the version of rabbitmq and its yielding an error too:
[root#server ~]# rabbitmqctl status
Status of node rabbit#server ...
Error: unable to connect to node rabbit#server: nodedown
DIAGNOSTICS
===========
attempted to contact: [rabbit#server]
rabbit#server:
* connected to epmd (port 4369) on server
* epmd reports node 'rabbit' running on port 25672
* TCP connection succeeded but Erlang distribution failed
* suggestion: hostname mismatch?
* suggestion: is the cookie set correctly?
current node details:
- node name: rabbitmqctl25451#server
- home dir: /var/lib/rabbitmq
- cookie hash: WXaeZT7XXm13naagfRX5cg==
[root#server ~]#
I'm going to see if I can find something from this... I find this weird because the server is passing messages fine and can be monitored through the web console.
Erlang version:
[root#server rabbitmq]# erl -eval 'erlang:display(erlang:system_info(otp_release)), halt().' -noshell
"R14B04"
[root#server rabbitmq]#
Rabbitmq Version:
[root#server rabbitmq]# python26 /usr/local/bin/rabbitmqadmin --version
rabbitmqadmin 3.3.5
[root#server rabbitmq]#
After much digging and frustration, I found my problem... I'm posting the solution in case anyone else has a similar experience
Previously, I found that if you setup RabbitMQ on a linux server then change the hostname that it can break some of the rabbit configuration.
The awesome part about this problem is that someone changed the name of the server from all capital letters to lowercase...
I've solve this one of two ways:
Solution 1:
Revert the host name back to the previous name. So that rabbitmq references with the appended server name work again.
Solution 2:
If you want to keep the server name change, then you can create a rabbitmq-env.conf files in /etc/rabbitmq like:
NODENAME=rabbit#OLDHOSTNAME
If you aren't sure what your previous name was, you can reference it by doing an ls in your /var/lib/rabbitmq/mnesia/ folder. You'll then see a folder that matches the nodename you need to specify.
Reference: https://www.rabbitmq.com/man/rabbitmq-env.conf.5.man.html
UPDATE:
Host name is CaSE SeNSiTIve... had someone change a hostname on me and the only difference was the case... so took a while to notice...
Yesterday I've lost a few hours with this same problem and it was in a fresh install, so the problem was that the erlang cookie from my user and root user was different than the one from rabbitmq user.
Find out the HOME for the user rabbitmq:
# cat /etc/passwd | grep rabbitmq
Check if the cookies differs from each other:
# vimdiff /var/lib/rabbitmq/.erlang.cookie ~/.erlang.cookie
If they are different, copy the cookie from rabbitmq for the user that you want to have access to the server:
# cp /var/lib/rabbitmq/.erlang.cookie ~/.erlang.cookie
References:
rabbitmqctl status says "TCP connection succeeded but Erlang distribution failed"
How Nodes (and CLI tools) Authenticate to Each Other: the Erlang Cookie