XRAY: Xray upgrade failure from older version to 3.107.x due to older erlang version

XRAY: Xray upgrade failure from older version to 3.107.x due to older erlang version

AuthorFullName__c
Sushmita S Shetty
articleNumber
000006259
ft:sourceType
Salesforce
FirstPublishedDate
2024-12-10T10:34:18Z
lastModifiedDate
2024-12-10
VersionNumber
1
Introduction 

This article provides guidance if you notice issues with the Erlang package while upgrading Xray Server from any lower version to version 3.107.x. Xray version 3.107.x includes Erlang 26.1.2-1 as a bundled dependency, which requires manual upgrading. Failure to manually upgrade Erlang can result in the following error:
./app/third-party/rabbitmq/sbin/rabbitmqctl cluster_status
=ERROR REPORT==== 28-Nov-2024::14:41:35.656673 ===
beam/beam_load.c(551): Error loading function elixir:start/2: op put_tuple u x:
please re-compile this module with an Erlang/OTP 26 compiler or update your Erlang/OTP version


Resolution

Follow these steps to resolve the issue and complete the upgrade:

1. Stop the Xray Services

Ensure all Xray services are stopped before proceeding.

2. Upgrade the Current Erlang Version

Navigate to the RabbitMQ directory:
$JFROG_HOME/xray/app/third-party/rabbitmq  

3. Uninstall the Existing Erlang Package
Uninstall the current Erlang package using the following command. Ensure the command matches your installation type, the below example is for rpm package 
rpm -e --nodeps <erlang-package-name>  

4. Install the Bundled Erlang Package
The erlang-26.1.2-1.el8.x86_64.rpm package is included in Xray version 3.107.x. Install it by running the command:
 rpm -qpR erlang-26.1.2-1.el8.x86_64.rpm 
 
5. Clear RabbitMQ Cached Data
After upgrading Erlang, RabbitMQ may still use cached Mnesia table data from older versions. To resolve this:Remove the contents of the following directory:
$JFROG_HOME/xray/var/data/rabbitmq/mnesia  


6. Restart Xray Services
Finally, restart the Xray services to apply the changes.

Above instructions should help to complete the upgrade. In case if there are any further issues, please feel free to reach out to JFrog Support.