[GH-ISSUE #413] ERROR:django.request:Internal Server Error: /instances/1/ #311

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

Originally created by @poxus on GitHub (Sep 1, 2014).
Original GitHub issue: https://github.com/retspen/webvirtmgr/issues/413

hi!
I see "500 Internal Server Error" after update (git pull):

webvirtmgr.log

INFO:gunicorn.access
ERROR:django.request:Internal Server Error: /instances/1/
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 358, in instances
compute.type)
File "/var/www/webvirtmgr/vrtManager/connection.py", line 355, in init
self.wvm = connection_manager.get_connection(host, login, passwd, conn)
File "/var/www/webvirtmgr/vrtManager/connection.py", line 295, in get_connection
connection = wvmConnection(host, login, passwd, conn)
File "/var/www/webvirtmgr/vrtManager/connection.py", line 72, in init
self.connect()
File "/var/www/webvirtmgr/vrtManager/connection.py", line 97, in connect
self.connection.registerCloseCallback(self.__connection_close_callback, None)
AttributeError: virConnect instance has no attribute 'registerCloseCallback'
Exception AttributeError: AttributeError("virConnect instance has no attribute 'unregisterCloseCallback'",)

Originally created by @poxus on GitHub (Sep 1, 2014). Original GitHub issue: https://github.com/retspen/webvirtmgr/issues/413 hi! I see "500 Internal Server Error" after update (git pull): webvirtmgr.log INFO:gunicorn.access ERROR:django.request:Internal Server Error: /instances/1/ 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 358, in instances compute.type) File "/var/www/webvirtmgr/vrtManager/connection.py", line 355, in **init** self.wvm = connection_manager.get_connection(host, login, passwd, conn) File "/var/www/webvirtmgr/vrtManager/connection.py", line 295, in get_connection connection = wvmConnection(host, login, passwd, conn) File "/var/www/webvirtmgr/vrtManager/connection.py", line 72, in **init** self.connect() File "/var/www/webvirtmgr/vrtManager/connection.py", line 97, in connect self.connection.registerCloseCallback(self.__connection_close_callback, None) AttributeError: virConnect instance has no attribute 'registerCloseCallback' Exception AttributeError: AttributeError("virConnect instance has no attribute 'unregisterCloseCallback'",)
kerem closed this issue 2026-02-27 16:38:49 +03:00
Author
Owner

@retspen commented on GitHub (Sep 1, 2014):

What linux distro do you use?

<!-- gh-comment-id:54046294 --> @retspen commented on GitHub (Sep 1, 2014): What linux distro do you use?
Author
Owner

@poxus commented on GitHub (Sep 1, 2014):

debian 7

<!-- gh-comment-id:54046633 --> @poxus commented on GitHub (Sep 1, 2014): debian 7
Author
Owner

@retspen commented on GitHub (Sep 1, 2014):

libvirt ver?

<!-- gh-comment-id:54046888 --> @retspen commented on GitHub (Sep 1, 2014): libvirt ver?
Author
Owner

@poxus commented on GitHub (Sep 1, 2014):

libvirtd --version
libvirtd (libvirt) 0.9.12.3

<!-- gh-comment-id:54047319 --> @poxus commented on GitHub (Sep 1, 2014): libvirtd --version libvirtd (libvirt) 0.9.12.3
Author
Owner

@retspen commented on GitHub (Sep 1, 2014):

You need update libvirt to 1.0.21 and above.

<!-- gh-comment-id:54047425 --> @retspen commented on GitHub (Sep 1, 2014): You need update libvirt to 1.0.21 and above.
Author
Owner

@poxus commented on GitHub (Sep 1, 2014):

but a cant install new_ver from wheezy repo, testing/backports or unstable only =(
ok, i'll try something to solve this.
Are u sure that the problem is in libvirt version only?

<!-- gh-comment-id:54048525 --> @poxus commented on GitHub (Sep 1, 2014): but a cant install new_ver from wheezy repo, testing/backports or unstable only =( ok, i'll try something to solve this. Are u sure that the problem is in libvirt version only?
Author
Owner

@retspen commented on GitHub (Sep 1, 2014):

Can you update project to last version and check?

<!-- gh-comment-id:54048733 --> @retspen commented on GitHub (Sep 1, 2014): Can you update project to last version and check?
Author
Owner

@poxus commented on GitHub (Sep 1, 2014):

nothing has changed

<!-- gh-comment-id:54049813 --> @poxus commented on GitHub (Sep 1, 2014): nothing has changed
Author
Owner

@retspen commented on GitHub (Sep 1, 2014):

Did you restart supervisord ?

<!-- gh-comment-id:54049886 --> @retspen commented on GitHub (Sep 1, 2014): Did you restart supervisord ?
Author
Owner

@poxus commented on GitHub (Sep 1, 2014):

yes, of course

.sh scrypt to upd:

#!/bin/bash
cd /var/www/webvirtmgr
git pull
./manage.py collectstatic
service supervisor stop
service supervisor start
service webvirtmgr-novnc restart

<!-- gh-comment-id:54050367 --> @poxus commented on GitHub (Sep 1, 2014): yes, of course .sh scrypt to upd: #!/bin/bash cd /var/www/webvirtmgr git pull ./manage.py collectstatic service supervisor stop service supervisor start service webvirtmgr-novnc restart
Author
Owner

@invisiblethreat commented on GitHub (Sep 1, 2014):

I had to make the following changes to have things run:

@@ -94,7 +91,8 @@
                     try:
                         self.connection.setKeepAlive(connection_manager.keepalive_interval, connection_manager.keepalive_count)
                         try:
-                            self.connection.registerCloseCallback(self.__connection_close_callback, None)
+                            #self.connection.registerCloseCallback(self.__connection_close_callback, None)
+                            pass
                         except TypeError:
                             # Temporary fix for libvirt > libvirt-0.10.2-41
                             pass
@@ -216,7 +203,8 @@
         if self.connection is not None:
             # unregister callback (as it is no longer valid if this instance gets deleted)
             try:
-                self.connection.unregisterCloseCallback()
+                #self.connection.unregisterCloseCallback()
+                pass
             except libvirtError:
                 pass
<!-- gh-comment-id:54088807 --> @invisiblethreat commented on GitHub (Sep 1, 2014): I had to make the following changes to have things run: ``` diff @@ -94,7 +91,8 @@ try: self.connection.setKeepAlive(connection_manager.keepalive_interval, connection_manager.keepalive_count) try: - self.connection.registerCloseCallback(self.__connection_close_callback, None) + #self.connection.registerCloseCallback(self.__connection_close_callback, None) + pass except TypeError: # Temporary fix for libvirt > libvirt-0.10.2-41 pass @@ -216,7 +203,8 @@ if self.connection is not None: # unregister callback (as it is no longer valid if this instance gets deleted) try: - self.connection.unregisterCloseCallback() + #self.connection.unregisterCloseCallback() + pass except libvirtError: pass ```
Author
Owner

@retspen commented on GitHub (Sep 2, 2014):

github.com/retspen/webvirtmgr@e01daf09f9

<!-- gh-comment-id:54110878 --> @retspen commented on GitHub (Sep 2, 2014): https://github.com/retspen/webvirtmgr/commit/e01daf09f98e3b61f3ade613ba740d28b856121e
Author
Owner

@poxus commented on GitHub (Sep 2, 2014):

yeah! everything is wrking now, at first sight

<!-- gh-comment-id:54148371 --> @poxus commented on GitHub (Sep 2, 2014): yeah! everything is wrking now, at first sight
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#311
No description provided.