Dominik Psenner
2017-Aug-09 13:59 UTC
Re: [libvirt-users] libvirt: XML-RPC error : Cannot write data: Broken pipe
The error message could however give a hint what is going on. It should sax that it is impossible to talk to libvirtd and that it might be stopped. On 9 Aug 2017 2:19 p.m., "Daniel P. Berrange" <berrange@redhat.com> wrote:> On Wed, Aug 09, 2017 at 11:53:54AM +0800, netsurfed wrote: > > Hi all, > > I think it's a bug, when call virDomainGetState after "service libvirtd > stop" > > , I receive signal SIGPIPE. > > For the QEMU driver, the libvirt library just talks to libvirtd over an > RPC layer. You killed libvirtd, so the libvirt library gets SIGPIPE. > > > I want to know how to avoid this problem? And Other interfaces will also > > If you want libvirt to work, don't stop libvirtd > > Regards, > Daniel > -- > |: https://berrange.com -o- https://www.flickr.com/photos/ > dberrange :| > |: https://libvirt.org -o- > https://fstop138.berrange.com :| > |: https://entangle-photo.org -o- https://www.instagram.com/ > dberrange :| > > _______________________________________________ > libvirt-users mailing list > libvirt-users@redhat.com > https://www.redhat.com/mailman/listinfo/libvirt-users >
Michal Privoznik
2017-Aug-10 06:21 UTC
Re: [libvirt-users] libvirt: XML-RPC error : Cannot write data: Broken pipe
On 08/09/2017 03:59 PM, Dominik Psenner wrote:> The error message could however give a hint what is going on. It should sax > that it is impossible to talk to libvirtd and that it might be stopped.[Please don't top post on technical lists] Yes and no. There can be a lot of reasons why client can't talk to daemon. They all don't demonstrate in local connection, but imagine talking to a daemon on distant host. And suddenly somebody cuts the cable, or inserts incorrect firewall rules, etc. Suggesting that daemon is not running would be wrong in this case. Also, we tend to report system errors and leave mgmt application figure out how to deal with it. For instance: http://libvirt.org/git/?p=libvirt.git;a=blob;f=tools/virsh.c;h=94bb7ff6c93afa46d31d085eaa5e504f1cca7593;hb=HEAD#l90 Michal
Dominik Psenner
2017-Aug-10 08:45 UTC
Re: [libvirt-users] libvirt: XML-RPC error : Cannot write data: Broken pipe
2017-08-10 8:21 GMT+02:00 Michal Privoznik <mprivozn@redhat.com>:> On 08/09/2017 03:59 PM, Dominik Psenner wrote: > > The error message could however give a hint what is going on. It should > sax > > that it is impossible to talk to libvirtd and that it might be stopped. > > [Please don't top post on technical lists]> Yes and no. There can be a lot of reasons why client can't talk to > daemon. They all don't demonstrate in local connection, but imagine > talking to a daemon on distant host.And suddenly somebody cuts the> cable, or inserts incorrect firewall rules, etc. Suggesting that daemon > is not running would be wrong in this case.Actually, it would most probably be true in this case and still the most probable cause if the communication went over a wire. Yes, it could be a firewall issue but still it is more likely that the host or the service is not up.> Also, we tend to report > system errors and leave mgmt application figure out how to deal with it. > For instance: > > http://libvirt.org/git/?p=libvirt.git;a=blob;f=tools/virsh.c;h> 94bb7ff6c93afa46d31d085eaa5e504f1cca7593;hb=HEAD#l90Are you indicating that a user should have to read the sourcecode of libvirt and libvirtd to understand their error messages? Please bear in mind that we are humans that use a software and as such the software should be written to be used by humans. I know very well that good error handling is a tough task to achieve, but it is still worth the effort. I suggest that the error message: libvirt: XML-RPC error : Cannot write data: Broken pipe should read as: libvirt: Could not connect to the libvirtd service : Cannot write data: Broken pipe The first indicates that there's an XML-RPC error going on. To a user this sounds like a bad problem that he cannot solve by himself. Maybe it is an incompatible API or the connection broke while transferring data or the connection crashed, maybe trying to send something that shouldn't be sent with XML-RPC. Anyway it doesn't give a clue to a user that does not know how libvirt and libvirtd work internally. The latter is much clearer in explaining that there's a connectivity issue and that it could not even open the connection to the service. On top of that it includes the actual cause, namely a broken pipe. Cheers -- Dominik Psenner
Maybe Matching Threads
- Re: libvirt: XML-RPC error : Cannot write data: Broken pipe
- Re: libvirt: XML-RPC error : Cannot write data: Broken pipe
- Re: Ubuntu 16.04 libvirt-guests.sh [6917] - running guests under URI address default: no running guests
- Re: Ubuntu 16.04 libvirt-guests.sh [6917] - running guests under URI address default: no running guests
- Re: Ubuntu 16.04 libvirt-guests.sh [6917] - running guests under URI address default: no running guests