ARTIFACTORY: How do I resolve the “Master authentication token is expired for remote” error?

ARTIFACTORY: How do I resolve the “Master authentication token is expired for remote” error?

AuthorFullName__c
Fadi Rouhana
articleNumber
000005665
ft:sourceType
Salesforce
FirstPublishedDate
2023-04-02T08:24:32Z
lastModifiedDate
2023-04-02
VersionNumber
1

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: Finally, you may execute the Synchronize Federated Member Configuration to run a full synchronization between the federated repository members.