[GH-ISSUE #22] Error 500 #13

Closed
opened 2026-02-27 16:00:41 +03:00 by kerem · 21 comments
Owner

Originally created by @ncyclon on GitHub (Feb 7, 2013).
Original GitHub issue: https://github.com/retspen/webvirtmgr/issues/22

I've got this error when try to open console (appear in new window):


Error 500

WebVirtMgr

Sign in

500

Originally created by @ncyclon on GitHub (Feb 7, 2013). Original GitHub issue: https://github.com/retspen/webvirtmgr/issues/22 I've got this error when try to open console (appear in new window): --- ## Error 500 WebVirtMgr ``` Sign in ``` ## 500
kerem 2026-02-27 16:00:41 +03:00
  • closed this issue
  • added the
    bug
    label
Author
Owner

@ncyclon commented on GitHub (Feb 7, 2013):

./manage.py runserver 0.0.0.0:8888
.....
[07/Feb/2013 13:43:57] "GET /vm/1/test/ HTTP/1.1" 200 9571
[07/Feb/2013 13:44:05] "POST /vm/1/test/ HTTP/1.1" 302 0
[07/Feb/2013 13:44:07] "GET /vm/1/test/ HTTP/1.1" 200 9596
[07/Feb/2013 13:44:10] "GET /vnc/1/test HTTP/1.1" 301 0
[07/Feb/2013 13:44:10] "GET /vnc/1/test/ HTTP/1.1" 500 1801
[07/Feb/2013 13:44:11] "GET /vnc/1/css/bootstrap-responsive.css HTTP/1.1" 404 1838
[07/Feb/2013 13:44:11] "GET /vnc/1/css/bootstrap.css HTTP/1.1" 404 1838
[07/Feb/2013 13:44:11] "GET /vnc/1/js/jquery.js HTTP/1.1" 404 1838
[07/Feb/2013 13:44:11] "GET /vnc/1/js/bootstrap.js HTTP/1.1" 404 1838
[07/Feb/2013 13:44:11] "GET /vnc/1/js/bootstrap.js HTTP/1.1" 404 1838

<!-- gh-comment-id:13232376 --> @ncyclon commented on GitHub (Feb 7, 2013): ./manage.py runserver 0.0.0.0:8888 ..... [07/Feb/2013 13:43:57] "GET /vm/1/test/ HTTP/1.1" 200 9571 [07/Feb/2013 13:44:05] "POST /vm/1/test/ HTTP/1.1" 302 0 [07/Feb/2013 13:44:07] "GET /vm/1/test/ HTTP/1.1" 200 9596 [07/Feb/2013 13:44:10] "GET /vnc/1/test HTTP/1.1" 301 0 [07/Feb/2013 13:44:10] "GET /vnc/1/test/ HTTP/1.1" 500 1801 [07/Feb/2013 13:44:11] "GET /vnc/1/css/bootstrap-responsive.css HTTP/1.1" 404 1838 [07/Feb/2013 13:44:11] "GET /vnc/1/css/bootstrap.css HTTP/1.1" 404 1838 [07/Feb/2013 13:44:11] "GET /vnc/1/js/jquery.js HTTP/1.1" 404 1838 [07/Feb/2013 13:44:11] "GET /vnc/1/js/bootstrap.js HTTP/1.1" 404 1838 [07/Feb/2013 13:44:11] "GET /vnc/1/js/bootstrap.js HTTP/1.1" 404 1838
Author
Owner

@retspen commented on GitHub (Feb 7, 2013):

Need redefined all VM in WevVirtMgr

<!-- gh-comment-id:13232597 --> @retspen commented on GitHub (Feb 7, 2013): Need redefined all VM in WevVirtMgr
Author
Owner

@ncyclon commented on GitHub (Feb 7, 2013):

How can I do that?

<!-- gh-comment-id:13232820 --> @ncyclon commented on GitHub (Feb 7, 2013): How can I do that?
Author
Owner

@retspen commented on GitHub (Feb 7, 2013):

In VM button Delete (Hdd image not deleted) then Create VM -> Custom: select your hdd image.

<!-- gh-comment-id:13233524 --> @retspen commented on GitHub (Feb 7, 2013): In VM button Delete (Hdd image not deleted) then Create VM -> Custom: select your hdd image.
Author
Owner

@ncyclon commented on GitHub (Feb 7, 2013):

Same error when I try to create vm:

[07/Feb/2013 14:27:30] "GET /newvm/1/ HTTP/1.1" 200 35785
[07/Feb/2013 14:27:52] "POST /newvm/1/ HTTP/1.1" 500 1801
[07/Feb/2013 14:27:52] "GET /newvm/js/bootstrap.js HTTP/1.1" 404 1838
[07/Feb/2013 14:27:52] "GET /newvm/css/bootstrap-responsive.css HTTP/1.1" 404 1838
[07/Feb/2013 14:27:52] "GET /newvm/js/jquery.js HTTP/1.1" 404 1838
[07/Feb/2013 14:27:52] "GET /newvm/css/bootstrap.css HTTP/1.1" 404 1838
[07/Feb/2013 14:27:52] "GET /newvm/js/bootstrap.js HTTP/1.1" 404 1838
[07/Feb/2013 14:27:52] "GET /newvm/img/favicon.ico HTTP/1.1" 404 1838

<!-- gh-comment-id:13233801 --> @ncyclon commented on GitHub (Feb 7, 2013): Same error when I try to create vm: [07/Feb/2013 14:27:30] "GET /newvm/1/ HTTP/1.1" 200 35785 [07/Feb/2013 14:27:52] "POST /newvm/1/ HTTP/1.1" 500 1801 [07/Feb/2013 14:27:52] "GET /newvm/js/bootstrap.js HTTP/1.1" 404 1838 [07/Feb/2013 14:27:52] "GET /newvm/css/bootstrap-responsive.css HTTP/1.1" 404 1838 [07/Feb/2013 14:27:52] "GET /newvm/js/jquery.js HTTP/1.1" 404 1838 [07/Feb/2013 14:27:52] "GET /newvm/css/bootstrap.css HTTP/1.1" 404 1838 [07/Feb/2013 14:27:52] "GET /newvm/js/bootstrap.js HTTP/1.1" 404 1838 [07/Feb/2013 14:27:52] "GET /newvm/img/favicon.ico HTTP/1.1" 404 1838
Author
Owner

@retspen commented on GitHub (Feb 7, 2013):

In file settings.py change line:
DEBUG = False to DEBUG = True

what show debuger ?

<!-- gh-comment-id:13233982 --> @retspen commented on GitHub (Feb 7, 2013): In file settings.py change line: DEBUG = False to DEBUG = True what show debuger ?
Author
Owner

@ncyclon commented on GitHub (Feb 7, 2013):

Environment:

Request Method: POST
Request URL: http://192.168.123.152:8888/newvm/1/

Django Version: 1.4.3
Python Version: 2.7.3
Installed Applications:
('django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.sites',
'django.contrib.messages',
'django.contrib.staticfiles',
'django.contrib.admin',
'webvirtmgr.polls')
Installed Middleware:
('django.middleware.common.CommonMiddleware',
'django.contrib.sessions.middleware.SessionMiddleware',
'django.middleware.csrf.CsrfViewMiddleware',
'django.contrib.auth.middleware.AuthenticationMiddleware',
'django.contrib.messages.middleware.MessageMiddleware')

Traceback:
File "/usr/lib/python2.7/dist-packages/django/core/handlers/base.py" in get_response

  1.                     response = callback(request, _callback_args, *_callback_kwargs)
    
    File "/var/www/webvirtmgr/../webvirtmgr/polls/views.py" in newvm
  2.                     new_vm = Vm(host=host_id, vname=vname, vnc_passwd=vnc_passwd)
    
    File "/usr/lib/python2.7/dist-packages/django/db/models/base.py" in init
  3.             setattr(self, field.name, rel_obj)
    
    File "/usr/lib/python2.7/dist-packages/django/db/models/fields/related.py" in set
  4.                              self.field.name, self.field.rel.to._meta.object_name))
    

Exception Type: ValueError at /newvm/1/
Exception Value: Cannot assign "u'1'": "Vm.host" must be a "Host" instance.

<!-- gh-comment-id:13234110 --> @ncyclon commented on GitHub (Feb 7, 2013): Environment: Request Method: POST Request URL: http://192.168.123.152:8888/newvm/1/ Django Version: 1.4.3 Python Version: 2.7.3 Installed Applications: ('django.contrib.auth', 'django.contrib.contenttypes', 'django.contrib.sessions', 'django.contrib.sites', 'django.contrib.messages', 'django.contrib.staticfiles', 'django.contrib.admin', 'webvirtmgr.polls') Installed Middleware: ('django.middleware.common.CommonMiddleware', 'django.contrib.sessions.middleware.SessionMiddleware', 'django.middleware.csrf.CsrfViewMiddleware', 'django.contrib.auth.middleware.AuthenticationMiddleware', 'django.contrib.messages.middleware.MessageMiddleware') Traceback: File "/usr/lib/python2.7/dist-packages/django/core/handlers/base.py" in get_response 1. response = callback(request, _callback_args, *_callback_kwargs) File "/var/www/webvirtmgr/../webvirtmgr/polls/views.py" in newvm 2. new_vm = Vm(host=host_id, vname=vname, vnc_passwd=vnc_passwd) File "/usr/lib/python2.7/dist-packages/django/db/models/base.py" in **init** 3. setattr(self, field.name, rel_obj) File "/usr/lib/python2.7/dist-packages/django/db/models/fields/related.py" in **set** 4. self.field.name, self.field.rel.to._meta.object_name)) Exception Type: ValueError at /newvm/1/ Exception Value: Cannot assign "u'1'": "Vm.host" must be a "Host" instance.
Author
Owner

@retspen commented on GitHub (Feb 7, 2013):

Fix bug.
$ cd webvitmgr
$ git pull

<!-- gh-comment-id:13235219 --> @retspen commented on GitHub (Feb 7, 2013): Fix bug. $ cd webvitmgr $ git pull
Author
Owner

@ncyclon commented on GitHub (Feb 7, 2013):

After creating vm:

unsupported configuration: the QEMU binary /usr/bin/qemu-system-arm does not support kvm

vm.xml:
....
/usr/bin/qemu-system-arm
....

<!-- gh-comment-id:13235496 --> @ncyclon commented on GitHub (Feb 7, 2013): After creating vm: unsupported configuration: the QEMU binary /usr/bin/qemu-system-arm does not support kvm vm.xml: .... <emulator>/usr/bin/qemu-system-arm</emulator> ....
Author
Owner

@WhiteWind commented on GitHub (Feb 7, 2013):

What is different when creating VM with WebVirtMgr? Why one should recreate VM's?
Does VM need to be in database?

<!-- gh-comment-id:13236149 --> @WhiteWind commented on GitHub (Feb 7, 2013): What is different when creating VM with WebVirtMgr? Why one should recreate VM's? Does VM need to be in database?
Author
Owner

@retspen commented on GitHub (Feb 7, 2013):

When your create VM in WebVirtMgr in webvirtmgr.db put line with VNC passwd. VNC password get only from DB when your create VM. Libvirt not support parse VCN password from XML.

<!-- gh-comment-id:13236608 --> @retspen commented on GitHub (Feb 7, 2013): When your create VM in WebVirtMgr in webvirtmgr.db put line with VNC passwd. VNC password get only from DB when your create VM. Libvirt not support parse VCN password from XML.
Author
Owner

@retspen commented on GitHub (Feb 7, 2013):

ARM not support in WebVirtMgr. I think may be you can do something interesting idea.

<!-- gh-comment-id:13236676 --> @retspen commented on GitHub (Feb 7, 2013): ARM not support in WebVirtMgr. I think may be you can do something interesting idea.
Author
Owner

@WhiteWind commented on GitHub (Feb 7, 2013):

Well, Ok then. Is it possible to make WebVirtMgr ask user for a password in this case?

BTW, when I try to connect to newly created VM I get "Could not connect to server: x.x.x.x:5901".
It's obvious, though, because libvirt asks KVM to bind VNC server to 127.0.0.1:5901
Which, in turn is because of absence of "listen=0.0.0.0" attribute and <listen type='address' address='0.0.0.0'/> subtag in XML

<!-- gh-comment-id:13236774 --> @WhiteWind commented on GitHub (Feb 7, 2013): Well, Ok then. Is it possible to make WebVirtMgr ask user for a password in this case? BTW, when I try to connect to newly created VM I get "Could not connect to server: x.x.x.x:5901". It's obvious, though, because libvirt asks KVM to bind VNC server to 127.0.0.1:5901 Which, in turn is because of absence of "listen=0.0.0.0" attribute and &lt;listen type='address' address='0.0.0.0'/&gt; subtag in XML
Author
Owner

@ncyclon commented on GitHub (Feb 7, 2013):

ARM not support in WebVirtMgr. I think may be you can do something interesting idea.

But I did not specify the type of architecture.

<!-- gh-comment-id:13236781 --> @ncyclon commented on GitHub (Feb 7, 2013): > ARM not support in WebVirtMgr. I think may be you can do something interesting idea. But I did not specify the type of architecture.
Author
Owner

@retspen commented on GitHub (Feb 7, 2013):

Need in file /etc/libvirt/qemu.conf uncoment line:
vnc_listen = "0.0.0.0"

<!-- gh-comment-id:13237477 --> @retspen commented on GitHub (Feb 7, 2013): Need in file /etc/libvirt/qemu.conf uncoment line: vnc_listen = "0.0.0.0"
Author
Owner

@retspen commented on GitHub (Feb 7, 2013):

ncyclon

what show this commnad
$ virsh capabilities

<!-- gh-comment-id:13237654 --> @retspen commented on GitHub (Feb 7, 2013): ## ncyclon what show this commnad $ virsh capabilities
Author
Owner

@ncyclon commented on GitHub (Feb 7, 2013):

what show this commnad
$ virsh capabilities

http://pastebin.com/SLc4wSUX

<!-- gh-comment-id:13237940 --> @ncyclon commented on GitHub (Feb 7, 2013): > what show this commnad > $ virsh capabilities http://pastebin.com/SLc4wSUX
Author
Owner

@retspen commented on GitHub (Feb 7, 2013):

Be sure mistakes will be corrected but not today. What linux distro your use?

<!-- gh-comment-id:13240066 --> @retspen commented on GitHub (Feb 7, 2013): Be sure mistakes will be corrected but not today. What linux distro your use?
Author
Owner

@ncyclon commented on GitHub (Feb 7, 2013):

debian wheezy/experimental

<!-- gh-comment-id:13245879 --> @ncyclon commented on GitHub (Feb 7, 2013): debian wheezy/experimental
Author
Owner

@cbartholomee commented on GitHub (Feb 18, 2013):

Having exact the same issue on a n Ubuntu 12.10 machine. Webvirtmgr is not running on the VM host. Updated webvirtmgr to latest version (git pull). Uncommented vnc_listen in qemu.conf on vm-host. No succes.

SOLUTION:
Added records for each vm into 'polls_vm' table using sqlite3 cli. example:
sqlite> insert into polls_vm values (1,1,'test','');
sqlite> select * from polls_vm;
id host_id vname vnc_passwd


1 1 achel

This solution works on a running VM. You don't need to recreate (and therefor stop) the VM.

NOTE:
You need to enable VNC to listen on the hosts' public IP for each VM.

(probably when uncommenting 'vnc_linsten' in qemu.conf, new created VM's will automatically have the correct settings. I'm not sure, but maybe someone can confirm)

REQUEST:
Adding the 'polls_vm' records could be automated when adding a new host. Passwd default is blank. Providing VNC settings for a VM to change this passwd in webvirtmgr's web-interface.

<!-- gh-comment-id:13716528 --> @cbartholomee commented on GitHub (Feb 18, 2013): Having exact the same issue on a n Ubuntu 12.10 machine. Webvirtmgr is not running on the VM host. Updated webvirtmgr to latest version (git pull). Uncommented vnc_listen in qemu.conf on vm-host. No succes. SOLUTION: Added records for each vm into 'polls_vm' table using sqlite3 cli. example: sqlite> insert into polls_vm values (1,1,'test',''); sqlite> select \* from polls_vm; id host_id vname vnc_passwd --- 1 1 achel This solution works on a running VM. You don't need to recreate (and therefor stop) the VM. NOTE: You need to enable VNC to listen on the hosts' public IP for each VM. <graphics type='vnc' listen='0.0.0.0'/> (probably when uncommenting 'vnc_linsten' in qemu.conf, new created VM's will automatically have the correct settings. I'm not sure, but maybe someone can confirm) REQUEST: Adding the 'polls_vm' records could be automated when adding a new host. Passwd default is blank. Providing VNC settings for a VM to change this passwd in webvirtmgr's web-interface.
Author
Owner

@retspen commented on GitHub (Feb 24, 2013):

ncyclon

Bug fixed. Sorry for the long wait. Thanks!

cbartholomee

Create new issue with your REQUEST. Thanks!

<!-- gh-comment-id:14007483 --> @retspen commented on GitHub (Feb 24, 2013): ## ncyclon Bug fixed. Sorry for the long wait. Thanks! ## cbartholomee Create new issue with your REQUEST. Thanks!
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#13
No description provided.