1

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 ?

Anthony O.
  • 674
  • 1
  • 5
  • 14
  • Any chance you are running out of disk space? libvirt stops the VM if it requires more space in qcow2 image it can not get because of full disk on host. Happened to me and took me a while to figure out why is it "frozen". – Martian Dec 16 '11 at 08:44
  • No I've got disk space... moreover, it is not really "stuck" because if I launch the downloads again from my client, it generally manages to download... but sticks on other downloads randomly afterwards. It's like the TCP connection is waiting undefinitely... I think I'm really facing that bug : https://bugs.launchpad.net/ubuntu/+source/qemu-kvm/+bug/616064 – Anthony O. Dec 16 '11 at 16:57

2 Answers2

0

http://wiki.libvirt.org/page/Networking reports similar configuration but with

bridge_stp on

(not really sure it can help).

S19N
  • 1,803
  • 1
  • 19
  • 28
0

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

leenix
  • 81
  • 6
  • Mmmh it could be a solution... but it's really risky as I'm already hosting 7 VM on that server, including some production ones... Moreover, I feel like it exists a solution for my problem... – Anthony O. Dec 15 '11 at 13:59