I first wrote my problem on stackoverflow thinking it was a Maven proxy software problem.
But I realised it was more a problem with my virtualization stack (libvirt 0.7.5-5ubuntu27.19 / kvm 1:84+dfsg-0ubuntu16+0.12.3+noroms+0ubuntu9.16 on Ubuntu 10.04.3 LTS).
Here is the libvirt network configuration of my VM :
<interface type='bridge'>
<mac address='52:54:00:0f:30:ea'/>
<source bridge='br0'/>
</interface>
And the /etc/network/interfaces
part for br0
:
auto eth3
iface eth3 inet manual
auto br0
iface br0 inet static
address 192.168.1.200
netmask 255.255.255.0
network 192.168.1.0
broadcast 192.168.1.255
gateway 192.168.1.254
bridge_ports eth3
bridge_stp off
bridge_maxwait 0
So here is the problem : sometimes, when a maven client is trying to build a project and downloads plenty of jars from the VM running the maven proxy, it stucks while downloading one of them :
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
I've eliminated the software problem because I configured a similar server on another real computer and it works.
I've tried switching ip_forward
to 0
reading Network freezes with KVM/libvirt and ip_forward = 1 without result.
I've tried adding CAP_NET_ADMIN
capability reading KVM/Networking on ubuntu wiki without results.
I've tried to configure my br0
adding those properties in /etc/network/interfaces
without results :
bridge_fd 9
bridge_fd 0
bridge_hello 2
bridge_maxage 12
(Also tried bridge_stp on
)
I've tried to change the model of the virtual network interface reading that blog entry, adding <model type='e1000'/>
inside the <interface>
tag, and I finally had better results (but it still blocked sometimes - even if it's less often). Better also with rtl8139
model.
I've tried to capture the exchange between my client and the VM, and it seems to stuck always when TCP connection client send a [ACK]
with a Len=0
. Here is the exchange captured by Wireshark.
It seems I have the same bug as this one (on launchpad).
Can somebody point me to an even better libvirt / KVM configuration ?
http://wiki.libvirt.org/page/Networking reports similar configuration but with
(not really sure it can help).
You could try running a newer virtualization stack which has been backported to lucid. Add the following PPA and give it a go;
https://launchpad.net/~nutznboltz/+archive/kvm-libvirt-lts