[GH-ISSUE #119] VNC error after installing WebVirtMgr Panel 3.0 #101

Closed
opened 2026-02-27 16:37:56 +03:00 by kerem · 4 comments
Owner

Originally created by @tango38317 on GitHub (Sep 29, 2013).
Original GitHub issue: https://github.com/retspen/webvirtmgr/issues/119

Hi,
after installing WebVirtMgr Panel 3.0 the vnc connection to guests does not start (in V2.4 vnc connection was successfull) After enabling Debugging in settings.py i get following error:
How can i solve this issue?

thx
chris

UnboundLocalError at /console/1/DC/

local variable 'socket_port' referenced before assignment

Request Method: GET
Request URL: http://192.168.1.10/console/1/DC/?token=DC
Django Version: 1.5.2
Exception Type: UnboundLocalError
Exception Value:

local variable 'socket_port' referenced before assignment

Exception Location: /var/www/webvirtmgr/console/views.py in console, line 43
Python Executable: /usr/bin/python
Python Version: 2.7.3
Python Path:

['/var/www/webvirtmgr',
'/usr/lib/python2.7',
'/usr/lib/python2.7/plat-linux2',
'/usr/lib/python2.7/lib-tk',
'/usr/lib/python2.7/lib-old',
'/usr/lib/python2.7/lib-dynload',
'/usr/local/lib/python2.7/dist-packages',
'/usr/lib/python2.7/dist-packages',
'/usr/lib/python2.7/dist-packages/gtk-2.0']

Server time: Sun, 29 Sep 2013 22:49:01 +0300

Environment:

Request Method: GET
Request URL: http://192.168.1.10/console/1/DC/?token=DC

Django Version: 1.5.2
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',
'instance')
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/local/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/console/views.py" in console
  2.                                                'socket_port': socket_port,
    

Exception Type: UnboundLocalError at /console/1/DC/
Exception Value: local variable 'socket_port' referenced before assignment

Originally created by @tango38317 on GitHub (Sep 29, 2013). Original GitHub issue: https://github.com/retspen/webvirtmgr/issues/119 Hi, after installing WebVirtMgr Panel 3.0 the vnc connection to guests does not start (in V2.4 vnc connection was successfull) After enabling Debugging in settings.py i get following error: How can i solve this issue? thx chris UnboundLocalError at /console/1/DC/ local variable 'socket_port' referenced before assignment Request Method: GET Request URL: http://192.168.1.10/console/1/DC/?token=DC Django Version: 1.5.2 Exception Type: UnboundLocalError Exception Value: local variable 'socket_port' referenced before assignment Exception Location: /var/www/webvirtmgr/console/views.py in console, line 43 Python Executable: /usr/bin/python Python Version: 2.7.3 Python Path: ['/var/www/webvirtmgr', '/usr/lib/python2.7', '/usr/lib/python2.7/plat-linux2', '/usr/lib/python2.7/lib-tk', '/usr/lib/python2.7/lib-old', '/usr/lib/python2.7/lib-dynload', '/usr/local/lib/python2.7/dist-packages', '/usr/lib/python2.7/dist-packages', '/usr/lib/python2.7/dist-packages/gtk-2.0'] Server time: Sun, 29 Sep 2013 22:49:01 +0300 Environment: Request Method: GET Request URL: http://192.168.1.10/console/1/DC/?token=DC Django Version: 1.5.2 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', 'instance') 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/local/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/console/views.py" in console 2. 'socket_port': socket_port, Exception Type: UnboundLocalError at /console/1/DC/ Exception Value: local variable 'socket_port' referenced before assignment
kerem closed this issue 2026-02-27 16:37:56 +03:00
Author
Owner

@tango38317 commented on GitHub (Sep 30, 2013):

HI,
after updating from git, this issue is solved. When i try to connect to a vm, i see the message to power off vm and set a vnc password - powered off one guest, set a password, power on vm but i can´t connect.

Error Message: failed to connect to server (code: 1006):

in v 2.4 it was possible to connect with local username and password (and accept a certificate) - i did not get any credentials window - is it possible to add this in v 3.0?

thx
chris

<!-- gh-comment-id:25341356 --> @tango38317 commented on GitHub (Sep 30, 2013): HI, after updating from git, this issue is solved. When i try to connect to a vm, i see the message to power off vm and set a vnc password - powered off one guest, set a password, power on vm but i can´t connect. Error Message: failed to connect to server (code: 1006): in v 2.4 it was possible to connect with local username and password (and accept a certificate) - i did not get any credentials window - is it possible to add this in v 3.0? thx chris
Author
Owner

@retspen commented on GitHub (Sep 30, 2013):

In v 3.0 removed java applet work only noVNC. Need uncomment in file /etc/libvirt/qemu.conf:

vnc_listen = "0.0.0.0"

then need restart libvirt service and setup password for VNC

<!-- gh-comment-id:25342509 --> @retspen commented on GitHub (Sep 30, 2013): In v 3.0 removed java applet work only noVNC. Need uncomment in file /etc/libvirt/qemu.conf: vnc_listen = "0.0.0.0" then need restart libvirt service and setup password for VNC
Author
Owner

@caustic1q commented on GitHub (Oct 20, 2013):

HI, I'll get always the message "Shuttoff VM and set VNC password".
The password is set, vnc_listen is set and I'm able to connect with tightvnc without any problems.
noVNC is not working for me too, but I cannot see any further errormessages.

Just a fresh install Ubuntu 12.04.3
django 1.5.3

all other parts are working properly

Curious I deleted my first vm and created a new one.
Now noVNC is working...

<!-- gh-comment-id:26664389 --> @caustic1q commented on GitHub (Oct 20, 2013): HI, I'll get always the message "Shuttoff VM and set VNC password". The password is set, vnc_listen is set and I'm able to connect with tightvnc without any problems. noVNC is not working for me too, but I cannot see any further errormessages. Just a fresh install Ubuntu 12.04.3 django 1.5.3 all other parts are working properly Curious I deleted my first vm and created a new one. Now noVNC is working...
Author
Owner

@retspen commented on GitHub (Oct 20, 2013):

You click button "Set VNC password" ?

<!-- gh-comment-id:26666471 --> @retspen commented on GitHub (Oct 20, 2013): You click button "Set VNC password" ?
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#101
No description provided.