In order to work with Federated Repositories, you will need to establish trust among the JPDs acting as members. In some cases, you may see the following error in the logs:
2023-03-23T12:02:42.031Z [jfrt ] [ERROR] [c17ec9e8c2ca5d1 ] [MirrorHeartbeatServiceImpl:283] [|art-exec-fed-109289] - Heartbeat to https://JFROG_URL/artifactory failed, unexpected error
java.lang.RuntimeException: Master authentication token is expired for remote: https://JFROG_URL, refresh the token instances must be paired again!
The above entry indicates that the trust between JPDs has expired and therefore, the heartbeat request to the other JPD at “https://JFROG_URL/artifactory” fails.
By default, the master token expiration time is set to one year. This can also be seen in the Artifactory Configuration Descriptor file (artifactory.config.latest.xml):
<authentication> <tokens> <token> <accessToken>XXXXXXX</accessToken> <baseUrl>https://JFROG_URL</baseUrl> <exchangeUrl>https://JFROG_URL/artifactory/api/v1/service_trust/exchange</exchangeUrl> <expirationInMillis>31536000000</expirationInMillis> <lastRefreshDateMillis>1680574595359</lastRefreshDateMillis> <tokenId>TOKEN_ID</tokenId> <tokenType>access_token</tokenType> <scope>jfrt@XXXXXXX:admin internal:federated-repo/* internal:service-trust/pairing/federated-repo/*:x</scope> </token> </tokens> </authentication>
To resolve this, you will need to re-establish trust between the JPDs. This can be done using one of the following options:
- Re-enabling a Circle of Trust: In this option, you will need to exchange the public token certificate between the JPDs. For more information, see How to Establish a Circle of Trust.
- Set up a new binding between relevant JPDs: Binding tokens require you to have an enabled Mission Control service since the binding token is created by Mission Control. For more information, see Setting up Binding Tokens for Federated Repositories.