[libvirt-users] error : virPidFileAcquirePath:345 : Failed to acquire pid file '/home/corey/.libvirt/libvirtd.pid': Resource temporarily unavailable

Hi all, When I try to start libvirtd, using "libvirtd -d", error notification shown below:error : virPidFileAcquirePath:345 : Failed to acquire pid file '/$HOME/.libvirt/libvirtd.pid': Resource temporarily unavailable Using "libvirtd -v", show: "libvirtd: error: Unable to obtain pidfile. Check /var/log/messages or run without --daemon for more info." The file "libvirtd.pid" only contains "2010" without any other infomation. I have checked that libvirtd has been installed in "/libvirt/sbin" with binary format by self-compiled. So how can I solve the problem? Or how to start libvirtd? Meanwhile, virsh can't search "libvirt-sock", because the libvirtd is not started successfully. Thanks a lot! Corey

On 31.10.2012 02:41, 何鑫 wrote:
Hi all, When I try to start libvirtd, using "libvirtd -d", error notification shown below: error : virPidFileAcquirePath:345 : Failed to acquire pid file '/$HOME/.libvirt/libvirtd.pid': Resource temporarily unavailable Using "libvirtd -v", show: "libvirtd: error: Unable to obtain pidfile. Check /var/log/messages or run without --daemon for more info." The file "libvirtd.pid" only contains "2010" without any other infomation.
That means either there already is another libvirtd running or the previous one died unexpectedly without removing this PID file. You can distinguish these two via 'pgrep libvirtd' which either gives you the very same PID as the one in the PID file (=libvirtd is running) or nothing and than you should be safe to remove the file and start libvirtd again. However, if libvirtd keeps failing to initialize, there might be a misconfiguration problem (and libvirt bug as well since we ought to remove PID file before quiting). Michal

Thanks for your reply! I have solved the problem. Could you please give me some tips for another question? When I start libvirtd using "libvirtd -d", the process could be found by "ps". But I also can't search "libvirt-sock", because it fails to create after libvirtd starting. The configuration file isn't existed in default paths, as well as Sockets. When and how could both files create? Configuration file (unless overridden by -f): $HOME/.libvirt/libvirtd.conf Sockets: $HOME/.libvirt/libvirt-sock (in UNIX abstract namespace) Thanks a lot!
Date: Wed, 31 Oct 2012 08:35:09 +0100 From: mprivozn@redhat.com To: wherethriving@hotmail.com CC: libvirt-users@redhat.com Subject: Re: [libvirt-users] error : virPidFileAcquirePath:345 : Failed to acquire pid file '/home/corey/.libvirt/libvirtd.pid': Resource temporarily unavailable
On 31.10.2012 02:41, 何鑫 wrote:
Hi all, When I try to start libvirtd, using "libvirtd -d", error notification shown below: error : virPidFileAcquirePath:345 : Failed to acquire pid file '/$HOME/.libvirt/libvirtd.pid': Resource temporarily unavailable Using "libvirtd -v", show: "libvirtd: error: Unable to obtain pidfile. Check /var/log/messages or run without --daemon for more info." The file "libvirtd.pid" only contains "2010" without any other infomation.
That means either there already is another libvirtd running or the previous one died unexpectedly without removing this PID file. You can distinguish these two via 'pgrep libvirtd' which either gives you the very same PID as the one in the PID file (=libvirtd is running) or nothing and than you should be safe to remove the file and start libvirtd again. However, if libvirtd keeps failing to initialize, there might be a misconfiguration problem (and libvirt bug as well since we ought to remove PID file before quiting).
Michal

On 10/31/2012 02:06 AM, 何鑫 wrote: [please don't top-post on technical lists]
Thanks for your reply! I have solved the problem. Could you please give me some tips for another question? When I start libvirtd using "libvirtd -d", the process could be found by "ps". But I also can't search "libvirt-sock", because it fails to create after libvirtd starting. The configuration file isn't existed in default paths, as well as Sockets. When and how could both files create?
libvirtd creates libvirt-sock in a directory selected by the arguments you passed to configure. The configuration file is optional (it is up to you to create it if you want it - libvirt merely reads it if it exists).
Configuration file (unless overridden by -f): $HOME/.libvirt/libvirtd.conf Sockets: $HOME/.libvirt/libvirt-sock (in UNIX abstract namespace)
Hmm - I wonder if we have a flaw in our documentation - the name $HOME/.libvirt/libvirt-sock implies that the socket is NOT in the abstract namespace; I know we recently changed where qemu:///session looks for its socket, but I don't remember if the change was from abstract to named, or from named to abstract. But really, a lot of your questions sound like they are all stemming from the fact that you are building your own libvirt, but not setting the same configure arguments as your distro, and then you are mis-matching self-built and distro files which have been configured to look into different locations. My advice would be to rebuild libvirt using the same configure arguments as your distro, so that everything looks in the same place. -- Eric Blake eblake@redhat.com +1-919-301-3266 Libvirt virtualization library http://libvirt.org

On Wed, Oct 31, 2012 at 08:51:04AM -0600, Eric Blake wrote:
On 10/31/2012 02:06 AM, 何鑫 wrote:
[please don't top-post on technical lists]
Thanks for your reply! I have solved the problem. Could you please give me some tips for another question? When I start libvirtd using "libvirtd -d", the process could be found by "ps". But I also can't search "libvirt-sock", because it fails to create after libvirtd starting. The configuration file isn't existed in default paths, as well as Sockets. When and how could both files create?
libvirtd creates libvirt-sock in a directory selected by the arguments you passed to configure. The configuration file is optional (it is up to you to create it if you want it - libvirt merely reads it if it exists).
Configuration file (unless overridden by -f): $HOME/.libvirt/libvirtd.conf Sockets: $HOME/.libvirt/libvirt-sock (in UNIX abstract namespace)
Hmm - I wonder if we have a flaw in our documentation - the name $HOME/.libvirt/libvirt-sock implies that the socket is NOT in the abstract namespace; I know we recently changed where qemu:///session looks for its socket, but I don't remember if the change was from abstract to named, or from named to abstract.
We stopped using the abstract namespace, since it is not supported on several UNIX, and also didn't let you connect remotely with the ssh/nc tunnel. Daniel -- |: http://berrange.com -o- http://www.flickr.com/photos/dberrange/ :| |: http://libvirt.org -o- http://virt-manager.org :| |: http://autobuild.org -o- http://search.cpan.org/~danberr/ :| |: http://entangle-photo.org -o- http://live.gnome.org/gtk-vnc :|
participants (4)
-
Daniel P. Berrange
-
Eric Blake
-
Michal Privoznik
-
何鑫