Qualifying Attempted Imports of Non-Existent Binaries

ARTIFACTORY: How to Resolve Federated Repository Desync Due To Networking Issues

AuthorFullName__c
Andrew Grosskurth
articleNumber
000005752
ft:sourceType
Salesforce
FirstPublishedDate
2023-05-28T08:50:05Z
lastModifiedDate
2023-05-28
VersionNumber
2
In the $ARTIFACTORY_HOME/var/log/artifactory-service.log file, look for entries that are similar to the below:
2023-04-12T21:11:27.056Z [jfrt ] [ERROR] [293edef4f314f0ea] [p.f.t.PersistedTaskConsumer:88] [ated-binary-consumer] - Failed to import binary with sha1: 37e42b3ac0b92eb44dbad92131cdf5eb40d4ca51, repoKey: test-repository, remoteUrl: https://<ARTIFACTORY_URL>/artifactory

From this log, we will take the sha1 value and check the storage endpoint from the remoteURL instance’s filestore to confirm if any binaries exist with that sha1 value.

If there are multiple sha1 binaries failing imports that no longer exist on the filestore, we can begin purging these entries from the binaries_tasks table. To do this, we can initiate a delete query on these entries.

**IMPORTANT NOTE**: Before any manual database actions, it is highly recommended that a database backup is performed. This will ensure that if there are any complications with any of the actions performed, we have a point we can restore from.

An example delete query for PostgreSQL:
DELETE FROM binaries_tasks WHERE time >= 1643673600000 and count > 0;

Once this query completes, it is recommended to initiate a Federated Repository Full Sync on these repositories from one of the Federation Members with the latest artifacts. This will ensure that all of the Federation Members are synced to the most up-to-date binaries list.