ARTIFACTORY: How to analyze Artifactory logs in case of issues

ARTIFACTORY: How to analyze Artifactory logs in case of issues

Products
Frog_Artifactory
Content Type
User_Guide
AuthorFullName__c
Tatarao Vana
articleNumber
000005420
ft:sourceType
Salesforce
FirstPublishedDate
2022-09-28T10:53:28Z
lastModifiedDate
2025-04-28
VersionNumber
4
Introduction

As a fundamental component of your daily operations with the JFrog Artifactory application, you may occasionally encounter technical issues. Before contacting JFrog Support, we encourage you to explore the logs for potential error messages and solutions to resolve them independently. The JFrog Platform efficiently aggregates logging data across all JFrog products and services. This central logging mechanism adheres to standardized formats and naming conventions, enabling efficient troubleshooting. This article will walk you through on the troubleshooting approach to follow using logs generated by the application.


Importance of Trace ID in Troubleshooting

In our JFrog Platform, we have introduced a Trace ID concept to trace each request. It simplifies the analysis of logs, allowing us to trace the flow of events across services with greater precision, thereby making issue resolution more efficient.


Log Format Overview

As mentioned in our documentation, the active log files for each JFrog service are located in the $JFROG_HOME/<product>/var/log directory. Each log file name begins with the service name and a dash, for example, artifactory-service.log and router-request.log.

Service Log Entries
The structure of a service log file entry is as follows:
Timestamp (UTC) [Service Type] [Level] [Trace ID] [Class and Line Number] [Thread] - Message

Example:
2025-04-18T15:39:04.902Z [jfac] [INFO] [4b1b8a0b04e31b80] [s.r.NodeRegistryServiceImpl:44] [http-exec-4] - Request to "join" with serviceId jffe@000

Request Log Entries
Request log entries follow a structured format:
Timestamp | Trace ID | Remote Address | Username | Request Method | Request URL | Return Status | Request Content-Length | Response Content-Length | Request Duration | Request User Agent

Example:
2025-04-18T15:39:04.902Z|d5d75b3c41242768|127.0.0.1|anonymous|GET|api/v1/cert/root|200|0|6|0|JFrog Access Java Client/x.y.z.

Example Use Case:

Uploading an Artifact to Artifactory using cURL

When deploying an artifact via cURL, the request and its resultant log entries can be reviewed for the corresponding trace ID.

Sample cURL Command to deploy an artifact in Artifactory
$ curl -u admin -X PUT http://jfrog.local/artifactory/example-repo-local/apache-log4j-2.13.3-bin.tar.gz -T ~/Downloads/apache-log4j-2.13.3-bin.tar.gz
Upon successful artifact upload, the following log entries will be generated, illustrating the correlation between the request and the service's operations.

Example Service Log Entry:
2025-04-18T05:19:49.158Z [jfrt] [INFO] [2e896eb103b28d7c] [o.a.e.UploadServiceImpl:466] [http-nio-8081-exec-6] - Deploy to 'example-repo-local:apache-log4j-2.13.3-bin.tar.gz' Content-Length: 14378385 (estimation) artificial: false

Search for Relevant Logs using Trace Id
With the help of trace ID (2e896eb103b28d7c), we can perform a search within your log files to gather insights from all relevant microservice logs. 

Here is a sample command for the reference.  
$ grep -iR 2e896eb103b28d7c /opt/jfrog/artifactory/var/log/*
This command will help you compile all related log entries, thus providing a comprehensive view of the process flow and helping diagnose issues effectively.

Example Scenario: File Upload Limits
Consider a situation where a file upload attempts to exceed the maximum size set in the UI (e.g., 100 MB). The user will encounter a notification upon an unsuccessful upload attempt. If an upload of 256.9 MB is attempted, it generates an error log entry indicating the file size limit breach:

artifactory-service.log
2025-04-18T05:36:49.199Z [jfrt] [ERROR] [27cdfbdf8f906e0d] [o.a.w.s.RepoFilter:315] [http-nio-8081-exec-3] - Upload request of example-repo-local:jfrog-artifactory-pro-6.23.38.zip failed due to {}
org.jfrog.storage.binstore.ifc.ClientInputStreamException: Failed to read stream: java.io.EOFException

artifactory-request.log
2022-09-23T05:36:49.223Z|27cdfbdf8f906e0d|x.x.x.x|admin|PUT|/example-repo-local/jfrog-artifactory-pro-6.23.38.zip|404|265618412|0|76877|curl/7.79.1
By examining the comprehensive array of log files for the associated trace ID, we can effectively identify where the issue originated in the request processing chain. Here is the sample command for the reference. 
$ grep -iR 27cdfbdf8f906e0d /opt/jfrog/artifactory/var/log/*

We will be able to list all the entries related to this request in Artifactory logs to identify the chain events happening in the backend. 

Conclusion

In most cases, a thorough examination of the request flow accompanied by an assessment of errors and warnings within the log entries will lead to a clear understanding of the root cause of the issues encountered. By leveraging the enhanced logging features of the JFrog Platform, you can efficiently diagnose and resolve technical issues, minimizing disruption to your workflows.


For further assistance, feel free to engage JFrog Support, but we encourage you to utilize these logging insights as a first step in your troubleshooting efforts.