[GH-ISSUE #20] Problem connecting via local socket #13

Closed
opened 2026-02-27 15:56:59 +03:00 by kerem · 9 comments
Owner

Originally created by @ghost on GitHub (Jun 8, 2015).
Original GitHub issue: https://github.com/retspen/webvirtcloud/issues/20

I've installed webvirtcloud onto a machine as per the instructions in the readme. The machine already has a few KVM machines set up, so I'm able to run something like this without issue:

$ virsh list

Id    Name                           State
----------------------------------------------------
 2     Some VM                     running

However, after adding a local socket entry on the computes tab of webvirtcloud, I get the following on the instances tab:

Error: Failed to connect socket to '/var/run/libvirt/libvirt-sock': Permission denied

I've tried adding both my local and the www-data user accounts to the libvirtd group but I still get the same error.

Any ideas?

Originally created by @ghost on GitHub (Jun 8, 2015). Original GitHub issue: https://github.com/retspen/webvirtcloud/issues/20 I've installed webvirtcloud onto a machine as per the instructions in the readme. The machine already has a few KVM machines set up, so I'm able to run something like this without issue: ``` $ virsh list Id Name State ---------------------------------------------------- 2 Some VM running ``` However, after adding a local socket entry on the computes tab of webvirtcloud, I get the following on the instances tab: ``` Error: Failed to connect socket to '/var/run/libvirt/libvirt-sock': Permission denied ``` I've tried adding both my local and the www-data user accounts to the libvirtd group but I still get the same error. Any ideas?
kerem closed this issue 2026-02-27 15:56:59 +03:00
Author
Owner

@retspen commented on GitHub (Jun 8, 2015):

$ sudo adduser www-data kvm
<!-- gh-comment-id:109862042 --> @retspen commented on GitHub (Jun 8, 2015): ``` bash $ sudo adduser www-data kvm ```
Author
Owner

@ghost commented on GitHub (Jun 8, 2015):

Thanks. Tried that but still getting the same error message.

I'm able to use TCP at the moment, so this isn't a huge deal. Would still be nice to solve though.

<!-- gh-comment-id:109866972 --> @ghost commented on GitHub (Jun 8, 2015): Thanks. Tried that but still getting the same error message. I'm able to use TCP at the moment, so this isn't a huge deal. Would still be nice to solve though.
Author
Owner

@retspen commented on GitHub (Jun 8, 2015):

After that need restart service nginx

<!-- gh-comment-id:109872231 --> @retspen commented on GitHub (Jun 8, 2015): After that need restart service nginx
Author
Owner

@ghost commented on GitHub (Jun 8, 2015):

sudo service nginx restart

Refreshed the page but still getting the same error, even after clearing the cache.

<!-- gh-comment-id:109873512 --> @ghost commented on GitHub (Jun 8, 2015): ``` sudo service nginx restart ``` Refreshed the page but still getting the same error, even after clearing the cache.
Author
Owner

@retspen commented on GitHub (Jun 8, 2015):

Can you add libvirtd group to www-data and then restart service nginx?

<!-- gh-comment-id:109873794 --> @retspen commented on GitHub (Jun 8, 2015): Can you add libvirtd group to www-data and then restart service nginx?
Author
Owner

@ghost commented on GitHub (Jun 8, 2015):

sudo adduser www-data libvirtd
sudo service nginx restart

No change unfortunately

<!-- gh-comment-id:109875371 --> @ghost commented on GitHub (Jun 8, 2015): ``` sudo adduser www-data libvirtd sudo service nginx restart ``` No change unfortunately
Author
Owner

@retspen commented on GitHub (Jun 8, 2015):

Can you reboot your server? Now I tested the Issue and my configuration work perfectly.

<!-- gh-comment-id:109882752 --> @retspen commented on GitHub (Jun 8, 2015): Can you reboot your server? Now I tested the Issue and my configuration work perfectly.
Author
Owner

@ghost commented on GitHub (Jun 8, 2015):

Not able to right now but will give it a try later on and report back. Thanks for the help :)

<!-- gh-comment-id:109890160 --> @ghost commented on GitHub (Jun 8, 2015): Not able to right now but will give it a try later on and report back. Thanks for the help :)
Author
Owner

@ghost commented on GitHub (Jun 11, 2015):

Apologies for the delay @retspen.

I rebooted as you suggested and it started working. Not quite sure what was wrong, but since things are working now I'll close this up.

<!-- gh-comment-id:111111033 --> @ghost commented on GitHub (Jun 11, 2015): Apologies for the delay @retspen. I rebooted as you suggested and it started working. Not quite sure what was wrong, but since things are working now I'll close this up.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/webvirtcloud#13
No description provided.