How to Scrub Artifactory’s Cached YAML Files
Subject
On start up, Artifactory creates YAML files to cache the node IDs of the connected JFrog Products (i.e. Xray).
Sometimes, the cached YAML files can cause errors if a JFrog Product is reinstalled on the same server since the node ID will be updated but Artifactory is still storing the previous node ID.
An example error message could be:Cluster join: Error during cluster join: Error response from service registry, status code: 409; message: Requested Router Join for nodeId: xray-0 at: IP_ADDRESS conflicts (node id) with existing node
Affected Versions
JFrog Platform versions (Artifactory 7.x, Xray 3.x, etc)
Resolution
To scrub Artifactory of its cached YAML files, move all YAML files in the $JFROG_HOME/data/router/local/services/
directory into a temporary directory.
Here is an example of the $JFROG_HOME/data/router/local/services/
folder:root@jfrog:/var/opt/jfrog/artifactory/data/router/local/services# ls -lsa
total 28
4 drwxr-xr-x 2 artifactory artifactory 4096 Sep 9 17:15 .
4 drwxr-xr-x 3 artifactory artifactory 4096 Jul 9 19:19 ..
4 -rw------- 1 artifactory artifactory 344 Sep 9 17:15 jf-access_5b30e596-6583-4464-a6a3-850651bf90ba.yaml
4 -rw------- 1 artifactory artifactory 335 Sep 9 17:15 jfevt_5b30e596-6583-4464-a6a3-850651bf90ba.yaml
4 -rw------- 1 artifactory artifactory 261 Sep 9 17:15 jffe_000.yaml
4 -rw------- 1 artifactory artifactory 227 Sep 9 17:15 jfmd_01ectcvrgj4ktwn36ng7hvnrta.yaml
4 -rw------- 1 artifactory artifactory 352 Sep 9 17:15 jfrt_01d8m3sm6q0rj21rqj47331ayc.yaml
Once they are moved, reboot Artifactory. Artifactory will create a fresh new set of YAML files.