Reputation: 67
I'm trying to upgrade RabbitMQ on a cluster of two Linux VMs created via Bitnami in Azure (running Debian 9 Stretch) from version 3.8.2 to the newest version, 3.8.6. According to RabbitMQ's documentation, I can do a rolling upgrade by stopping one of the nodes, installing the newest version on it, restarting that node, and then doing the same on the other node. The machines are running with Erlang 22, which RabbitMQ states is compatible with the 3.8.6 release:
bitnami@AI-RabbitMQ-02:~$ erl -eval 'erlang:display(erlang:system_info(otp_release)), halt().' -noshell
"22"
Following the documentation steps for installation using PackageCloud, I've installed the repository successfully, with this output:
bitnami@AI-RabbitMQ-02:~$ sudo rabbitmqctl stop_app
bitnami@AI-RabbitMQ-02:~$ curl -s https://packagecloud.io/install/repositories/rabbitmq/rabbitmq-server/script.deb.sh | sudo bash abbitmq/rabbitmq-server/script.deb.sh | sudo bash
Detected operating system as debian/9.
Checking for curl...
Detected curl...
Checking for gpg...
Detected gpg...
Running apt-get update... done.
Installing debian-archive-keyring which is needed for installing
apt-transport-https on many Debian systems.
Installing apt-transport-https... done.
Installing /etc/apt/sources.list.d/rabbitmq_rabbitmq-server.list...done.
Importing packagecloud gpg key... done.
Running apt-get update... done.
The repository is setup! You can now install packages.
Then, I try the next step, to install RabbitMQ, being presented with the following errors:
bitnami@AI-RabbitMQ-02:~$ sudo apt-get install rabbitmq-server=3.8.6-1
Reading package lists... Done
Building dependency tree
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:
The following packages have unmet dependencies:
rabbitmq-server : Depends: erlang-base (>= 1:21.3) but 1:19.2.1+dfsg-2+deb9u3 i s to be installed or
erlang-base-hipe (>= 1:21.3) but it is not going to be installed or
esl-erlang (>= 1:21.3) but it is not installable
Depends: erlang-crypto (>= 1:21.3) but 1:19.2.1+dfsg-2+deb9u3 is to be installed or
esl-erlang (>= 1:21.3) but it is not installable
Depends: erlang-eldap (>= 1:21.3) but 1:19.2.1+dfsg-2+deb9u3 is to be installed or
esl-erlang (>= 1:21.3) but it is not installable
Depends: erlang-inets (>= 1:21.3) but 1:19.2.1+dfsg-2+deb9u3 is to be installed or
esl-erlang (>= 1:21.3) but it is not installable
Depends: erlang-mnesia (>= 1:21.3) but 1:19.2.1+dfsg-2+deb9u3 is to be installed or
esl-erlang (>= 1:21.3) but it is not installable
Depends: erlang-os-mon (>= 1:21.3) but 1:19.2.1+dfsg-2+deb9u3 is to be installed or
esl-erlang (>= 1:21.3) but it is not installable
Depends: erlang-parsetools (>= 1:21.3) but 1:19.2.1+dfsg-2+de b9u3 is to be installed or
esl-erlang (>= 1:21.3) but it is not installable
Depends: erlang-public-key (>= 1:21.3) but 1:19.2.1+dfsg-2+de b9u3 is to be installed or
esl-erlang (>= 1:21.3) but it is not installable
Depends: erlang-runtime-tools (>= 1:21.3) but 1:19.2.1+dfsg-2 +deb9u3 is to be installed or
esl-erlang (>= 1:21.3) but it is not installable
Depends: erlang-ssl (>= 1:21.3) but 1:19.2.1+dfsg-2+deb9u3 is to be installed or
esl-erlang (>= 1:21.3) but it is not installable
Depends: erlang-syntax-tools (>= 1:21.3) but 1:19.2.1+dfsg-2+ deb9u3 is to be installed or
esl-erlang (>= 1:21.3) but it is not installable
Depends: erlang-tools (>= 1:21.3) but 1:19.2.1+dfsg-2+deb9u3 is to be installed or
esl-erlang (>= 1:21.3) but it is not installable
Depends: erlang-xmerl (>= 1:21.3) but 1:19.2.1+dfsg-2+deb9u3 is to be installed or
esl-erlang (>= 1:21.3) but it is not installable
E: Unable to correct problems, you have held broken packages.
I've attempted to do the install with the Bintray option as well, but to no avail. I've tried installing manually with dpkg -i
as well, but I'm not sure how to handle the package dependencies, since the link on Rabbit's page for that step doesn't lead anywhere. Any help with the upgrade would be greatly appreciated. Thank you very much!
Upvotes: 2
Views: 4519
Reputation: 362
I had Erlang 23 and RabbitMQ Server 3.8.2 (they are not fully compatible so I decided to upgrade RabbitMQ Server to 3.8.9 because I had some problems running my app)
I have a cluster with one node on AWS EC2 instance of Ubuntu 20.04 (unconfigured yet properly as RabbitMQ advises via plugin - I plan to do it later).
What I did and it worked for me (following commands executed under sudo
or root sudo su
):
It's important to shutdown
not just stop_app
as Erlang also needs to be stopped and stop_app
only stops RabbitMQ Server leaving Erlang on which would later might give you error while starting new version of the RabbitMQ Server - for port 25672 being busy with another app:
rabbitmqctl shutdown
Change in rabbitmq file from old version (I had for some strange reason 3.8.8 instead of 3.8.2 which I run) to a new one - in my case 3.8.9:
vim /etc/apt/preferences.d/rabbitmq
Recheck if dependencies are installed:
apt-get -y install socat logrotate init-system-helpers adduser
Install wget if you don't have it:
apt-get -y install wget
Download latest .deb package of server installation file:
wget https://github.com/rabbitmq/rabbitmq-server/releases/download/v3.8.9/rabbitmq-server_3.8.9-1_all.deb
Install it:
dpkg -i rabbitmq-server_3.8.9-1_all.deb
Remove distro:
rm rabbitmq-server_3.8.9-1_all.deb
Check if server stopped (may be redundant command):
service rabbitmq-server stop
Restart server:
service rabbitmq-server restart
Check server status:
rabbitmq-server status
If it gives you an error BOOT FAILED. Distribution port 25672 is in use by another node, check who uses that port it may be that Erlang uses that port:
lsof -i :25672
Start RabbitMQ app:
rabbitmqctl start_app
Check status of node:
rabbitmqctl status
You should see upgraded RabbitMQ Server version (in my case 3.8.9) along with you recent Erlang version (in my case 23)
Upvotes: 2