首页 > 解决方案 > 从人工远程仓库下载大文件给出错误 - 意外 EOF

问题描述

我在 Jfrog 有一个工件,供应商保存更新的二进制文件。我应该使用 Azure Pipelines 的构建任务(即 Artifactory Generic Download)下载二进制文件。从该人工远程仓库下载二进制文件时,一些大文件(即大小超过 800 MB)没有被下载并抛出错误“意外 EoF”

我认为这个问题是因为互联网速度慢,所以我试图用最快的互联网连接下载那些工件,但它没有帮助。

我得到的输出是这个

##[debug]fileSpec={
    "files": [
        {
            "pattern": "Dependencies/SQLEXPRADV_x64_ENU.exe",
            "target": "D:\Abhijit\VSTS_Agent\_work\2\s\\"
        }
    ]
}
Using file spec:
{
    "files": [
        {
            "pattern": "Dependencies/SQLEXPRADV_x64_ENU.exe",
            "target": "D:\\Abhijit\\VSTS_Agent\\_work\\2\\s\\"
        }
    ]
}
##[debug]0a364c9c-b6a0-43eb-8b47-d6a58c68b016 auth param username = ***
##[debug]0a364c9c-b6a0-43eb-8b47-d6a58c68b016 auth param password = ***
##[debug]failNoOp=true
##[debug]buildName=Test_Project_KT-CI (1)
##[debug]buildNumber=309
[Info] Searching items to download...
[Info] [Thread 2] Downloading Dependencies/SQLEXPRADV_x64_ENU.exe
[Info] [Thread 2] [0]: 206 Partial content...
[Info] [Thread 2] [1]: 206 Partial Content...
[Info] [Thread 2] [2]: 206 Partial Content...
[Warn] [Thread 2] [1]: Attempt 0 - Failure occurred while downloading part 1 of https://artifacts.test.com/artifactory/Dependencies/SQLEXPRADV_x64_ENU.exe - unexpected EOF
[Warn] [Thread 2] [2]: Attempt 0 - Failure occurred while downloading part 2 of https://artifacts.test.com/artifactory/Dependencies/SQLEXPRADV_x64_ENU.exe - unexpected EOF
[Info] [Thread 2] [1]: 206 Partial Content...
[Warn] [Thread 2] [1]: Attempt 1 - Failure occurred while downloading part 1 of https://artifacts.test.com/artifactory/Dependencies/SQLEXPRADV_x64_ENU.exe - unexpected EOF
[Info] [Thread 2] [1]: 206 Partial Content...
[Info] [Thread 2] [2]: 206 Partial Content...
[Warn] [Thread 2] [2]: Attempt 1 - Failure occurred while downloading part 2 of https://artifacts.test.com/artifactory/Dependencies/SQLEXPRADV_x64_ENU.exe - unexpected EOF
[Warn] [Thread 2] [1]: Attempt 2 - Failure occurred while downloading part 1 of https://artifacts.test.com/artifactory/Dependencies/SQLEXPRADV_x64_ENU.exe - unexpected EOF
[Info] [Thread 2] [1]: 206 Partial Content...
[Info] [Thread 2] [2]: 206 Partial Content...
[Warn] [Thread 2] [2]: Attempt 2 - Failure occurred while downloading part 2 of https://artifacts.test.com/artifactory/Dependencies/SQLEXPRADV_x64_ENU.exe - unexpected EOF
[Warn] [Thread 2] [1]: Attempt 3 - Failure occurred while downloading part 1 of https://artifacts.test.com/artifactory/Dependencies/SQLEXPRADV_x64_ENU.exe - unexpected EOF
panic: runtime error: invalid memory address or nil pointer dereference
[signal 0xc0000005 code=0x0 addr=0x10 pc=0x799657]

预期输出

##[debug]fileSpec={
    "files": [
        {
            "pattern": "Dependencies/SQLEXPRADV_x64_ENU.exe",
            "target": "D:\Abhijit\VSTS_Agent\_work\2\s\\"
        }
    ]
}
Using file spec:
{
    "files": [
        {
            "pattern": "Dependencies/SQLEXPRADV_x64_ENU.exe",
            "target": "D:\\Abhijit\\VSTS_Agent\\_work\\2\\s\\"
        }
    ]
}
##[debug]0a364c9c-b6a0-43eb-8b47-d6a58c68b016 auth param username = ***
##[debug]0a364c9c-b6a0-43eb-8b47-d6a58c68b016 auth param password = ***
##[debug]failNoOp=true
##[debug]buildName=Test_Project_KT-CI (1)
##[debug]buildNumber=309
[Info] Searching items to download...
[Info] [Thread 2] Downloading Dependencies/SQLEXPRADV_x64_ENU.exe
[Info] [Thread 2] [0]: 206 Partial content...
[Info] [Thread 2] [1]: 206 Partial Content...
[Info] [Thread 2] [2]: 206 Partial Content...
[Info] download done...
```

标签: artifactoryazure-pipelines-build-task

解决方案


根据您的输出文件,不仅unexpected EOF,您还收到另一条错误消息:

panic: runtime error: invalid memory address or nil pointer dereference
[signal 0xc0000005 code=0x0 addr=0x10 pc=0x799657]

这是关于的错误,Go使用的任务是用这种 Go 语言编写的。根据他们的 github repos,你可以查看任务代码是什么。所以这个错误信息应该是由他们的任务代码引起的,而不是你。

另外,在他们的github issue report下也有类似的错误。你可以检查一下。他们的团队正在更新以更改导致此错误的代码,他们的最新版本将包含此更改。


推荐阅读