XRAY: Xray DB Sync won't start

AuthorFullName__c
Rasul Imanov
articleNumber
000005338
FirstPublishedDate
2022-07-19T12:43:51Z
lastModifiedDate
2025-05-15

XRAY: Xray DB Sync won't start

Xray Database Sync is used to synchronize issues and vulnerabilities regularly and automatically, once a day. Initial Database Synchronization might take some time to complete but in some cases, the progress bar won't move and you will be faced with an error like below

User-added image

And you might see something similar to the picture snippet below in your Xray logs
User-added image

This is usually caused by an expired license or due to proxy settings blocking some URLs. We might need to refresh the license via cURL or perhaps there is an old trial license stuck in your Xray DB that we need to get rid of, or we might need to whitelist some URLs. Let's review the different methods we can take to resolve this issue. 

Method 1: Whitelist URLs if using Proxy/Firewall

If you are using a firewall, to allow the database sync to complete successfully, you need to add the following URLs to your firewall's whitelist:

  1. https://releases.jfrog.io/
  2. https://releases-cdn.jfrog.io/
  3. https://jxray.jfrog.io/

To test the ability to sync, run the following REST API endpoint from the Xray host:
https://jxray.jfrog.io/api/v1/system/ping

Method 2: Remove cached license from Xray DB

Navigate to your Xray instance and perform the following commands:

  • sudo -u postgres psql -d xraydb
  • select encode("config"::bytea, 'escape') from configuration where config_id = 'xrayConfig';

This will produce a JSON and in this output, if you locate a trial license inside the "license_config" tag, then we can run 

  • DELETE FROM configuration WHERE config_id='xrayConfig';

Restart Xray and try the DB Sync again. 

Method 3: Refresh License 

In order to refresh our Xray License, we can run the below REST API curl command 
curl -XPOST -v -uadmin http://<ARTIFACTORY>/xray/ui/binMgr/refreshLicense/<license-id>
And we should get a 200OK HTTP status code to confirm that the license has been refreshed.
Restart Xray and try the DB Sync again.