XRAY -如何克服问题时,x射线在线DB同步失败与401?

穆罕默德Kashif
2023-01-22 11:07

当Xray DB同步失败时,下面的日志记录在Xray-server-service.log中,[2020/10/06 11:25:38 CEST] [error] (www.si-fil.com/xray/internal/jobs.DownloadOnlineUpdates:584) Updates worker id 0 failed to download update from https://jxray.jfrog.io/api/v1/updates/bundles?from=1593080483014&to=1601976328671: failed to access:https://jxray.jfrog.io/api/v1/updates/bundles?From = 159308048304 &to=1601976328671返回状态代码:401问题是JXray服务器正在响应401。当JXray服务器无法验证您的许可证时,就会发生这种情况。

当许可证被列入黑名单时,将发生此错误。当更新了许可证而前一个许可证过期时,就会出现黑名单。请检查是否有任何Artifactory许可证更新发生,并联系JFrog支持。

此外,有可能使用了x射线试用许可证,并在Artifactory中添加了一个新的许可证,可能是试用许可证仍然在x射线上。要验证试用许可证是否有机会附加到Xray实例,请导航到Xray UI -> Admin -> Configuration ->激活Xray v2的试用许可证。>管理- > License |激活Xray v3的Xray Trail License。xand If there are any trial license attached, remove it and the Xray DB sync issue should be resolved upon removing the trial license.

如果数据库同步仍然再次返回401错误,那么这可能与代理/防火墙不允许的对来自Xray主机的url的限制有关。

  1. https://releases.jfrog.io/
  2. https://releases-cdn.jfrog.io
  3. https://dl.bintray.com/
  4. https://akamai.bintray.com
  5. https://jxray.jfrog.io

参考这个KB文章查看需要加入白名单的url。

要测试同步的能力,运行以下REST API端点:curl https://jxray.jfrog.io/api/v1/system/ping如果返回“PONG”作为输出,则此URLhttps://jxray.jfrog.io可以通过网络访问。如果问题仍然存在,请联系JFrog支持。