Upgrading from Xray 3.16.2 to 3.69.3 in Debian Installations
When you upgrade from Xray 3.16.2 to higher versions, Xray service might not come up after installation. This is because of an incompatible Erlang package in RabbitMQ. You must remove the Erlang package from your installation before you proceed with the upgrade.
If you upgraded to a higher version, run the following commands.
dpkg --purge --force-all esl-erlang cd jfrog-xray-<version>-deb/third-party/rabbitmq dpkg -i esl-erlang_23.2.3-1_ubuntu_bionic_amd64.deb systemctl start xray.service
Upgrading to Xray 3.70.0 or later from an Xray version prior to 3.70.0
If you are upgrading to Xray 3.70.0 or later from an Xray version prior to 3.70.0, your installation contains RabbitMQ 3.8.x. Feature flags in RabbitMQ have to be enabled before you can upgrade, since Xray 3.70.0 and later contains RabbitMQ 3.11.x and later.
Before you proceed with the upgrade, go to RabbitMQ Upgrade to version 3.11.x and set feature flags in RabbitMQ.
Install/Upgrade Xray 3.70.0 to 3.74.0 with RPM
Xray installation/upgrade might fail because of the missing package libltdl. If you face the error, you can download and install the package, and proceed with the installation/upgrade of Xray.
Download Xray (RPM or Debian).
Stop the current server.
systemd OS
systemctl stop xray.service
systemv OS
service xray stop
Store the RabbitMQ password securely before you proceed with the upgrade.
You can find the password inside the file,
$JFROG_HOME
/app/bin/rabbitmq/rabbitmq.conf.
Extract the contents of the compressed archive and go to the extracted folder.
tar -xvf jfrog-xray-<version>-<rpm|deb>.tar.gz cd jfrog-xray-<version>-<rpm|deb>
Note
Starting from Xray 3.8.x, RabbitMQ bundled with Xray has been upgraded, and it requires an upgrade of the Erlang library. This library can be found on $JFROG_HOME/xray/app/third-party. For more information, see Installing Erlang.
Note
To upgrade the dependencies for RabbitMQ, you will need to upgrade
socat/erlang
by using "--replacefiles" to work around a file conflict error.Install Xray as a service on Red Hat compatible Linux distributions, as a root user.
RPM
yum -y install ./xray/xray.rpm
Debian
dpkg -i ./xray/xray.deb
Update the RabbitMQ password inside the file,
$JFROG_HOME
/app/bin/rabbitmq/rabbitmq.conf
, with the password that you previously stored.Start Xray.
systemd OS
systemctl start xray.service
systemv OS
systemctl start xray
Access Xray from your browser at:
http://<jfrogUrl>/ui/
, go the Xray tab in the Application module in the UI.Check Xray Log.
tail -f $JFROG_HOME/xray/var/log/console.log
RabbitMQ Upgrade to version 3.11.x
Xray version 3.70.0 and later includes RabbitMQ version 3.11.x later. An upgrade to Rabbit MQ 3.11.x requires feature flags to be enabled. For more information, refer to Required Feature Flags in RabbitMQ 3.11.0.
Enable Feature Flags in Helm Installation
For Helm, we have added a pre-upgrade hook that enables feature flags in RabbitMQ before the upgrade to version 3.11.x and later. The hook runs automatically when you run the upgrade command. You can disable the hook for the subsequent upgrades.
Manual Migration Operation
You can also do the migration operation manually before you start the upgrade.
Run the following command inside the RabbitMQ container.
rabbitmqctl enable_feature_flag all
Ensure that you disable the pre-upgrade hook after you perform manual migration.
Disable Pre-upgrade Hook
Update the following values in the values.yaml
file to disable the pre-upgrade hook.
rabbitmq.migration.enabled=false rabbitmq.rabbitmqUpgradeReady=true
You can also pass these values along with the Helm upgrade command.
For example:
$ helm upgrade --install xray --namespace xray jfrog/xray --set rabbitmq.migration.enabled=false --set rabbitmq.rabbitmqUpgradeReady=true
Enable Feature Flags in Linux Installations
You need to manually run the migration operation for RabbitMQ before you start Xray upgrade for your Linux installation (RPM, Debian, and Linux Archive).
Run the following command in the nodes that run RabbitMQ.
sudo -H -u xray bash -c 'export RABBITMQ_FEATURE_FLAGS="drop_unroutable_metric,empty_basic_get_metric,implicit_default_bindings,maintenance_mode_status,quorum_queue,stream_queue,user_limits,virtual_host_metadata"' sudo -H -u xray bash -c '/opt/jfrog/xray/app/third-party/rabbitmq/sbin/rabbitmqctl enable_feature_flag all'
Enable Feature Flags in Docker Compose
Run the following command inside the RabbitMQ container.
rabbitmqctl enable_feature_flag all