Encountering microservices heartbeat issues on specific nodes, even after a simultaneous restart of all nodes, can be a puzzling situation. If the Artifactory service displays inconsistent uptimes compared to other services in the microservices environment, it warrants thorough investigation.
To troubleshoot this issue, follow these steps:
1. Check Artifactory Service ID:
Use the following curl command to retrieve the Artifactory service ID:
curl -u admin:password http://localhost:8081/artifactory/api/system/service_id -w "\n"Note: The service ID format has changed since Artifactory version 5.4.0, where it is represented as "jfrt@"; for versions below 5.4.0, it was "jf-artifactory@."
2. Identify Service ID Format:
If both old and new formats of Artifactory service IDs exist in /var/opt/jfrog/artifactory/data/router/local/services (e.g., jf-artifactory_XXXXXXX.yaml and jfrt_XXXXXXX.yaml), use the following curl command to verify the valid format:
curl -u admin:password http://localhost:8081/artifactory/api/system/service_id -w "\n"The response will indicate the valid format, such as "jf-artifactory@xxxxxxxxx" for the old format.
3. Remove Invalid Format:
Note that either "jfrt" or "jf-artifactory" should be present in the /var/opt/jfrog/artifactory/data/router/local/services directory.
If the new format (jfrt_XXXXXXX.yaml) is detected as invalid, remove it from the /var/opt/jfrog/artifactory/data/router/local/services directory:
rm /var/opt/jfrog/artifactory/data/router/local/services/jfrt_XXXXXXX.yaml
4. Restart Artifactory Service:
After removing the invalid format, restart the Artifactory service:
systemctl restart artifactory
By following these steps, you can resolve microservices heartbeat issues related to conflicting Artifactory service IDs and ensure the proper functioning of the Artifactory service in your environment.