Managed OpenStack
Latest
Frequently Asked Questions
Solution
How To
Internal Only
Templates
Powered By

Title
Message
Create new category
What is the title of your new category?
Edit page index title
What is the title of the page index?
Edit category
What is the new title of your category?
Edit link
What is the new title and URL of your link?
Libvirt Socket Binding Failed/Unable to Acquire PID File
Copy Markdown
Open in ChatGPT
Open in Claude
Problem
- The pf9-ostackhost service is failing, indicating that it is unable to connect to the Libvirt socket.
TRACE oslo_service.periodic_task HypervisorUnavailable: Connection to the hypervisor is broken on host: [HOST_UUID]TRACE nova.virt.libvirt.host libvirtError: Failed to connect socket to '/var/run/libvirt/libvirt-sock': Connection refused- The libvirtd/libvirt-bin service is failing to start, complaining about being unable to access its pidfile.
libvirtd[404581]: libvirt version: 1.3.1, package: 1ubuntu10.24 (Marc Deslauriers [marc.deslauriers@ubuntu.com] Wed, 23 May 2018 13:29:29 -0400)libvirtd[404581]: hostname: kdt-dpckvm01libvirtd[404578]: /usr/sbin/libvirtd: error: Unable to obtain pidfile. Check /var/log/messages or run without --daemon for more info.libvirtd[404581]: Failed to acquire pid file '/var/run/libvirtd.pid': Resource temporarily unavailablesystemd[1]: libvirt-bin.service: Main process exited, code=exited, status=1/FAILUREsystemd[1]: libvirt-bin.service: Unit entered failed state.systemd[1]: libvirt-bin.service: Failed with result 'exit-code'.systemd[1]: libvirt-bin.service: Service hold-off time over, scheduling restart.Environment
- Platform9 Managed OpenStack – v3.6 – v4.0
- Nova
- Libvirt 1.3.1
- Ubuntu 16.04
Cause
Libvirtd is configured with the '-d' (daemon) option (set in /etc/default/libvirt-bin) which makes it unmanageable from a systemctl/systemd perspective – thus, attempting to start/restart the service will cause overlapping behavior, as a process is already started.
root@kdt-dpckvm01:/var/log# ps aux | grep libvirtdroot 4085 0.2 0.0 1373036 43796 ? Sl 2018 1582:45 /usr/sbin/libvirtd -d -lIn order for the service to be properly managed – this flag should be unset.
Resolution
- Kill any running Libvirt process(es).
xxxxxxxxxx# pkill libvirt- Edit /etc/default/libvirt-bin and omit the '-d' flag from 'LIBVIRT_OPTS'.
- Save the file.
- Start the Libvirt service.
xxxxxxxxxx# systemctl start libvirt-binVariableType to search · ESC to discard
GlossaryType to search · ESC to discard
InsertType to search · ESC to discard
No matches
Last updated on
Was this page helpful?
Discard Changes
Do you want to discard your current changes and overwrite with the template?
Archive Synced Block
Message
Create new Template
What is this template's title?
Delete Template
Message