Home > database >  Jfrog Xray services is Up and Running but not Reflecting in Jfrog UI
Jfrog Xray services is Up and Running but not Reflecting in Jfrog UI

Time:12-04

I have installed Xray in seperate server, while starting the service it is throwing below error.

● 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)

And in systemDiagnostics.log it says yaml file doesn't exists, but i can able to see the system.yarml file in exact location.

[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

Edit 1: console.log

It says master.key file is not present, but i can see it is there in that location.

[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  

Edit 2

Now Xray is Service is Up and Running but there is not changes in Jfrog UI when i click on Xray Tab???

below is the error am gettig in jfrog systemlog

 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 Service.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

Do i need to make any manual changes in Jfrog UI to enable the Xray at UI level?

Thanks in advance.

CodePudding user response:

The shared details are not helping to find out the cause. Can you navigate to location $JFROG_HOME/xray/var/log (mostly /opt/jfrog/xray/var/log) and check for console.log. This should have right details of the issue. You may also want to have a look at xray-server-service.log. If nothing is identified from these files, share the relevant log snippet. You can also navigate to $JFROG_HOME/xray/app/bin and start the application manually as part of troubleshooting.

CodePudding user response:

Could you please confirm if you are trying to open Artifactory platform url and not able to see Xray in it ?

If yes, can you make sure the below two details are present in xray server.

  1. JfrogUrl - URL to the machine where JFrog Artifactory is deployed, or the load balancer pointing to it. It is recommended to use DNS names rather than direct IPs. For example: "http://jfrog.acme.com or http://10.20.30.40:8082". Note that /artifactory context is not longer required. Set it in the Shared Configurations section of the $JFROG_HOME/xray/var/etc/system.yaml file.

  2. join.key - This is the "secret" key required by Artifactory for registering and authenticating the Xray server. You can fetch the Artifactory joinKey (join Key) from the JPD UI in the User Management | Settings | Join Key. Set the join.key used by your Artifactory server in the Shared Configurations section of the $JFROG_HOME/xray/var/etc/system.yaml file.

If Xray is connected successfully, ideally, you should be able to see Xray in Artifactory platform UI. If not, revisit the console log again.

  • Related