繁体   English   中英

Jfrog Xray 服务已启动并正在运行,但未反映在 Jfrog UI 中

[英]Jfrog Xray services is Up and Running but not Reflecting in Jfrog UI

我在单独的服务器中安装了 Xray,但在启动服务时抛出了以下错误。

● xray.service - Xray service
   Loaded: loaded (/usr/lib/systemd/system/xray.service; enabled; vendor preset: disabled)
   Active: failed (Result: exit-code) since Sat 2022-12-03 12:36:50 IST; 1min 17s ago
  Process: 1217 ExecStart=/opt/jfrog/xray/app/bin/xray.sh start (code=exited, status=1/FAILURE)
 Main PID: 1217 (code=exited, status=1/FAILURE)

systemDiagnostics.log中,它表示 YAML 文件不存在,但我可以在该确切位置看到 system.yaml 文件。

[WARN ] Error while initializing File resolver : Config file does not exists : /opt/jfrog/xray/var/etc/system.yaml
[INFO ] Router external port (8082) is open
[INFO ] Router internal port (8046) is open
[INFO ] Router traefik port (8049) is open
[INFO ] Router grpc port (8047) is open
[INFO ] XrayServer port (8000) is open
[INFO ] XrayAnalysis port (7000) is open
[INFO ] XrayIndexer port (7002) is open
[INFO ] XrayPersist port (7003) is open
[INFO ] Ulimit level for processes is satisfactory--no change required
ulimit value(4096) is below expected value(100000)
[ERROR] Ulimit level for open files is less than the recommended minimum 100000
[INFO ] Router external port (8082) is not blocked by firewall
[INFO ] Router internal port (8046) is not blocked by firewall
[INFO ] Router grpc port (8047) is not blocked by firewall
[INFO ] Router traefik port (8049) is not blocked by firewall
[INFO ] XrayServer port (8000) is not blocked by firewall
[INFO ] XrayAnalysis port (7000) is not blocked by firewall
[INFO ] XrayIndexer port (7002) is not blocked by firewall
[INFO ] XrayPersist port (7003) is not blocked by firewall
[INFO ] Router external port (8082) is not blocked by iptables
[INFO ] Router internal port (8046) is not blocked by iptables
[INFO ] Router grpc port (8047) is not blocked by iptables
[INFO ] Router traefik port (8049) is not blocked by iptables
[INFO ] XrayServer port (8000) is not blocked by iptables
[INFO ] XrayAnalysis port (7000) is not blocked by iptables
[INFO ] XrayIndexer port (7002) is not blocked by iptables
[INFO ] XrayPersist port (7003) is not blocked by iptables
[INFO ] Router external port (8082) is not blocked by ip6tables

控制台日志

它说 master.key 文件不存在,但我可以看到它在那个位置。

[INFO ] JFrog Observability (jfob) service initialization started. Version: 1.11.0 (revision: 38bcc4c00d, build date: 2022-09-16T11:08:32Z) PID: 5922 Home: /opt/jfrog/xray
[DEBUG] Resolved system configuration file path: /opt/jfrog/xray/var/etc/system.yaml
Logging configuration has both console=true and filepath='router-service.log'; ignoring console.
2022-12-03T07:05:40.342Z ^[[36m[jfrou]^[[0m ^[[34m[INFO ]^[[0m [7a8ced89c2f6d1db] [bootstrap.go:77               ] [main                ] [] - Router (jfrou) service initialization started. Version: 7.51.0-1 Revision: fd36933e55dfc526ec51ec35f5face80a80debac PID: 5895 Home: /opt/jfrog/xray
2022-12-03T07:05:40.342Z ^[[36m[jfrou]^[[0m ^[[34m[INFO ]^[[0m [7a8ced89c2f6d1db] [bootstrap.go:80               ] [main                ] [] - JFrog Router IP: 192.168.71.30
2022-12-03T07:05:40.505Z ^[[33m[jfxan]^[[0m ^[[34m[INFO ]^[[0m [49203c85e5fdf6fe] [run_main:351                  ] [main                ] Loading config, service name: analysis
2022-12-03T07:05:40.505Z ^[[33m[jfxan]^[[0m ^[[34m[INFO ]^[[0m [49203c85e5fdf6fe] [start_xray_server:288         ] [main                ] Xray Analysis (analysis) service initialization started
2022-12-03T07:05:40.505Z ^[[33m[jfxan]^[[0m ^[[34m[INFO ]^[[0m [                ] [fileutil:73                   ] [main                ] no master key found, cause: failed resolving 'shared.security.masterKey' key; file does not exist: /opt/jfrog/xray/var/etc/security/master.key
2022-12-03T07:05:40.505Z ^[[33m[jfxan]^[[0m ^[[34m[INFO ]^[[0m [                ] [connection_pool_holder:94     ] [main                ] connecting to postgresql attempt #1
2022-12-03T07:05:41.343Z ^[[36m[jfrou]^[[0m ^[[34m[INFO ]^[[0m [7a8ced89c2f6d1db] [bootstrap.go:130              ] [main                ] [] - System configuration encryption report:
shared.database.password: encrypted successfully
shared.multiTenant.tenantRegistryClient.clientCertKey: does not exist in the config file
shared.newrelic.licenseKey: does not exist in the config file
shared.rabbitMq.password: encrypted successfully
shared.security.joinKey: encrypted successfully
shared.security.joinKeyFile: file '/opt/jfrog/xray/var/etc/security/join.key' - open /opt/jfrog/xray/var/etc/security/join.key: no such file or directory
2022-12-03T07:05:41.344Z ^[[36m[jfrou]^[[0m ^[[34m[INFO ]^[[0m [7a8ced89c2f6d1db] [bootstrap.go:85               ] [main                ] [] - JFrog Router Service ID: jfrou@0abcdefgh
2022-12-03T07:05:41.344Z ^[[36m[jfrou]^[[0m ^[[34m[INFO ]^[[0m [7a8ced89c2f6d1db] [bootstrap.go:86  

现在 Xray 服务已启动并正在运行,但是当我单击 Xray 选项卡时 JFrog UI 没有变化?

以下是 JFrog 系统日志中出现的错误

 Forbidden UI REST: Xray is not configured on the repo 'libs-release-local' or file 'db2jcc4/db2jcc4/10.5.0.5/db2jcc4-10.5.0.5.jar' is not handled by Xray

Xray 控制台.log

2022-12-04T02:28:38.441Z ^[[33m[jfxr ]^[[0m ^[[34m[INFO ]^[[0m [                ] [access_client_bootstrap:182   ] [main                ] (--wrapper--)Cluster join: Retry 85: Service registry ping failed, will retry. Error: Error while trying to connect to local router at address 'http://localhost:8046/access': Get "http://localhost:8046/access/api/v1/system/ping": dial tcp [::1]:8046: connect: connection refused

xray console.log中的错误

2022-12-04T19:55:11.997Z ^[[33m[jfxan]^[[0m ^[[34m[INFO ]^[[0m [                ] [access_client_bootstrap:182   ] [main                ] (--wrapper--)Cluster join: Retry 165: Service registry ping failed, will retry. Error: Error while trying to connect to local router at address 'http://localhost:8046/access': Get "http://localhost:8046/access/api/v1/system/ping": dial tcp [::1]:8046: connect: connection refused

我是否需要在 JFrog UI 中进行任何手动更改以在 UI 级别启用 Xray?

导航到$JFROG_HOME/xray/var/log (mostly /opt/jfrog/xray/var/log)并检查 console.log 文件。 这应该有问题的正确细节。

您可能还想看看 xray-server-service.log。 如果没有从这些文件中识别出任何内容,请共享相关的日志片段。

您还可以导航到$JFROG_HOME/xray/app/bin并手动启动应用程序作为故障排除的一部分。

确认您是否尝试打开 Artifactory 平台 URL 并且无法在其中看到 Xray。

如果是,您能否确保 xray 服务器中存在以下两个详细信息。

  1. JfrogUrl - URL 到部署 JFrog Artifactory 的机器,或指向它的负载均衡器。 建议使用 DNS 名称而不是直接 IP。 例如:“http://jfrog.acme.com 或http://10.20.30.40:8082” 请注意,不再需要 /artifactory 上下文。 在 $JFROG_HOME/xray/var/etc/system.yaml 文件的共享配置部分进行设置。

  2. join.key - 这是 Artifactory 注册和验证 Xray 服务器所需的“秘密”密钥。 您可以从用户管理中的 JPD UI 中获取 Artifactory joinKey(加入密钥)| 设置 | 加入关键。 在 $JFROG_HOME/xray/var/etc/system.yaml 文件的共享配置部分中设置您的 Artifactory 服务器使用的 join.key。

如果 Xray 连接成功,理想情况下,您应该能够在 Artifactory 平台 UI 中看到 Xray。 如果没有,请再次访问控制台日志。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM