Libvirt Service failed to start - Address already in use <SOLVED>


Go to solution Solved by jlficken,

Recommended Posts

I had an abrupt shutdown yesterday...my fault...and now I can't get libvirt to start.

 

libvirt log through the GUI:

2022-10-05 12:51:44.898+0000: 16965: info : libvirt version: 8.2.0
2022-10-05 12:51:44.898+0000: 16965: info : hostname: FSNAS1U
2022-10-05 12:51:44.898+0000: 16965: error : virNetSocketNewListenUNIX:511 : Failed to bind socket to '/run/libvirt/libvirt-sock': Address already in use

 

I've tried the suggestion made here, upgraded to 6.11.0, downgraded back to 6.10.3, and even replaced the entire USB drive with a backup that was made automatically earlier that day to no avail.

 

I'm at a complete loss and would really like to get it fixed since it hosts my work VM.

 

I do have another UnRAID server running 6.10.3 so would there be anything that I could copy over from it to the main UnRAID server with the problems to help me get past this?

 

The /etc/libvirt directory is empty on the main machine but not the backup machine, however, the libvirt- directory has files in it on both machines which I found odd.

 

Any help would be greatly appreciated!

fsnas1u-diagnostics-20221005-0807.zip

Edited by jlficken
Link to comment
  • jlficken changed the title to Libvirt Service failed to start - Address already in use <SOLVED>
  • 4 months later...
  • 8 months later...

Hello,

 

I tried to do the same, since I had the exact same error, however it did not work. (on 6.11.5)

 

virtlog did not show anything extra each time I tried to disable/enable the service, which seems to be an issue on it's own

Only my syslog showed this:

 

Quote

Nov  3 11:36:09 xxxxxxxxxx  emhttpd: shcmd (2138): /etc/rc.d/rc.libvirt start
Nov  3 11:36:09 xxxxxxxxxx  root: virtlockd is already running...



What worked for me was:

 

- Put the service in disable in the GUI and apply

- Manually kill these processes:

root@xxxxxxxx:/var/run/libvirt# ps aux | grep libvirt
root      9216  0.0  0.0  31920  9448 ?        S    11:38   0:00 /usr/sbin/virtlockd -d -f /etc/libvirt/virtlockd.conf -p /var/run/libvirt/virtlockd.pid
root      9221  0.0  0.0  31920  9564 ?        S    11:38   0:00 /usr/sbin/virtlogd -d -f /etc/libvirt/virtlogd.conf -p /var/run/libvirt/virtlogd.pid

- In console go to /var/run/libvirt/ (or /run/libvirt)

- Delete/rename the directory /var/run/libvirt/libvirtsock (not even sure why it's there, was created on boot)

- Delete/rename the .pid files virtlockd.pid & virtlogd.pid

- Then put the service in the GUI back to enable and Apply

 

This somehow enabled the socket to be used for libvirt, and made it so the system recognized that the other two processes were not running.

I'm not sure if there a better way to do this, or if all steps were needed, as I am not an experienced user, but I was very glad to do this without removing my libvirt.img file and starting over.

 

 

 

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.