How to overcome “Xray is disabled or not supported by this instance’s license” after upgrade to Unified Platform?

Muhammed Kashif
2020-08-20 20:30

We might get into the license-related issue when connecting to Xray from the Artifactory when the upgrade is performed on Artifactory and Xray to Unified Platform. Once the upgrades are successful but the Xray cannot connect to Artifactory, first, refer to the Xray-server-service.log file to check what is the error thrown.2020-06-29T13:07:09.640Z [33m[jfxr ][0m [1m[31m[ERROR][0m [                ] [support_bundle_service:220    ] [main                ] {
  "errors" : [ {
    "status" : 400,
    "message" : "{\"error\":\"Xray is disabled or not supported by this instance's license.\"}"
  } ]
}
And if the above error is thrown, then navigate to the Config Descriptor under the JPD UI → Administration → Service | Artifactory → Config Descriptor and look for the <xrayConfig> tag,<xrayConfig>
     <enabled>true</enabled>
     <baseUrl>http://localhost:8046/xray/</baseUrl>
     <user></user>
     <password></password>
     <artifactoryId>default</artifactoryId>
     <xrayId></xrayId>
     <allowDownloadsXrayUnavailable>false</allowDownloadsXrayUnavailable>
     <allowBlockedArtifactsDownload>false</allowBlockedArtifactsDownload>
     <blockUnscannedTimeoutSeconds>60</blockUnscannedTimeoutSeconds>
</xrayConfig>
If the <artifactoryId> is “default” as above, then the issue is that after Upgrade to Unified Platform the <artifactoryId> is changed from actual artifactory’s Id to Xray with "default". To overcome this, run the below DB query against the Xray’s PosgreSQL,SELECT bin_mgr_id FROM binary_managers;The output of the query will return the <artifactoryId> of the Artifactory which was connected to Xray successfully prior to the upgrade and if the output of the above DB query is not “default”, kindly change the <artifactoryId> under the Config Descriptor from ”default” to the output of the query.

For instance, if the output of the DB query is “Artifactory” as below,SELECT bin_mgr_id FROM binary_managers;
Output: Artifactory
Then change the <xrayConfig> tag's <artifactoryId> element from “default” to “Artifactory<xrayConfig>
     <enabled>true</enabled>
     <baseUrl>http://localhost:8046/xray/</baseUrl>
     <user></user>
     <password></password>
     <artifactoryId>Artifactory</artifactoryId>
     <xrayId></xrayId>
     <allowDownloadsXrayUnavailable>false</allowDownloadsXrayUnavailable>
     <allowBlockedArtifactsDownload>false</allowBlockedArtifactsDownload>
     <blockUnscannedTimeoutSeconds>60</blockUnscannedTimeoutSeconds>
</xrayConfig>
Once done, save the changes and this should resolve the license-related issue and Xray should be connected to the Artifactory and should be accessible under the JFrog Unified UI.