Introduction
Upgrading Xray Server can sometimes lead to issues with the bundled Erlang package, particularly when Erlang isn't manually updated. This can manifest as connection errors, such as the following:
2025-06-05T12:38:28.054Z [33m[jfxr ][0m [31m[WARN ][0m [0a4ae355a2cbe56e] [samplers:53 ] [MainServer ] RabbitMQ keep alive: failed in checking MQ availability: failed to open a new connection
--- at /go/src/jfrog.com/xray/xray/backend/backend/xqueue/exchange_handler.go:153 (xChangeHandler.IsMQAvailable) ---
Caused by: dial tcp [::1]:5672: connect: connection refused
2025-06-05 14:09:22.512263+02:00 [warning] <0.1737.0> HTTP listener registry could not find context rabbitmq_management_tls
2025-06-05 14:09:22.522326+02:00 [info] <0.228.0> Peer discovery backend rabbit_peer_discovery_classic_config does not support registration, skipping unregistration.
2025-06-05 14:09:22.522549+02:00 [info] <0.1833.0> stopped TCP listener on [::]:5672
This guide provides steps to manually upgrade Erlang and resolve this issue.
Resolution
Follow these steps to successfully upgrade Erlang and complete your Xray Server upgrade:
1. Stop Xray Services:
Before proceeding, ensure all Xray services are stopped.
2. Check Current Erlang Version:
Determine the currently installed Erlang version on your system by running:
erl -version
3. Verify Bundled Erlang Version:
Navigate to the RabbitMQ directory within your Xray installation to check the Erlang version bundled with Xray:
$Xray_Installar_path/xray/third-party/rabbitmq
4. Install the Bundled Erlang Package:
If the bundled Erlang version differs from your currently installed version, uninstall the existing Erlang package and then install the bundled version found in the path mentioned above. You can typically find the bundled Erlang RPM in the rabbitmq directory. For example, to check dependencies of an RPM, you can use:
rpm -qpR erlang-<version>.rpm
Place with the actual filename of the Erlang RPM found in the RabbitMQ directory.
5. Clear RabbitMQ Cached Data:
After upgrading Erlang, RabbitMQ might still be using cached Mnesia table data from previous versions. To prevent conflicts, 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.
Conclusion
These instructions should help you successfully resolve issues related to the Erlang package during your Xray Server upgrade. If you encounter any further difficulties, please contact JFrog Support for assistance.