我在虚拟 Ubuntu 10.04.3 LTS 服务器上安装了 Maven 存储库(测试了 NexusOSS 1.9.1.1 捆绑包和 Artifactory 2.4.2),该服务器由 libvirt 0.7.5-5ubuntu27.16 (使用 kvm 1:84+dfsg-0ubuntu16+0.12.3+noroms+0ubuntu9.16)
每次我想使用具有镜像设置的存储库 (*
),它正确下载了一些工件并突然挂起下载(不一定相同)。
这是一个典型的“控制台镜头”:
Downloading: http://192.168.1.213:8081/artifactory/repo/org/apache/maven/plugins/maven-release-plugin/2.2.1/maven-release-plugin-2.2.1.pom
Downloaded: http://192.168.1.213:8081/artifactory/repo/org/apache/maven/plugins/maven-release-plugin/2.2.1/maven-release-plugin-2.2.1.pom (9 KB at 28.0 KB/sec)
Downloading: http://192.168.1.213:8081/artifactory/repo/org/apache/maven/release/maven-release/2.2.1/maven-release-2.2.1.pom
Downloaded: http://192.168.1.213:8081/artifactory/repo/org/apache/maven/release/maven-release/2.2.1/maven-release-2.2.1.pom (9 KB at 7.8 KB/sec)
Downloading: http://192.168.1.213:8081/artifactory/repo/org/apache/maven/maven-parent/20/maven-parent-20.pom
Downloaded: http://192.168.1.213:8081/artifactory/repo/org/apache/maven/maven-parent/20/maven-parent-20.pom (25 KB at 22.0 KB/sec)
Downloading: http://192.168.1.213:8081/artifactory/repo/org/apache/apache/9/apache-9.pom
Downloaded: http://192.168.1.213:8081/artifactory/repo/org/apache/apache/9/apache-9.pom (15 KB at 14.0 KB/sec)
Downloading: http://192.168.1.213:8081/artifactory/repo/org/apache/maven/plugins/maven-release-plugin/2.2.1/maven-release-plugin-2.2.1.jar
5 KB
挂在这里。为了正确下载所有工件,我必须 ctrl+C 构建,然后重新启动它。
如果我的 Maven 镜像存储库已经有工件,则不会发生挂起问题,因此如果另一个开发人员在我之后构建该项目,他就不会遇到该问题。
这是 settings.xml
文件:
<settings>
<mirrors>
<mirror>
<id>nexus</id>
<mirrorOf>*</mirrorOf>
<url>http://192.168.1.213:8081/nexus/content/groups/public</url>
</mirror>
</mirrors>
</settings>
我在 Ubuntu 10.04.3 LTS 上使用 Maven 3.0.3。
我们这里没有任何代理服务器。我认为这更多是一个 kvm-qemu 网络问题,因为我已经在真机上测试了相同的 Artifactory 安装并且它工作正常......
有人有想法吗?
(编辑)
好吧,看来终于是KVM的问题了。
首先,我发现 一个讨论 KVM 和 ip_forward= 网络冻结的线程1.。当将其切换为 0 时,它什么也没做。
然后我发现 那篇关于 KVM 网络的博客文章 并尝试将桥接接口的 model
更改为
。
现在我的冻结次数确实减少了。但即使有了这样的配置,我有时仍然会被阻止下载......
I installed a Maven repository (tested NexusOSS 1.9.1.1 bundle and Artifactory 2.4.2) on a virtual Ubuntu 10.04.3 LTS server hosted on an Ubuntu 10.04.2 LTS server by libvirt 0.7.5-5ubuntu27.16 (using kvm 1:84+dfsg-0ubuntu16+0.12.3+noroms+0ubuntu9.16)
Each time I want to use that repository with a mirroring setting (<mirrorOf>*</mirrorOf>
), it correctly downloads some artifacts and suddently hangs on a download (not necessarily the same).
Here is a typical "console-shot" :
Downloading: http://192.168.1.213:8081/artifactory/repo/org/apache/maven/plugins/maven-release-plugin/2.2.1/maven-release-plugin-2.2.1.pom
Downloaded: http://192.168.1.213:8081/artifactory/repo/org/apache/maven/plugins/maven-release-plugin/2.2.1/maven-release-plugin-2.2.1.pom (9 KB at 28.0 KB/sec)
Downloading: http://192.168.1.213:8081/artifactory/repo/org/apache/maven/release/maven-release/2.2.1/maven-release-2.2.1.pom
Downloaded: http://192.168.1.213:8081/artifactory/repo/org/apache/maven/release/maven-release/2.2.1/maven-release-2.2.1.pom (9 KB at 7.8 KB/sec)
Downloading: http://192.168.1.213:8081/artifactory/repo/org/apache/maven/maven-parent/20/maven-parent-20.pom
Downloaded: http://192.168.1.213:8081/artifactory/repo/org/apache/maven/maven-parent/20/maven-parent-20.pom (25 KB at 22.0 KB/sec)
Downloading: http://192.168.1.213:8081/artifactory/repo/org/apache/apache/9/apache-9.pom
Downloaded: http://192.168.1.213:8081/artifactory/repo/org/apache/apache/9/apache-9.pom (15 KB at 14.0 KB/sec)
Downloading: http://192.168.1.213:8081/artifactory/repo/org/apache/maven/plugins/maven-release-plugin/2.2.1/maven-release-plugin-2.2.1.jar
5 KB
Hangs here. In order to download correctly all the artifacts, I must ctrl+C the build, and re-launch it.
The hanging problem doesn't happened if my Maven mirror repository already has the artifacts, so if another developper builds the project after me, he doesn't have that problem.
Here is the settings.xml
file :
<settings>
<mirrors>
<mirror>
<id>nexus</id>
<mirrorOf>*</mirrorOf>
<url>http://192.168.1.213:8081/nexus/content/groups/public</url>
</mirror>
</mirrors>
</settings>
I'm using Maven 3.0.3 on Ubuntu 10.04.3 LTS.
We don't have any proxy server here. I think it's more a kvm-qemu networking problem as I've tested the same Artifactory installation on a real machine and it's working correctly...
Does someone have an idea ?
(Edit)
OK, it appears that it was finally a KVM problem.
First I found a thread talking about network freezes with KVM and ip_forward=1. When switching it to 0 it did nothing.
Then I found that blog post about network in KVM and tried to changed the model
of the bridge interface to <model type='e1000'/>
.
Now I have really fewer freezes. But even with that configuration I still have downloads blocked sometimes...
发布评论
评论(1)
关闭 AVG 防病毒软件(免费版)解决了我的问题。一旦重新打开,问题又出现了。
Turning off AVG antivirus (Free edition) solved the problem for me. Once it was turned back on the problem reappeared.