Skip to content

upload sometimes creates empty files in the artifactory #2910

@r-braun

Description

@r-braun

Describe the bug

jf rt upload sometimes creates empty files in the artifactory, even though the uploaded files are non-empty and no error is reported.

Current behavior

Running the following commands demonstrates the bug:

The file to upload (conaninfo.txt):

[settings]
arch=x86
build_type=Debug
compiler=msvc
compiler.cppstd=23
compiler.runtime=static
compiler.runtime_type=Debug
compiler.update=3
compiler.version=194
os=Windows
[options]
build_gmock=True
disable_pthreads=False
hide_symbols=False
shared=False

The upload command:

userlinux@b4f18d8f0bb9:/workspace/tmp$ jf rt upload conaninfo.txt share/build/conaninfo.txt
13:55:02 [Debug] JFrog CLI version: 2.73.3
13:55:02 [Debug] OS/Arch: linux/amd64
13:55:02 [Debug] Trace ID for JFrog Platform logs: bcf670184adf6e43
13:55:02 [Debug] Using <imtfirmwarejfrog> server-id configuration
13:55:02 [🔵Info] Log path: /home/userlinux/.jfrog/logs/jfrog-cli.2025-03-05.13-55-02.91038.log
13:55:03 [🔵Info] These files were uploaded:

📦 share
└── 📁 build
    └── 📄 conaninfo.txt


{
  "status": "success",
  "totals": {
    "success": 1,
    "failure": 0
  }
}

The upload log file:

[Debug] Sending HTTP GET request to: <URL>/artifactory/api/system/version
[Info] [Thread 2] Uploading: conaninfo.txt
[Debug] Artifactory response: 200 
[Debug] Artifactory Call Home: Sending info...
[Debug] Sending HTTP POST request to: <URL>/artifactory/api/system/usage
[Debug] Sending HTTP POST request to: <URL>/jfconnect/api/v1/backoffice/metrics/log
[Debug] [Thread 2] Artifactory response: 201  
[Debug] Uploaded 1 artifacts.
[Debug] Visibility System Usage reporting: server response: 404 Not Found
404 page not found

The download command:

userlinux@b4f18d8f0bb9:/workspace/tmp$ jf rt download share/build/conaninfo.txt
13:55:31 [Debug] JFrog CLI version: 2.73.3
13:55:31 [Debug] OS/Arch: linux/amd64
13:55:31 [Debug] Trace ID for JFrog Platform logs: 9d4c02e78044f0cf
13:55:31 [Debug] Using <imtfirmwarejfrog> server-id configuration
13:55:31 [🔵Info] Log path: /home/userlinux/.jfrog/logs/jfrog-cli.2025-03-05.13-55-31.91188.log
13:55:32 [🔵Info] Trace ID for JFrog Platform logs: 9d4c02e78044f0cf
13:55:32 [🚨Error] download finished with errors, please review the logs

The download log file:

[Debug] Sending HTTP GET request to: <URL>/artifactory/api/system/version
[Debug] Sending HTTP GET request to: <URL>/artifactory/api/system/version
[Debug] Artifactory response: 200 
[Debug] JFrog Artifactory version is: 7.104.10
[Debug] Searching Artifactory using AQL query:
 items.find({"path":{"$ne":"."},"$or":[{"$and":[{"repo":"share","path":"build","name":"conaninfo.txt"}]}]}).include("name","repo","path","actual_md5","actual_sha1","sha256","size","type","modified","created","property")
[Debug] Sending HTTP POST request to: <URL>/artifactory/api/search/aql
[Debug] Artifactory response: 200 
[Debug] Streaming data to file...
[Debug] Finished streaming data successfully.
[Info] [Thread 2] Downloading "share/build/conaninfo.txt" to "build/conaninfo.txt"
[Debug] Sending HTTP GET request to: <URL>/artifactory/share/build/conaninfo.txt
[Debug] Artifactory response: 200 
[Debug] Artifactory Call Home: Sending info...
[Debug] Sending HTTP POST request to: <URL>/jfconnect/api/v1/backoffice/metrics/log
[Debug] Sending HTTP POST request to: <URL>/artifactory/api/system/usage
[Warn] [Thread 2] (Attempt 1) - Failure occurred while downloading <URL>/artifactory/share/build/conaninfo.txt: unexpected EOF
[Debug] Sending HTTP GET request to: <URL>/artifactory/share/build/conaninfo.txt
[Debug] Visibility System Usage reporting: server response: 404 Not Found
404 page not found

[Warn] [Thread 2] (Attempt 2) - Failure occurred while downloading <URL>/artifactory/share/build/conaninfo.txt: unexpected EOF
[Debug] Sending HTTP GET request to: <URL>/artifactory/share/build/conaninfo.txt
[Warn] [Thread 2] (Attempt 3) - Failure occurred while downloading <URL>/artifactory/share/build/conaninfo.txt: unexpected EOF
[Debug] Sending HTTP GET request to: <URL>/artifactory/share/build/conaninfo.txt
[Warn] [Thread 2] (Attempt 4) - Failure occurred while downloading <URL>/artifactory/share/build/conaninfo.txt: unexpected EOF
[Info] [Thread 2]  executor timeout after 3 attempts with 0 milliseconds wait intervals
[Error] [Thread 2] Received an error: unexpected EOF
[Error] unexpected EOF
[Error] unexpected EOF

Screenshot of the file in the artifactory:
Image

Preview when clicking the view button:
Image

Here are also some excerpts from the logs accessible through the jfrog web interface (please ignore the mismatching Trace ids, these are from previous attemts where I didn't use JFROG_CLI_LOG_LEVEL="DEBUG"):

upload:

2025-03-05T12:17:42.848Z|df856ed5074108ba|10.13.138.132|robin_braun|GET|/api/system/version|200|-1|385|1|jfrog-cli-go/2.73.3
2025-03-05T12:17:42.878Z|a6bddc8f4196addb|10.13.138.132|robin_braun|PUT|/share/build/conaninfo.txt|201|254|0|9|jfrog-cli-go/2.73.3
2025-03-05T12:17:42.999Z|df856ed5074108ba|10.13.138.132|robin_braun|POST|/api/system/usage|200|74|0|0|jfrog-cli-go/2.73.3

download:

2025-03-05T12:25:10.689Z|6d547a65724a407e|10.13.138.132|robin_braun|GET|/share/build/conaninfo.txt|200|-1|254|2|jfrog-cli-go/2.73.3
2025-03-05T12:25:10.859Z|6d547a65724a407e|10.13.138.132|robin_braun|GET|/share/build/conaninfo.txt|200|-1|254|1|jfrog-cli-go/2.73.3
2025-03-05T12:25:11.002Z|6d547a65724a407e|10.13.138.132|robin_braun|GET|/share/build/conaninfo.txt|200|-1|254|2|jfrog-cli-go/2.73.3
2025-03-05T12:25:11.240Z|6d547a65724a407e|10.13.138.132|robin_braun|GET|/share/build/conaninfo.txt|200|-1|254|2|jfrog-cli-go/2.73.3

artifactory-service.log:

2025-03-05T12:17:42.873Z [jfrt ] [INFO ] [a6bddc8f4196addb] [o.a.e.UploadServiceImpl:612   ] [http-nio-8081-exec-6] - Deploy to 'share:build/conaninfo.txt' Content-Length: 254 (estimation) artificial: false
2025-03-05T12:18:14.021Z [jfrt ] [INFO ] [c076270395eea60b] [o.a.e.UploadServiceImpl:612   ] [http-nio-8081-exec-7] - Deploy to 'share:build/test.txt' Content-Length: 254 (estimation) artificial: false
2025-03-05T12:24:55.541Z [jfrt ] [WARN ] [0c82c19edac40f0a] [a.r.ArtifactoryResponseBase:77] [http-nio-8081-exec-1] - Zero bytes sent to client but expected 254 bytes.
2025-03-05T12:24:55.691Z [jfrt ] [WARN ] [0c82c19edac40f0a] [a.r.ArtifactoryResponseBase:77] [http-nio-8081-exec-2] - Zero bytes sent to client but expected 254 bytes.
2025-03-05T12:24:55.839Z [jfrt ] [WARN ] [0c82c19edac40f0a] [a.r.ArtifactoryResponseBase:77] [ttp-nio-8081-exec-10] - Zero bytes sent to client but expected 254 bytes.
2025-03-05T12:24:55.980Z [jfrt ] [WARN ] [0c82c19edac40f0a] [a.r.ArtifactoryResponseBase:77] [http-nio-8081-exec-9] - Zero bytes sent to client but expected 254 bytes.
2025-03-05T12:25:10.688Z [jfrt ] [WARN ] [6d547a65724a407e] [a.r.ArtifactoryResponseBase:77] [http-nio-8081-exec-5] - Zero bytes sent to client but expected 254 bytes.
2025-03-05T12:25:10.859Z [jfrt ] [WARN ] [6d547a65724a407e] [a.r.ArtifactoryResponseBase:77] [http-nio-8081-exec-3] - Zero bytes sent to client but expected 254 bytes.
2025-03-05T12:25:11.001Z [jfrt ] [WARN ] [6d547a65724a407e] [a.r.ArtifactoryResponseBase:77] [http-nio-8081-exec-1] - Zero bytes sent to client but expected 254 bytes.
2025-03-05T12:25:11.239Z [jfrt ] [WARN ] [6d547a65724a407e] [a.r.ArtifactoryResponseBase:77] [http-nio-8081-exec-2] - Zero bytes sent to client but expected 254 bytes.

Reproduction steps

Uploading any file with the same contents as described in Current Behavior will result in the same error, the file name/path doesn't matter:

conaninfo.txt

Changing the content in any way results in the upload working as expected, so maybe the hash is somehow the culprit?

Expected behavior

The file is succesfully and completly uploaded to the artifactory

JFrog CLI version

2.73.3

Operating system type and version

Docker container running debian 12.9

JFrog Artifactory version

7.104.10 rev 80410900

JFrog Xray version

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions