jfrog / JFrog-Cloud-Installers

Template to deploy Artifactory Enterprise cluster.
Apache License 2.0
78 stars 138 forks source link

[ansible/xray]Running only xray installation, fails to access to the server #113

Closed andrescolodrero closed 3 years ago

andrescolodrero commented 3 years ago

Which installer: Ansible, posgres and xray role ONLY playbook: collections:

Which product and version (eg: ansible & collection version - 1.1.2): Ansible 2.9.6 XRAY latest (following base galaxy collection)

Which operating system and version(eg: ubuntu & version - 20.4): Ubuntu 20.4

What happened: In the docs: The xray role will install Xray software onto the host. An Artifactory server and Postgress database is required. But i have already a server dedicated to artifactory. so i defined the variable jfrog_url: https://myartifactory

I run a playbook to install only posgress and xray. Ansible installation works, but i cant access to xray portal, by example. http://myservername -> nothing http://myservername:8000 -> nothing

netstat -tunlp (nothing running on port 8000, 80,) server running: ● xray.service - JFrog Xray service Loaded: loaded (/lib/systemd/system/xray.service; enabled; vendor preset: enabled) Active: active (running) since Wed 2021-05-12 21:13:37 GMT; 44s ago Process: 416158 ExecStart=/opt/jfrog/xray/app/bin/xrayManage.sh start (code=exited, status=0/SUCCESS) Main PID: 418184 (jf-server) Tasks: 0 (limit: 7031) Memory: 1.0M CGroup: /system.slice/xray.service ‣ 418184 /opt/jfrog/xray/app/server/bin/jf-server

May 12 21:13:12 TisXRYx21 systemd[1]: Starting JFrog Xray service... May 12 21:13:12 TisXRYx21 xrayManage.sh[416158]: Resolved .shared.user (xray) from /opt/jfrog/xray/var/etc/system.yaml May 12 21:13:12 TisXRYx21 xrayManage.sh[416158]: Resolved .shared.group (xray) from /opt/jfrog/xray/var/etc/system.yaml May 12 21:13:12 TisXRYx21 su[416308]: (to xray) root on none May 12 21:13:12 TisXRYx21 su[416308]: pam_unix(su:session): session opened for user xray by (uid=0) May 12 21:13:37 TisXRYx21 systemd[1]: Started JFrog Xray service.

install.log -> no errors console.log -> 2021-05-12T21:13:39.119Z [jfrou] [FATAL] [15f760333f212368] [bootstrap.go:105 ] [main ] - Could not join access, err: cluster join: Failed joining the cluster; Error: Error response from service registry, status code: 404; message: HTTP 404 Not Found

...

2021-05-12T21:15:36.246Z [jfxr ] [INFO ] [ ] [access_client_bootstrap:167 ] [main ] (--wrapper--)Cluster join: Retry 120: 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 127.0.0.1:8046: connect: connection refused root@TisXRYx21:/opt/jfrog/xray/var/log#

systendiagnostics.log -> all good here, only DEBUG lines

What you expected to happen:

To be able to access to xray server

Anything else we need to know:

andrescolodrero commented 3 years ago

Probably my question should be, if this collection is only for JFrog Platform, not standolone products?

chukka commented 3 years ago

@andrescolodrero it should work , Can you check what joinKey did you pass to connect in Xray role?

andrescolodrero commented 3 years ago

HI, i double check master.key and join.key, and still cant make it work, not even XRAY ui.

could be this installation not compatible with Artifactorty 6.12 ?

2021-05-14T14:09:53.628Z [jfxr ] [ERROR] [82eb82c67bce979d] [ha_service:116 ] [main ] Failed to register node: Failed to register node, master keys do not match 2021-05-14T14:09:53.628Z [jfxr ] [ERROR] [82eb82c67bce979d] [general_utils:23 ] [main ] Critical error: exiting from Xray Program, reason: Failed to register node: Failed to register node, master keys do not match

i double checkd that master.key is the same on artifactory server and xray.

systemdiagnostics.log

shared.database.password: already encrypted shared.newrelic.licenseKey: does not exist in the config file shared.rabbitMq.password: already encrypted shared.security.joinKey: already encrypted 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 2021-05-14T14:

chukka commented 3 years ago

@andrescolodrero

HI, i double check master.key and join.key, and still cant make it work, not even XRAY ui.

could be this installation not compatible with Artifactorty 6.12 ?

2021-05-14T14:09:53.628Z [jfxr ] [ERROR] [82eb82c67bce979d] [ha_service:116 ] [main ] Failed to register node: Failed to register node, master keys do not match 2021-05-14T14:09:53.628Z [jfxr ] [ERROR] [82eb82c67bce979d] [general_utils:23 ] [main ] Critical error: exiting from Xray Program, reason: Failed to register node: Failed to register node, master keys do not match

i double checkd that master.key is the same on artifactory server and xray.

systemdiagnostics.log

shared.database.password: already encrypted shared.newrelic.licenseKey: does not exist in the config file shared.rabbitMq.password: already encrypted shared.security.joinKey: already encrypted 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 2021-05-14T14:

could be this installation not compatible with Artifactorty 6.12 ?

Yes, Min requirement is Artifactory 7.17.4 and above