ARTIFACTORY: Artifactory Tmp Directory Update in Version 7.98.7

ARTIFACTORY: Artifactory Tmp Directory Update in Version 7.98.7

AuthorFullName__c
Nir Shervi
articleNumber
000006236
ft:sourceType
Salesforce
FirstPublishedDate
2024-11-12T11:07:09Z
lastModifiedDate
2024-11-13
VersionNumber
2
Introduction

With Artifactory version 7.98.7, changes were introduced to the tempDir configuration.
In prior versions, tempDir was always set relative to baseDataDir.
This meant that even if an absolute path like /tmp was specified in binarystore.xml, Artifactory would still direct tempDir to $BASEDATADIR/filestore/tmp.
Now, however, tempDir will directly point to the absolute path specified, such as /tmp. To keep the previous behavior, use a relative path like tmp.
Specifying an absolute path can boost performance, especially when baseDataDir is located on an NFS.

For more details about the tempDir configuration, refer to the JFrog Documentation.


Cross-Device Link Error


Description

After upgrading Artifactory to version 7.98.7 or above, you might encounter a cross-device link error when the tempDir value is set to an absolute path like /tmp. This setup will direct binaries to the /tmp directory rather than $BASEDATADIR/filestore/tmp. This can result in an error similar to the following:
2024-11-07T06:17:25.624Z [jfrt ] [ERROR] [****] [r.s.RepositoryServiceImpl:1730] [ttp-nio-8081-exec-10] - Cannot deploy to '{jfrog-usage-logs:New/artifactory/2024-11-07/Example-metadata-consumption-usage.2024-11-07T08-11-49.567.log.gz}'./tmp/dbRecordExample-jfrog-usage-logs.bin -> /../filestore/f0/f0Example: Invalid cross-device link
java.nio.file.AtomicMoveNotSupportedException: /tmp/dbRecordExample-jfrog-usage-logs.bin -> /../filestore/f0/f0Example: Invalid cross-device link


Resolution

To resolve this issue, update the tempDir path in the _HOME/artifactory/var/etc/artifactory/binarystore.xml file to a relative path as shown below:
<config version="v1">
    <chain template="file-system"/>
    <provider id="file-system" type="file-system">
        <baseDataDir>/var/opt/jfrog/data</baseDataDir>
        <fileStoreDir>/filestore</fileStoreDir>   
        <tempDir>tmp</tempDir>
    </provider>
</config>

Restart Artifactory for the changes to take effect.


Verification

After updating the configuration and restarting, verify that the modification to $JFROG_HOME/artifactory/var/etc/artifactory/binarystore.xml is effective and check that the cross-device link error no longer appears in the artifactory-service.log file.