mirror of
https://github.com/retspen/webvirtmgr.git
synced 2026-04-26 16:15:50 +03:00
[GH-ISSUE #498] Trouble with novnc after updating webvirtmgr #372
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @dennobaby on GitHub (Feb 9, 2015).
Original GitHub issue: https://github.com/retspen/webvirtmgr/issues/498
Hi,
today i updated webvirtmgr. All seems fine but vnc-access. I got these messages in log:
´´´
24: handler exception: WSRequestHandler instance has no attribute 'last_code'
25: handler exception: WSRequestHandler instance has no attribute 'last_code'
26: 10.0.2.16: Normal web request received but disallowed
27: handler exception: WSRequestHandler instance has no attribute 'last_code'
28: 10.0.2.16: Normal web request received but disallowed
29: handler exception: WSRequestHandler instance has no attribute 'last_code'
30: handler exception: WSRequestHandler instance has no attribute 'last_code'
31: 10.0.2.16: Normal web request received but disallowed
32: handler exception: WSRequestHandler instance has no attribute 'last_code'
33: 10.0.2.16: SSL/TLS (wss://) WebSocket connection
33: 10.0.2.16: Version hybi-13, base64: 'True'
33: handler exception: expected string or buffer
34: handler exception: WSRequestHandler instance has no attribute 'last_code'
35: 10.0.2.16: SSL/TLS (wss://) WebSocket connection
35: 10.0.2.16: Version hybi-13, base64: 'True'
35: handler exception: expected string or buffer
36: handler exception: WSRequestHandler instance has no attribute 'last_code'
37: 10.0.2.16: SSL/TLS (wss://) WebSocket connection
37: 10.0.2.16: Version hybi-13, base64: 'True'
37: handler exception: expected string or buffer
38: handler exception: WSRequestHandler instance has no attribute 'last_code'
39: 10.0.2.16: SSL/TLS (wss://) WebSocket connection
39: 10.0.2.16: Version hybi-13, base64: 'True'
39: handler exception: expected string or buffer
40: handler exception: WSRequestHandler instance has no attribute 'last_code'
41: 10.0.2.16: SSL/TLS (wss://) WebSocket connection
41: 10.0.2.16: Version hybi-13, base64: 'True'
41: handler exception: expected string or buffer
42: handler exception: WSRequestHandler instance has no attribute 'last_code'
43: 10.0.2.16: SSL/TLS (wss://) WebSocket connection
43: 10.0.2.16: Version hybi-13, base64: 'True'
43: handler exception: expected string or buffer
´´´
In webvirtmgr i got "Failed to connect to server (code: 1006)"
I'm running webvirtmgr over ssl/https
Any ideas?
@chamambom commented on GitHub (Mar 2, 2015):
I have 2 machines running webvirtmgr and the other one is for testing new changes before i do it on the production server ....and after doing a git pull with the latest changes ,webvirtmgr is also giving me the same issue and surprisingly if i run this command below
websockify 6080 10.10.8.107:5900 where 10.10.8.107 is the ip of the KVM HOST
i can connect without problems ,can anyone tel me what i should change or what has been broken
@chamambom commented on GitHub (Mar 2, 2015):
and try this on your webvirtmgr portal
netstat -lnp | grep 6080
@chamambom commented on GitHub (Mar 2, 2015):
After putting my head to it ,i saw files that had changed after the update ....... this is what i did
i cd into cd /var/www/webvirtmgr/console/ and on the new webvirtmgr [after git pull] there is this file webvirtmgr-console
and when i cd into cd /var/www/webvirtmgr/console/ on the old webvirtmgr [before the update] there is this file webvirtmgr-novnc
so this is what i did
i opened vim /etc/supervisord.conf and there are these lines as below
[program:webvirtmgri-novnc]
command=/usr/bin/python /var/www/webvirtmgr/console/webvirtmgr-novnc
directory=/var/www/webvirtmgr
autostart=true
autorestart=true
stdout_logfile=/var/log/supervisor/webvirtmgr-nonvc.log
redirect_stderr=true
user=nginx
[root@webvirt console]#
i changed the line command=/usr/bin/python /var/www/webvirtmgr/console/webvirtmgr-novnc
to command=/usr/bin/python /var/www/webvirtmgr/console/webvirtmgr-console and restarted my webvirt and voila ,everything is now working as expected
@chamambom commented on GitHub (Mar 2, 2015):
let me know if you get it working
@theArch2 commented on GitHub (Mar 5, 2015):
No, thats not the issue. I have the same behavior on a new installation. Completely from scratch.
No matters if https or not, i got everytime
@theArch2 commented on GitHub (Mar 16, 2015):
Some one else seeing this behavior?
I have a brand new installation with CentOS 7 exactly followed the wiki-procedure.
@brenard commented on GitHub (Mar 16, 2015):
Hi, you could try to take my version of webvirtmgr-console script
github.com/brenard/webvirtmgr@6e57194b30that accept parameters. Try to run script with -d parameter to enable debug message.@theArch2 commented on GitHub (Mar 17, 2015):
Thanks for that! Now the script tells a little bit more:
@brenard commented on GitHub (Mar 17, 2015):
Yes, it is clearer now. I mean you have a particularity in your domain XML. Could you provide it ? I need to see the graphics XML balise content to understand your problem. You may be try this patch to debug connexion calculate before the exception :
@theArch2 commented on GitHub (Mar 17, 2015):
Hi,
got this:
edit: here an other:
edit2: at the libvirt-host i got this in the libvirtd.log:
@brenard commented on GitHub (Mar 17, 2015):
It's strange because on running virtual domain, console_host normally can't be None. Could you share the virtual domain XML ? Witch is your libvirt version ?
@theArch2 commented on GitHub (Mar 17, 2015):
libvirt-version on the libvirt-host (not the host where webvirtmgr is running!): libvirtd (libvirt) 0.10.2
the xml:
@theArch2 commented on GitHub (Mar 17, 2015):
I have it: in the graphics section there have to be an address-element like this:
But i think this could be checked earlier. It is not optimal that he fails at the webvirtmgr-console. It should be checked for example in "vrtManager/instance.py" at
@tboulogne commented on GitHub (Mar 18, 2015):
Hello,
After debugging, i replace
112 connhost = host.split(':')[0]113 connport = host.split(':')[1]By
112 connhost = instance.compute.hostname.split(':')[0]113 connport = instance.compute.hostname.split(':')[1]into console/webvirtmgr-novnc
Now i need to solve the ssh asking password.
@tboulogne commented on GitHub (Mar 18, 2015):
And to make the whole work, i add to force vnc to listen on 0.0.0.0 in /etc/libvirt/qemu.conf.
@brenard commented on GitHub (Mar 18, 2015):
@tboulogne : you'r right on split() call, I commit your fix here :
github.com/brenard/webvirtmgr@a10a95ecc6@theArch2 : I properly fix the get_console_listen_addr() method here
github.com/brenard/webvirtmgr@32d20e7314@hgw77 commented on GitHub (Apr 18, 2015):
Hi there, I have updated the latest changes and when I run webvirtmgr-console by hand I get the same error:
sudo /usr/bin/python /var/www/webvirtmgr/console/webvirtmgr-console
WARNING:root:No local_settings file found.
WebSocket server settings:
Listen on 0.0.0.0:6080
Flash security policy server
SSL/TLS support
proxying from 0.0.0.0:6080 to ignore:ignore
1: 192.168.22.101: Plain non-SSL (ws://) WebSocket connection
1: 192.168.22.101: Version hybi-13, base64: 'False'
1: handler exception: expected string or buffer
I thought this problem was fixed?
My Setup: KVM and Webvirtmgrt is on the same host and I try to access the VNC from another host in my intranet.
Thank you for any help :-)
@hgw77 commented on GitHub (Apr 18, 2015):
Hi, ok I think it's an issue with the configuration of the VM. I created my VMs bevore with virt-manager. Now I created a test VM with webvirt and the VNC is working!
Virt-Manager:
<graphics type='vnc' port='-1' autoport='yes'/>Webvirtmgr:
<graphics type='vnc' port='-1' autoport='yes' listen='0.0.0.0'> <listen type='address' address='0.0.0.0'/> </graphics>@DaSpawn commented on GitHub (Apr 21, 2015):
I just setup a fresh Ubuntu 14.04 install (the VM host is same Ubuntu version), and ran into this issue as well. I utilize SSH for my connections (non-standard port) , and all was working fine except for console with same errors as above. I had initially setup with virt-manager, so suspected the VNC options were the problem, they were not.
I finally edited the /var/www/webvirtmgr/console/webvirtmgr-console and changed the lines (67,68):
to
and all the consoles started working fine without any VM modification