I'm trying to create a two node rabbitmq cluster. I've setup the rabbitmq server successfully on both nodes. After replacing the slave's node cookie with the master's .erlang.cookie. System is unable to start rabbitmq app.
I'm executing the following commands:
nohup rabbitmq-server restart &
rabbitmqctl start_app
/sbin/service rabbitmq-server stop
nohup is generating the following logs in /var/lib/rabbitmq/nohup.log
ERROR: node with name "rabbit" already running on "ip-172-31-83-71"
ERROR: node with name "rabbit" already running on "ip-172-31-83-71"
ERROR: node with name "rabbit" already running on "ip-172-31-83-71"
Also terminal is following the following error:
Error: unable to perform an operation on node 'rabbit#ip-172-31-83-71'. Please see diagnostics information and suggestions below.
DIAGNOSTICS
===========
attempted to contact: ['rabbit#ip-172-31-83-71']
rabbit#ip-172-31-83-71:
* connected to epmd (port 4369) on ip-172-31-83-71
* epmd reports: node 'rabbit' not running at all
no other nodes on ip-172-31-83-71
* suggestion: start the node
Current node details:
* node name: 'rabbitmqcli-26458-rabbit#ip-172-31-83-71'
* effective user's home directory: /var/lib/rabbitmq
* Erlang cookie hash: aoPchC2KIy7esHVGVNLP4w==
I've also tried by revert the .erlang.cookie and in this case it's working fine. Can anyone please guide me what I'm missing?
Related
When I try to run on my server machine command
./rabbitmq-server
I the get following:
WARNING: Removing trailing slash from RABBITMQ_LOG_BASE
Removing trailing slash from RABBITMQ_MNESIA_BASE
Protocol 'inet_tcp': register/listen error: econnrefused
Backstory:
This is my first time I'm trying to install RabbitMQ-Server just using ssh.
Step-by-step what I did so far would be:
wget https://www.rabbitmq.com/releases/rabbitmq-server/v3.6.0/rabbitmq-server-3.6.15.zip
unzip rabbitmq-server-3.6.15.zip
nano Makefile # change prefix to rabbitMQ in home directory PREFIX ?= /home/user/rabbitmq
gmake
gmake install
cd ~/rabbitmq/lib/erlang/lib/rabbitmq_server-3.6.15/sbin/
export RABBITMQ_MNESIA_BASE=/home/user/rabbitmq/lib/erlang/lib/rabbitmq_server-3.6.15/sbin/
export RABBITMQ_LOG_BASE=/home/user/rabbitmq/
./rabbitmq-server
And here comes the error. I was told that maybe "unlocking" ports would do the trick, but
I don't know how to do that
I don't know if that's the case
The error Protocol 'inet_tcp': register/listen error: econnrefused means that the Erlang node tried to connect to epmd (the Erlang port mapper daemon) to register its name, but failed to connect.
That shouldn't happen: epmd should be started when the Erlang node starts up. You could try running epmd manually in the shell, and see if it reports any errors.
If it says failed to bind socket: Operation not permitted, check if something else is using port 4369 (which is the port that epmd tries to listen on).
Similar to RabbitMQ has Nodedown Error. But, this is for Ubuntu 16.04 the working solution, posted below, differs from the windows one as well.
Something has gone wrong with my rabbitmq server. Trying to start the application gives an error:
$sudo rabbitmqctl start_app
Starting node rabbit#daniel ...
Error: unable to connect to node rabbit#daniel: nodedown
DIAGNOSTICS
===========
attempted to contact: [rabbit#daniel]
rabbit#daniel:
* connected to epmd (port 4369) on daniel
* epmd reports: node 'rabbit' not running at all
no other nodes on daniel
* suggestion: start the node
current node details:
- node name: 'rabbitmq-cli-6647#daniel'
- home dir: /var/lib/rabbitmq
- cookie hash: T1R4ztWXXH1w2IQe+fui9g==
Currently the only way I know of solving this is uninstalling/reinstalling rabbitmq. But, I'm hoping a more sensible solution is possible...
This is the important part of that message:
node 'rabbit' not running at all
You need to start RabbitMQ with systemctl start rabbitmq-server. You should also check the logs to see why it wasn't running in the first place.
Try to run it with sudo rabbitmq-server
I keep getting this error every time I try to do something with RabbitMQ:
attempted to contact: [fdbvhost#FORTE]
fdbvhost#FORTE:
* connected to epmd (port 4369) on FORTE
* epmd reports: node 'fdbvhost' not running at all
no other nodes on FORTE
* suggestion: start the node
current node details:
- node name: 'rabbitmq-cli-54#FORTE'
- home dir: C:\Users\Jesus
- cookie hash: iuRlQy0F81aBpoY9aQqAzw==
This is the output I get when I run rabbitmqctl -n fdbvhost status or /rabbitmqctl -n fdbvhost list_vhosts.
I've tried rabbitmqctl -n fdbvhost start which gives me the following output:
Error: could not recognise command
Usage:
rabbitmqctl [-n <node>] [-t <timeout>] [-q] <command> [<command options>]
...
So this doesn't start it. I cannot find anything about starting a node in the documentation. How do I actually start my node/vhost?
Try running the following command from the RabbitMQ's installation sbin directory
rabbitmq-server start -detached
This should start the broker node if it was stopped for some reason.
Check if you have RabbitMQ installed as a service in the /etc/init.d/ folder
sudo su # might be needed
cd /etc/init.d/
ls . | grep rabbit
The output should be rabbitmq-server
If that's the case, then, try restarting your service with:
sudo service rabbitmq-server restart
For mac users
To Start
brew services start rabbitmq
To Restart
brew services restart rabbitmq
To Stop
brew services stop rabbitmq
To Know the status of the server
brew services info rabbitmq
I installed by using
brew update and brew install rabbitmq.
Then tried to stop the server and start it again (I tried to install by downloding the source before).
rabbitmqctl stop but I get
`Stopping and halting node rabbit#localhost ...
Error: unable to connect to node rabbit#localhost: nodedown
DIAGNOSTICS
===========
nodes in question: [rabbit#localhost]
hosts, their running nodes and ports:
- localhost: [{rabbit,61707},{rabbitmqctl33002,62384}]
current node details:
- node name: 'rabbitmqctl33002#Dev-MacBook-Air'
- home dir: /Users/ohad
- cookie hash: aeUlHJghkW6Yr7EMVbRJTg==`
which I reccon means there is no proccess, so I tried starting again:
rabbitmq-server
and I get
ERROR: node with name "rabbit" already running on "localhost"
DIAGNOSTICS
===========
nodes in question: [rabbit#localhost]
hosts, their running nodes and ports:
- localhost: [{rabbit,61707},{rabbitmqprelaunch33047,62398}]
current node details:
- node name: 'rabbitmqprelaunch33047#Dev-MacBook-Air'
- home dir: /Users/ohad
- cookie hash: aeUlHJghkW6Yr7EMVbRJTg==
Rabbitmq server does not start, saying it's already running:
$: rabbitmq-server
Activating RabbitMQ plugins ...
0 plugins activated:
node with name "rabbit" already running on "android-d1af002161676bee"
diagnostics:
- nodes and their ports on android-d1af002161676bee: [{rabbit,52176},
{rabbitmqprelaunch2254,
59205}]
- current node: 'rabbitmqprelaunch2254#android-d1af002161676bee'
- current node home dir: /Users/Jordan
- current node cookie hash: ZSx3slRJURGK/nHXDTBRqQ==
But, rabbitmqctl seems to think otherwise:
rabbitmqctl -n rabbit status
Status of node 'rabbit#android-d1af002161676bee' ...
Error: unable to connect to node 'rabbit#android-d1af002161676bee': nodedown
diagnostics:
- nodes and their ports on android-d1af002161676bee: [{rabbit,52176},
{rabbitmqctl2462,59256}]
- current node: 'rabbitmqctl2462#android-d1af002161676bee'
- current node home dir: /Users/Jordan
- current node cookie hash: ZSx3slRJURGK/nHXDTBRqQ==
Any takers?
The rabbitmq server was running somewhere but it just couldn't be connected to.
One of the following will mention something about rabbits:
$: ps aux | grep epmd
$: ps aux | grep erl
Kill the process with kill -9 {pid of rabbitmq process}
i was having the same problem then I realized I was not issuing the right command.
./rabbitmqctl stop
this works everytime, although it does take down erlang runtime too. also mind where your config file.
I used rabbitmqctl stop and then restarted using rabbitmq-server as root.
This issue can be caused by two issues:
Rabbit is already running on the server. If that is the case, use the answer you found of killing the currently running process (ps aux | grep rabbit | grep -v grep)
You have changed the IP address of your machine but not changed the /etc/hosts file to reflect the new IP address of the machine.
The more common of the issues is the first, but the harder to find is the second (especially if you have rabbit running on the other machine. If rabbit is installed on the other machine it will look at the old IP address and would see another machine already running rabbitmq and give you the same error. This has caused me grief in the past.
I was having this same error # Win 7, but the solutions above did not worked for me, what did solved was to remove and reinstall the service. Using a console with admin rights:
rabbitmq-service remove
rabbitmq-service install
I hope this might help someone else too
$CD RabbitMQ Server\rabbitmq_server-3.7.8\sbin
rabbitmq-service remove
rabbitmq-service install
Go : windows Services
Find : RabbitMQ and Start it
after this Enable plugin :
rabbitmq-plugins enable rabbitmq_management
In my case under Ubuntu 11.10 it helped to
#rabbitmqctl cluster MASTER SLAVE
#rabbitmqctl start_app
before I always got this error message...
Using admin console, in Win 2012R2 ver 3.5.5 rabbit, got it to work using the remove and install then rabbitmq-server restart
then ctr-c to terminate the job, then I was able to use the windows service console and start the rabbitMq service.
In my case(windows),
1. I just ran the stop service.
2. The started the service.