Tag Archives: Professional library

Rabbitmq failed to stop normally: ERROR: node with name “rabbit” already running on “localhost”

ERROR: node with name “rabbit” already running on “localhost”
[root@localhost init.d]# rabbitmqctl stop
Stopping and halting node rabbit@localhost
Error: unable to connect to node rabbit@localhost: nodedown
ERROR: node with name “rabbit” already running on “localhost”//Common rabbitmq commands
service rabbitmq-server   start
service rabbitmq-server   stop
service rabbitmq-server   status
service rabbitmq-server   rotate-logs|
service rabbitmq-server   restart
service rabbitmq-server   condrestart
service rabbitmq-server   try-restart
service rabbitmq-server   reload
service rabbitmq-server   force-reload
service rabbitmq-server   -detached    //Start in the background
ps -ef | grep rabbitmq View rabbitMq processes
netstat -anplt | grep LISTEN rabbitmq listens on port 15672/5672 by default
Currently, the only way to stop the process is to find the PID

RabbitMQ:address (cannot connect to host/port) [How to Solve]

Scene

[root@taishan-atlas init.d]# service rabbitmq-server start
Failed to get D-Bus connection: Operation not permitted
ERROR: epmd error for host taishan-atlas: address (cannot connect to host/port)

Solution

Modify/etc/hosts and add 127.0.0.1         taishan-atlas

127.0.0.1       localhost
127.0.0.1       taishan-atlas
192.168.12.42   taishan-atlas

Note: here 127.0.0.1 Taishan Atlas 192.168.12.42 Taishan atlas corresponds to the IP address in front of the host name. One is the loopback IP address and the other is the real IP address of the device. If the real IP address is not configured correctly, a similar problem will occur: error: epmd error for host Taishan Atlas: address (cannot connect to host/port)

Note: the reason why you need to manually add a local domain name is that you have modified the local machine’s host name, so you need to modify it accordingly. After the system is installed, a host name will be generated by default

Rabbitmq: Erlang distribution failed solution

Preface
System version: CentOS Linux release 7.7.1908 (Core)
Adding a user to rabbitmq via the rabbitmqctl add_user admin 12345 command prompts an error.
[root@localhost perl]# rabbitmqctl add_user admin 12345
Error: unable to connect to node rabbit@localhost: nodedown
DIAGNOSTICS
===========
attempted to contact: [rabbit@localhost]
rabbit@localhost:
* connected to epmd (port 4369) on localhost
* 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-49@localhost’
– home dir: /root
– cookie hash: BgvEr+lGkDjLTQzT85cpyw==

 

Solution:
1)Search the .erlang.cookie file
[root@localhost mnesia]# find/-name *.cookie
/root/.erlang.cookie
/opt/rabbitmq_server-3.6.10/.erlang.cookie
2)Overwrite the /root/.erlang.cookie file
cp /opt/rabbitmq_server-3.6.10/.erlang.cookie  /root/

Cause:
RabbitMQ’s .erlang.cookie conflicts with the user’s cookie and needs to override the user’s cookie with RabbitMQ’s cookie