apache / apache/dubbo

github构建有时抛ArtifactResolutionException: Could not transfer artifact xxx has not been leased from this pool

Open
#8,868 2 comments 0 reactions 0 assignees View on GitHub
Dominant language
Java
Stars
41.6k
Forks
26.4k
Avg merge
15h 13m
Merged PRs (30d)
4

Description

### Environment

* Dubbo version: 3.0 / master

比如 https://github.com/apache/dubbo/runs/3665650264?check_suite_focus=true
```
Error: Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.22.2:test (default-test) on project dubbo-common: Unable to generate classpath: org.apache.maven.artifact.resolver.ArtifactResolutionException: Could not transfer artifact org.opentest4j:opentest4j:jar:1.1.1 from/to central (https://repo.maven.apache.org/maven2): Entry [id:2457][route:{s}->https://repo.maven.apache.org:443][state:null] has not been leased from this pool
```
1. 看了一下workflow,发现windows构建有设置maven.wagon.http.pool=false,但是这个选项是wagon http2.0才支持的,dubbo-parent的pom.xml里面配置的maven-surefire-plugin版本是2.22.2,这个版本引用的wagon http版本是1.0-beta-6,所以配了maven.wagon.http.pool也没有效果。
2. 搜了一下Could not transfer artifact ... has not been leased from this pool,其他开源软件也有出现,比如Pulsar,Flink,有篇帖子说问题在于wagon http使用的HttpClient组件版本太老,有HTTPCLIENT-1453线程安全缺陷:https://issues.apache.org/jira/plugins/servlet/mobile#issue/HTTPCLIENT-1453 ,解决办法要么把maven-surefire-plugin版本换成3.0.x,不用wagon了(但是升大版本存在兼容风险),要么把wagon http升到最新的3.4.3(使用了没有上述缺陷的新版HttpClient)。

下面这个帖子讨论的很详细,很长,我还没看完,里面有句```The Alibaba machines are probably running in a somewhat unstable network environment```,感觉是阿里的同学或者是阿里的客户。
https://issues.apache.org/jira/browse/FLINK-16947?focusedCommentId=17285028&page=com.atlassian.jira.plugin.system.issuetabpanels%3Acomment-tabpanel#comment-17285028

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.