nexus-staging-maven-plugin TIMEOUT 解决方案

背景

公司的 nexus 最近每天下午四五点就会出现缓慢的情况,在 nexus staging promote 到 release 的时候就老是会出现 TIMEOUT 的情况。

报错信息

Waiting for operation to complete...
..................................................................................
[WARNING] TIMEOUT after 300.2 s

[ERROR] Rule failure while trying to close staging repository with ID "comokta-1127".
[ERROR]
[ERROR] Nexus Staging Rules Failure Report
[ERROR] ==================================
[ERROR]
[ERROR]
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary :
[INFO]
...

虽然是 TIMEOUT 报错,但是最后上 nexus 查看,其实是已经 deploy 到 release path 下面了。可恶的是,这个报错导致了我 jenkins pipeline 的往下执行。为了解决这个问题。在 Plugin 中增加 timeout 的超时时间。

解决方案

<plugin>
    <groupId>org.sonatype.plugins</groupId>
    <artifactId>nexus-staging-maven-plugin</artifactId>
    <version>${nexus-staging-maven-plugin.version}</version>
    <extensions>true</extensions>
    <configuration>
        <serverId>nexus</serverId>
        <nexusUrl>https://nexushost/</nexusUrl>
        <stagingProgressTimeoutMinutes>20</stagingProgressTimeoutMinutes>
    </configuration>
</plugin>

stagingProgressTimeoutMinutes 默认为 5 min。

【参考文档】
https://help.sonatype.com/repomanager2/staging-releases/configuring-your-project-for-deployment

  • 1
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

Charlven

你的鼓励将是我最大的动力哦

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值