【问题标题】:"Read timed out" error when uploading large file from Jenkins to Nexus artifact repository将大文件从 Jenkins 上传到 Nexus 工件存储库时出现“读取超时”错误
【发布时间】:2020-03-06 16:57:35
【问题描述】:

我有一系列大文件需要使用 Jenkins 中的 Nexus Artifact Uploader 插件上传到 Nexus 工件存储库。我构建了许多使用此插件并将文件正确上传到 Nexus 的作业。不幸的是,我看到有一个 ~2.5GB 的文件大小限制,之后 Jenkins 作业失败并出现错误“读取超时”。当我使用 curl 命令将工件直接推送到 Nexus 存储库时,它不会失败。这让我相信 Jenkins 或可能运行 Jenkins 的 Docker 容器正在应用超时。我附上了下面的日志。这里有人对我如何解决这个超时错误有任何建议吗?

09:54:28 Uploading artifact (artifact file).zip started....
09:54:28 GroupId: data
09:54:28 ArtifactId: (artifact name)
09:54:28 Classifier: 
09:54:28 Type: zip
09:54:28 Version: 0.0.1
09:54:28 File: (artifact file).zip
09:54:28 Repository:(repository name)
09:54:28 Uploading: https://(nexus location)/repository/(repo name)/data/(artifact name)/0.0.1/(artifact name)-0.0.1.zip
09:54:50 10 % completed (902 MB / 9.0 GB).
09:55:12 20 % completed (1.8 GB / 9.0 GB).
09:56:20 Failed to deploy artifacts: Could not transfer artifact data:(artifact name):zip:0.0.1 from/to (repo name) (https://(nexus location)/repository/repo name): Read timed out
09:56:20 ERROR: Uploading file (artifact file).zip failed.

【问题讨论】:

    标签: docker jenkins nexus


    【解决方案1】:

    你可以尝试设置jvm参数-Dmaven.wagon.rto例如:

    "-Dmaven.wagon.rto=1800000"
    

    或设置 pom.xml 属性

    <maven.wagon.rto>1800000</maven.wagon.rto>
    

    更多详情请点击此链接https://maven.apache.org/wagon/wagon-providers/wagon-http/

    【讨论】:

      猜你喜欢
      • 2018-03-17
      • 2015-11-04
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2016-01-29
      • 1970-01-01
      • 2018-10-13
      • 2016-09-18
      相关资源
      最近更新 更多