1. Environment:
centos 7.3
2. Problem description
Today, the following error occurred in the process of deploying rabbitmq as a front-end and back-end message push
$ rabbitmqctl set_permissions -p/duni ".*" ".*" ".*"
Error: unable to connect to node rabbit@bbbbdddd: nodedown
DIAGNOSTICS
===========
attempted to contact: [rabbit@bbbbdddd]
rabbit@bbbbdddd:
* connected to epmd (port 4369) on bbbbdddd
* epmd reports node 'rabbit' running on port 25672
* TCP connection succeeded but Erlang distribution failed
* Hostname mismatch: node "rabbit@localhost" believes its host is different. Please ensure that hostnames resolve the same way locally and on "rabbit@localhost"
current node details:
- node name: 'rabbitmq-cli-92@bbbbdddd'
- home dir: /var/lib/rabbitmq
- cookie hash: h6TDjQ+DgPaVGJLMjcG4TA==
I can’t connect to the host where I deployed rabbitmq bbbbdddd
3. Google
Google found the corresponding problem in stack overflow
Here we say to give rabbitmq
command permission, delete the service and then re install it. After trying, I found that I can’t do it…
Continue with Google, and some people say to correct Erlang’s Cookie:
Erlang will generate two cookie files: C: windows. Erlang. Cookie and C: user. Erlang. Cookie. Check whether the contents of the two files are consistent. If not, replace one with the other.
Windows platform, er… My environment is Linux, and I didn’t find two . Erlang. Cookie
files in the root directory
$ find/--name .erlang.cookie
/var/lib/rabbitmq/.erlang.cookie
So I gave up.
4. Solutions
The final solution is to set the host name and restart the rabbitmq service
# Kill the rabbitmq process first
$ ps -ef | grep rabbitmq | grep -v grep | awk '{print $2}' | xargs kill -9
# set hostname (assume host ip is: 192.168.1.1, hostname set to: mq)
$ echo 192.168.1.1 mq > /etc/hosts
$ echo rabbitmq > /etc/hostname
$ export HOSTNAME=mq
# Restart rabbitmq
$ rabbitmq-server -detached
# Start the web socket service
$ rabbitmq-plugins enable rabbitmq_management rabbitmq_web_stomp
# Set up users and give them administrator privileges
$ rabbitmqctl add_user duni duni
$ rabbitmqctl set_user_tags duni administrator
# set user directory
$ rabbitmqctl set_permissions -p/duni ".*" ".*" ".*"
Read More:
- Linux: How to Solve Rabbitmq Plug-in Install Error
- [Solved] Centos Start rabbitmq Error: ERROR: epmd error for host “192“:badarg (unknown POSIX error)
- [Solved] Linux ECDSA key Error: Host key verification failed
- [Solved] Linux scp Error: Host key verification failed.
- Chinese garbled problem when running. C file in Linux
- linux yum Error: PYCURL ERROR 6 – “Couldn’t resolve host ‘mirrorlist.centos.org’”
- Linux Error: Failed to connect to ::1: No route to the host
- [Solved] SSH Startup Error: unable to load host key /etc/ssh/ssh_host_ed25519_key bad permissions
- Ubuntu: rabbitmq reports an error; Solution error: unable to connect to node rabbit@localhost : nodedown
- [Solved] Exception in replication between CentOS virtual machine and host
- Restart and stop of nginx in Linux service
- Grep: How to Find All the Files Containing a String in Linux
- Linux Error: bind error: Address already in use [How to Solve]
- [Solved] websocket error in Linux service: / lib64 / libc. So. 6: version ` glibc_2.17‘ not found
- [Solved] Linux — 9 — txt files are copied from windows to Linux and read error
- How to Create Threads in Linux
- Installation and configuration of redis in Linux
- Solve the problem of 404 Not Found error in nginx accessing dynamic interface
- Solution of device eth0 does not see to be present, delaying initialization. Error in network card under Linux
- Solution to gzip: stdin: invalid compressed data — format violated error in decompressing. Tgz file under Linux