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

jtw3ybtb  于 2022-12-11  发布在  Jenkins
关注(0)|答案(2)|浏览(249)

我已经在一个单独的服务器上安装了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

console.log
它说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

X射线控制台. 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?

ef1yzkbh

ef1yzkbh1#

导航到位置$JFROG_HOME/xray/var/log (mostly /opt/jfrog/xray/var/log)并检查console.log文件。该文件应包含问题的正确详细信息。
您可能还想查看一下xray-server-service.log。如果从这些文件中未识别出任何内容,请共享相关的日志片段。
您也可以导航到$JFROG_HOME/xray/app/bin并手动启动应用程序,作为故障排除的一部分。

ljsrvy3e

ljsrvy3e2#

确认您是否正在尝试打开Artifactory平台URL,但无法在其中看到X射线。
如果是,请确保以下两个详细信息存在于X射线服务器中。

  1. JfrogUrl -部署JFrog Artifactory的计算机的URL,或指向该计算机的负载平衡器的URL。建议使用DNS名称而不是直接IP。例如:“http://jfrog.acme.com或。请注意,不再需要/artifactory上下文。请在$JFROG_HOME/xray/var/etc/system.yaml文件的”共享配置“部分中设置它。
  2. join.key -这是Artifactory注册和验证X射线服务器所需的“秘密”密钥。您可以从用户管理中的JPD UI获取Artifactory joinKey(join密钥)|设定|联接密钥。在$JFROG_HOME/xray/var/etc/system.yaml文件的“共享配置”部分中设置Artifactory服务器使用的join.key。
    如果X射线连接成功,理想情况下,您应该能够在Artifactory平台UI中看到X射线。如果没有,请再次访问控制台日志。

相关问题