[GH-ISSUE #284] libvir: RPC error : authentication failed: polkit: libvirt: error : cannot execute binary /usr/bin/pkcheck: No such file or directory #228

Closed
opened 2026-02-27 16:38:29 +03:00 by kerem · 7 comments
Owner

Originally created by @AlexH-HankIT on GitHub (Apr 17, 2014).
Original GitHub issue: https://github.com/retspen/webvirtmgr/issues/284

I have configured three servers. Two kvm hosts and one server for webvirtmgr. I successfully added the first host to webvirtmgr. Everything is working fine. But if add the second server and try to manage it, it get the following error. (Both kvm servers are connected via ssh)

libvir: RPC error : authentication failed: polkit: libvirt: error : cannot execute binary /usr/bin/pkcheck: No such file or directory
WARNING:py.warnings:/var/www/webvirtmgr/vrtManager/connection.py:48: DeprecationWarning: BaseException.message has been deprecated as of Python 2.6
raise err.message

ERROR:django.request:Internal Server Error: /instances/2/
Traceback (most recent call last):
File "/usr/local/lib/python2.7/dist-packages/django/core/handlers/base.py", line 115, in get_response
response = callback(request, _callback_args, *_callback_kwargs)
File "/var/www/webvirtmgr/instance/views.py", line 374, in instances
compute.type)
File "/var/www/webvirtmgr/vrtManager/connection.py", line 48, in init
raise err.message
TypeError: exceptions must be old-style classes or derived from BaseException, not str
[17/Apr/2014 12:59:09] "GET /instances/2/ HTTP/1.1" 500 1827

Does anybody know why i get this error? The other machine is working fine and i thought i configured them identically...

Appreciate any help.

Originally created by @AlexH-HankIT on GitHub (Apr 17, 2014). Original GitHub issue: https://github.com/retspen/webvirtmgr/issues/284 I have configured three servers. Two kvm hosts and one server for webvirtmgr. I successfully added the first host to webvirtmgr. Everything is working fine. But if add the second server and try to manage it, it get the following error. (Both kvm servers are connected via ssh) libvir: RPC error : authentication failed: polkit: libvirt: error : cannot execute binary /usr/bin/pkcheck: No such file or directory WARNING:py.warnings:/var/www/webvirtmgr/vrtManager/connection.py:48: DeprecationWarning: BaseException.message has been deprecated as of Python 2.6 raise err.message ERROR:django.request:Internal Server Error: /instances/2/ Traceback (most recent call last): File "/usr/local/lib/python2.7/dist-packages/django/core/handlers/base.py", line 115, in get_response response = callback(request, _callback_args, *_callback_kwargs) File "/var/www/webvirtmgr/instance/views.py", line 374, in instances compute.type) File "/var/www/webvirtmgr/vrtManager/connection.py", line 48, in **init** raise err.message TypeError: exceptions must be old-style classes or derived from BaseException, not str [17/Apr/2014 12:59:09] "GET /instances/2/ HTTP/1.1" 500 1827 Does anybody know why i get this error? The other machine is working fine and i thought i configured them identically... Appreciate any help.
kerem closed this issue 2026-02-27 16:38:30 +03:00
Author
Owner

@retspen commented on GitHub (Apr 18, 2014):

$ sudo yum reinstall polkit

<!-- gh-comment-id:40789175 --> @retspen commented on GitHub (Apr 18, 2014): $ sudo yum reinstall polkit
Author
Owner

@AlexH-HankIT commented on GitHub (Apr 18, 2014):

I'm using debian 7, so i was looking for the package "polkit" , but "dpkg --list | grep polkit" gives no output on both servers, neither does a search in the repos: "apt-cache search polkit". It looks like i don't have the packages at all, which is weird becaus one server is just working fine...

<!-- gh-comment-id:40800963 --> @AlexH-HankIT commented on GitHub (Apr 18, 2014): I'm using debian 7, so i was looking for the package "polkit" , but "dpkg --list | grep polkit" gives no output on both servers, neither does a search in the repos: "apt-cache search polkit". It looks like i don't have the packages at all, which is weird becaus one server is just working fine...
Author
Owner

@retspen commented on GitHub (Apr 18, 2014):

https://packages.debian.org/wheezy/amd64/policykit-1/filelist

<!-- gh-comment-id:40801122 --> @retspen commented on GitHub (Apr 18, 2014): https://packages.debian.org/wheezy/amd64/policykit-1/filelist
Author
Owner

@AlexH-HankIT commented on GitHub (Apr 18, 2014):

Package isn't installed. Neither on the working nor the non working machine. I installed it on the non working server and now the error message changed a bit:

libvir: RPC error : authentication failed: polkit: polkit\56retains_authorization_after_challenge=1
Authorization requires authentication but no agent is available.
WARNING:py.warnings:/var/www/webvirtmgr/vrtManager/connection.py:48: DeprecationWarning: BaseException.message has been deprecated as of Python 2.6
raise err.message

ERROR:django.request:Internal Server Error: /instances/2/
Traceback (most recent call last):
File "/usr/local/lib/python2.7/dist-packages/django/core/handlers/base.py", line 115, in get_response
response = callback(request, _callback_args, *_callback_kwargs)
File "/var/www/webvirtmgr/instance/views.py", line 374, in instances
compute.type)
File "/var/www/webvirtmgr/vrtManager/connection.py", line 48, in init
raise err.message
TypeError: exceptions must be old-style classes or derived from BaseException, not str

<!-- gh-comment-id:40802660 --> @AlexH-HankIT commented on GitHub (Apr 18, 2014): Package isn't installed. Neither on the working nor the non working machine. I installed it on the non working server and now the error message changed a bit: libvir: RPC error : authentication failed: polkit: polkit\56retains_authorization_after_challenge=1 Authorization requires authentication but no agent is available. WARNING:py.warnings:/var/www/webvirtmgr/vrtManager/connection.py:48: DeprecationWarning: BaseException.message has been deprecated as of Python 2.6 raise err.message ERROR:django.request:Internal Server Error: /instances/2/ Traceback (most recent call last): File "/usr/local/lib/python2.7/dist-packages/django/core/handlers/base.py", line 115, in get_response response = callback(request, _callback_args, *_callback_kwargs) File "/var/www/webvirtmgr/instance/views.py", line 374, in instances compute.type) File "/var/www/webvirtmgr/vrtManager/connection.py", line 48, in **init** raise err.message TypeError: exceptions must be old-style classes or derived from BaseException, not str
Author
Owner

@retspen commented on GitHub (Apr 18, 2014):

Do you connected to the server?

$ virsh --connect qemu+tcp://your_server_ip/system

<!-- gh-comment-id:40804852 --> @retspen commented on GitHub (Apr 18, 2014): Do you connected to the server? $ virsh --connect qemu+tcp://your_server_ip/system
Author
Owner

@AlexH-HankIT commented on GitHub (Apr 18, 2014):

When i try to connect with "virsh -c qemu+ssh://webvirtmgr@kvm02/system". I get this:

error: authentication failed: polkit: polkit\56retains_authorization_after_challenge=1
Authorization requires authentication but no agent is available.

error: failed to connect to the hypervisor

Looks like this error isn't related to webvirtmgr at all.

<!-- gh-comment-id:40805540 --> @AlexH-HankIT commented on GitHub (Apr 18, 2014): When i try to connect with "virsh -c qemu+ssh://webvirtmgr@kvm02/system". I get this: error: authentication failed: polkit: polkit\56retains_authorization_after_challenge=1 Authorization requires authentication but no agent is available. error: failed to connect to the hypervisor Looks like this error isn't related to webvirtmgr at all.
Author
Owner

@AlexH-HankIT commented on GitHub (Apr 18, 2014):

I remove the following packages and now everything is working fine. No clue why they were installed or why it's working now.
console-setup-linux libck-connector0 libpam-ck-connector libpolkit-gobject-1-0 xkb-data consolekit

After that i restarted the libvirt-bin service and the error was gone.

Thanks for your help.

<!-- gh-comment-id:40853432 --> @AlexH-HankIT commented on GitHub (Apr 18, 2014): I remove the following packages and now everything is working fine. No clue why they were installed or why it's working now. console-setup-linux libck-connector0 libpam-ck-connector libpolkit-gobject-1-0 xkb-data consolekit After that i restarted the libvirt-bin service and the error was gone. Thanks for your help.
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/webvirtmgr#228
No description provided.