[libvirt] LibvirtException: socket closed unexpectedly

Hi *, I wrote a program in Java communicating with libvirt/XEN over SSH, with libvirt-java-0.2.1. I poll the CPU and RAM usage quite often (about 5 times a second). My program runs well about between 5-8 minutes, but then I get LibvirtException: socket closed unexpectedly. Although I try to catch the LibvirtExceptions with special System.out.println messages I have no idea where this is coming from. Now my question: what leads to this exception? exception caught: org.libvirt.LibvirtException: socket closed unexpectedly level:VIR_ERR_ERROR code:VIR_ERR_RPC domain:VIR_FROM_REMOTE hasConn:false hasDom:false hasNet:false message:socket closed unexpectedly str1:%s str2:socket closed unexpectedly str3:null int1:0 int2:0 After that I can start my program again, and it is the same again (runs some minutes and then throws the exception). Perhaps someone knows? I would be very thankful for any help! Best regards, Marcel

On Wed, May 13, 2009 at 09:11:35AM +0200, Marcel Michelmann wrote:
Hi *,
I wrote a program in Java communicating with libvirt/XEN over SSH, with libvirt-java-0.2.1. I poll the CPU and RAM usage quite often (about 5 times a second). My program runs well about between 5-8 minutes, but then I get LibvirtException: socket closed unexpectedly. Although I try to catch the LibvirtExceptions with special System.out.println messages I have no idea where this is coming from.
Now my question: what leads to this exception?
exception caught: org.libvirt.LibvirtException: socket closed unexpectedly level:VIR_ERR_ERROR code:VIR_ERR_RPC domain:VIR_FROM_REMOTE hasConn:false hasDom:false hasNet:false message:socket closed unexpectedly
Either the remote libvirtd crashed, or it explicitly dropped this client for misbehaving. I'm betting this is a libvirtd bug in event handling. Daniel -- |: Red Hat, Engineering, London -o- http://people.redhat.com/berrange/ :| |: http://libvirt.org -o- http://virt-manager.org -o- http://ovirt.org :| |: http://autobuild.org -o- http://search.cpan.org/~danberr/ :| |: GnuPG: 7D3B9505 -o- F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505 :|

So you mean the libvirtd on the server side (where XEN runs) doesn't like to get polled so often from the same process in such a short time? Am Mi, 13.05.2009, 12:03, schrieb Daniel P. Berrange:
On Wed, May 13, 2009 at 09:11:35AM +0200, Marcel Michelmann wrote:
Hi *,
I wrote a program in Java communicating with libvirt/XEN over SSH, with libvirt-java-0.2.1. I poll the CPU and RAM usage quite often (about 5 times a second). My program runs well about between 5-8 minutes, but then I get LibvirtException: socket closed unexpectedly. Although I try to catch the LibvirtExceptions with special System.out.println messages I have no idea where this is coming from.
Now my question: what leads to this exception?
exception caught: org.libvirt.LibvirtException: socket closed unexpectedly level:VIR_ERR_ERROR code:VIR_ERR_RPC domain:VIR_FROM_REMOTE hasConn:false hasDom:false hasNet:false message:socket closed unexpectedly
Either the remote libvirtd crashed, or it explicitly dropped this client for misbehaving. I'm betting this is a libvirtd bug in event handling.
Daniel -- |: Red Hat, Engineering, London -o- http://people.redhat.com/berrange/ :| |: http://libvirt.org -o- http://virt-manager.org -o- http://ovirt.org :| |: http://autobuild.org -o- http://search.cpan.org/~danberr/ :| |: GnuPG: 7D3B9505 -o- F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505 :|

On Wed, May 13, 2009 at 01:26:06PM +0200, Marcel Michelmann wrote:
So you mean the libvirtd on the server side (where XEN runs) doesn't like to get polled so often from the same process in such a short time?
No, just that you triggered a bug on the remote side. What version of libvirt do you have running there, make sure you have a recent one. Daniel -- Daniel Veillard | libxml Gnome XML XSLT toolkit http://xmlsoft.org/ daniel@veillard.com | Rpmfind RPM search engine http://rpmfind.net/ http://veillard.com/ | virtualization library http://libvirt.org/

I'm running Debain Lenny, so my libvirt, libvirt0 and libvirt-bin are version 0.4.6-10. For Debain sid, version 0.6.3-2 is already out. Will those new versions also be running on Lenny? Thanks, Marcel Am Mi, 13.05.2009, 16:50, schrieb Daniel Veillard:
On Wed, May 13, 2009 at 01:26:06PM +0200, Marcel Michelmann wrote:
So you mean the libvirtd on the server side (where XEN runs) doesn't like to get polled so often from the same process in such a short time?
No, just that you triggered a bug on the remote side. What version of libvirt do you have running there, make sure you have a recent one.
Daniel
-- Daniel Veillard | libxml Gnome XML XSLT toolkit http://xmlsoft.org/ daniel@veillard.com | Rpmfind RPM search engine http://rpmfind.net/ http://veillard.com/ | virtualization library http://libvirt.org/
participants (3)
-
Daniel P. Berrange
-
Daniel Veillard
-
Marcel Michelmann