[GH-ISSUE #44] VNC settings #34

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

Originally created by @ghost on GitHub (Mar 19, 2013).
Original GitHub issue: https://github.com/retspen/webvirtmgr/issues/44

I love the webvirtmgr. For the users in my office that are die hard virt-manager users, is there a way to get the VNC to play nice across both?

On a VM created from webvirtmgr, a console session opens flawlessly. From virt-manager, it asks for a password, but no password I've tried works.

On a VM created from virt-manager, a console session opens and prompts for ssh credentials from webvirtmgr (which is fine if that's the only option)

My issue is that I prefer to create the VMs in webvirtmgr, but thus far I'm not able to give console access to the virt-manager users. Is there a way to get them to play nice together?
Thanks.

Originally created by @ghost on GitHub (Mar 19, 2013). Original GitHub issue: https://github.com/retspen/webvirtmgr/issues/44 I love the webvirtmgr. For the users in my office that are die hard virt-manager users, is there a way to get the VNC to play nice across both? On a VM created from webvirtmgr, a console session opens flawlessly. From virt-manager, it asks for a password, but no password I've tried works. On a VM created from virt-manager, a console session opens and prompts for ssh credentials from webvirtmgr (which is fine if that's the only option) My issue is that I prefer to create the VMs in webvirtmgr, but thus far I'm not able to give console access to the virt-manager users. Is there a way to get them to play nice together? Thanks.
kerem closed this issue 2026-02-27 16:00:47 +03:00
Author
Owner

@ghost commented on GitHub (Mar 19, 2013):

In a dev folder, I downloaded the latest release and saw that there's a novnc option. I installed pre-requisits and started up the ./manage.py runserver option to test. I see the enable novnc option, but that wasn't working either. I was getting a connection error at the top of the VNC window "Server disconnected (code: 1006)"

I'm also getting a VNC password prompt when I revert back to the original set of files now. I never specified a VNC password, so I don't have console access via webvirtmgr at the moment.
Thanks.

<!-- gh-comment-id:15113175 --> @ghost commented on GitHub (Mar 19, 2013): In a dev folder, I downloaded the latest release and saw that there's a novnc option. I installed pre-requisits and started up the ./manage.py runserver option to test. I see the enable novnc option, but that wasn't working either. I was getting a connection error at the top of the VNC window "Server disconnected (code: 1006)" I'm also getting a VNC password prompt when I revert back to the original set of files now. I never specified a VNC password, so I don't have console access via webvirtmgr at the moment. Thanks.
Author
Owner

@retspen commented on GitHub (Mar 19, 2013):

For revert back vm setting, need edit vm xml:
$ virsh edit vm_name
and delete only: 'passwd=xxxxxxx'
xxxxx - your autogen password

<!-- gh-comment-id:15132419 --> @retspen commented on GitHub (Mar 19, 2013): For revert back vm setting, need edit vm xml: $ virsh edit vm_name and delete only: 'passwd=xxxxxxx' xxxxx - your autogen password
Author
Owner

@retspen commented on GitHub (Mar 19, 2013):

Reinstall and setup server for use latest version WebVirtMgr. README and setup docs changed.

<!-- gh-comment-id:15132794 --> @retspen commented on GitHub (Mar 19, 2013): Reinstall and setup server for use latest version WebVirtMgr. README and setup docs changed.
Author
Owner

@ghost commented on GitHub (Mar 19, 2013):

I don't see a passwd config in the xml.

Here's my output:
administrator@qp-kvm-ibm:/var/www/webvirtmgr$ virsh list | grep mchammer
12 mchammer running
administrator@qp-kvm-ibm:/var/www/webvirtmgr$ virsh dumpxml mchammer | grep
passwd
administrator@qp-kvm-ibm:/var/www/webvirtmgr$

On Tue, Mar 19, 2013 at 2:05 PM, Anatoliy Guskov
notifications@github.comwrote:

For revert back vm setting, need edit vm xml:
$ virsh edit vm_name
and delete only: 'passwd=xxxxxxx'
xxxxx - your autogen password


Reply to this email directly or view it on GitHubhttps://github.com/retspen/webvirtmgr/issues/44#issuecomment-15132419
.

<!-- gh-comment-id:15133048 --> @ghost commented on GitHub (Mar 19, 2013): I don't see a passwd config in the xml. Here's my output: administrator@qp-kvm-ibm:/var/www/webvirtmgr$ virsh list | grep mchammer 12 mchammer running administrator@qp-kvm-ibm:/var/www/webvirtmgr$ virsh dumpxml mchammer | grep passwd administrator@qp-kvm-ibm:/var/www/webvirtmgr$ On Tue, Mar 19, 2013 at 2:05 PM, Anatoliy Guskov notifications@github.comwrote: > For revert back vm setting, need edit vm xml: > $ virsh edit vm_name > and delete only: 'passwd=xxxxxxx' > xxxxx - your autogen password > > — > Reply to this email directly or view it on GitHubhttps://github.com/retspen/webvirtmgr/issues/44#issuecomment-15132419 > .
Author
Owner

@retspen commented on GitHub (Mar 19, 2013):

dumpxml not showing password line, use edit

<!-- gh-comment-id:15133464 --> @retspen commented on GitHub (Mar 19, 2013): dumpxml not showing password line, use edit
Author
Owner

@ghost commented on GitHub (Mar 19, 2013):

I used virsh edit the first time and didn't see it, I thought showing the
dumpxml would prove it.

I have the edit screen open on the VM and I don't see any line including
the text passwd. I even did a /passwd search in vi and didn't get any
matches.

On Tue, Mar 19, 2013 at 2:21 PM, Anatoliy Guskov
notifications@github.comwrote:

dumpxml not showing password line, use edit


Reply to this email directly or view it on GitHubhttps://github.com/retspen/webvirtmgr/issues/44#issuecomment-15133464
.

<!-- gh-comment-id:15134051 --> @ghost commented on GitHub (Mar 19, 2013): I used virsh edit the first time and didn't see it, I thought showing the dumpxml would prove it. I have the edit screen open on the VM and I don't see any line including the text passwd. I even did a /passwd search in vi and didn't get any matches. On Tue, Mar 19, 2013 at 2:21 PM, Anatoliy Guskov notifications@github.comwrote: > dumpxml not showing password line, use edit > > — > Reply to this email directly or view it on GitHubhttps://github.com/retspen/webvirtmgr/issues/44#issuecomment-15133464 > .
Author
Owner

@retspen commented on GitHub (Mar 19, 2013):

You click button "Enable noVNC" ?

<!-- gh-comment-id:15134354 --> @retspen commented on GitHub (Mar 19, 2013): You click button "Enable noVNC" ?
Author
Owner

@ghost commented on GitHub (Mar 19, 2013):

Yes, I clicked "Enable noVNC" and the buttone for "Enable noVNC" is no
longer available for that VM. But when I click on console, I get a window
with an error "Failed to connect to server (code: 1006)"

if I create a brand new VM, I DO see the passwd line in the virsh edit
screen and the console works fine on it.

On Tue, Mar 19, 2013 at 2:35 PM, Anatoliy Guskov
notifications@github.comwrote:

You click button "Enable noVNC" ?


Reply to this email directly or view it on GitHubhttps://github.com/retspen/webvirtmgr/issues/44#issuecomment-15134354
.

<!-- gh-comment-id:15135679 --> @ghost commented on GitHub (Mar 19, 2013): Yes, I clicked "Enable noVNC" and the buttone for "Enable noVNC" is no longer available for that VM. But when I click on console, I get a window with an error "Failed to connect to server (code: 1006)" if I create a brand new VM, I DO see the passwd line in the virsh edit screen and the console works fine on it. On Tue, Mar 19, 2013 at 2:35 PM, Anatoliy Guskov notifications@github.comwrote: > You click button "Enable noVNC" ? > > — > Reply to this email directly or view it on GitHubhttps://github.com/retspen/webvirtmgr/issues/44#issuecomment-15134354 > .
Author
Owner

@retspen commented on GitHub (Mar 19, 2013):

Fix this bug. Button "Enable noVNC" must showing when VM shutoff and created not in WebVirtMgr.

<!-- gh-comment-id:15136287 --> @retspen commented on GitHub (Mar 19, 2013): Fix this bug. Button "Enable noVNC" must showing when VM shutoff and created not in WebVirtMgr.
Author
Owner

@ghost commented on GitHub (Mar 26, 2013):

I updated this morning and ran the runserver option of ./manage.py.

Whenever I click the console button, I'm getting a new window with an instant error at the top: "Failed to connect to server (code: 1006)".

On the server side, I get the following output:
[26/Mar/2013 12:58:00] "POST /vm/1/Win2k8noGUI/ HTTP/1.1" 302 0
[26/Mar/2013 12:58:01] "GET /vm/1/Win2k8noGUI/ HTTP/1.1" 200 8788
sh: 1: kill: Usage: kill [-s sigspec | -signum | -sigspec] [pid | job]... or
kill -l [exitstatus]
WebSocket server settings:

  • Listen on :6080
  • Flash security policy server
  • No SSL/TLS support (no cert file)
  • Backgrounding (daemon)
    Traceback (most recent call last):
    File "/usr/bin/websockify", line 278, in
    server.start_server()
    File "/usr/lib/python2.7/dist-packages/novnc/websocket.py", line 760, in start_server
    lsock = self.socket(self.listen_host, self.listen_port)
    File "/usr/lib/python2.7/dist-packages/novnc/websocket.py", line 170, in socket
    sock.bind(addrs[0][4])
    File "/usr/lib/python2.7/socket.py", line 224, in meth
    return getattr(self._sock,name)(*args)
    socket.error: [Errno 98] Address already in use
    [26/Mar/2013 12:58:03] "GET /vnc/1/Win2k8noGUI/ HTTP/1.1" 200 4208
<!-- gh-comment-id:15452041 --> @ghost commented on GitHub (Mar 26, 2013): I updated this morning and ran the runserver option of ./manage.py. Whenever I click the console button, I'm getting a new window with an instant error at the top: "Failed to connect to server (code: 1006)". On the server side, I get the following output: [26/Mar/2013 12:58:00] "POST /vm/1/Win2k8noGUI/ HTTP/1.1" 302 0 [26/Mar/2013 12:58:01] "GET /vm/1/Win2k8noGUI/ HTTP/1.1" 200 8788 sh: 1: kill: Usage: kill [-s sigspec | -signum | -sigspec] [pid | job]... or kill -l [exitstatus] WebSocket server settings: - Listen on :6080 - Flash security policy server - No SSL/TLS support (no cert file) - Backgrounding (daemon) Traceback (most recent call last): File "/usr/bin/websockify", line 278, in <module> server.start_server() File "/usr/lib/python2.7/dist-packages/novnc/websocket.py", line 760, in start_server lsock = self.socket(self.listen_host, self.listen_port) File "/usr/lib/python2.7/dist-packages/novnc/websocket.py", line 170, in socket sock.bind(addrs[0][4]) File "/usr/lib/python2.7/socket.py", line 224, in meth return getattr(self._sock,name)(*args) socket.error: [Errno 98] Address already in use [26/Mar/2013 12:58:03] "GET /vnc/1/Win2k8noGUI/ HTTP/1.1" 200 4208
Author
Owner

@retspen commented on GitHub (Mar 26, 2013):

Ubuntu ???

<!-- gh-comment-id:15452152 --> @retspen commented on GitHub (Mar 26, 2013): Ubuntu ???
Author
Owner

@ghost commented on GitHub (Mar 26, 2013):

Correct. 12.04, all recent patches as of this morning. The box runs
nothing other than a base install using the tasksel option to install
SSH/Samba/LAMP/KVM and whatever is required for webvirtmgr & virt-manager.

On Tue, Mar 26, 2013 at 7:07 AM, Anatoliy Guskov
notifications@github.comwrote:

Ubuntu ???


Reply to this email directly or view it on GitHubhttps://github.com/retspen/webvirtmgr/issues/44#issuecomment-15452152
.

<!-- gh-comment-id:15452247 --> @ghost commented on GitHub (Mar 26, 2013): Correct. 12.04, all recent patches as of this morning. The box runs nothing other than a base install using the tasksel option to install SSH/Samba/LAMP/KVM and whatever is required for webvirtmgr & virt-manager. On Tue, Mar 26, 2013 at 7:07 AM, Anatoliy Guskov notifications@github.comwrote: > Ubuntu ??? > > — > Reply to this email directly or view it on GitHubhttps://github.com/retspen/webvirtmgr/issues/44#issuecomment-15452152 > .
Author
Owner

@retspen commented on GitHub (Mar 26, 2013):

$ sudo service novnc stop
$ sudo update-rc.d -f novnc remove

<!-- gh-comment-id:15452379 --> @retspen commented on GitHub (Mar 26, 2013): $ sudo service novnc stop $ sudo update-rc.d -f novnc remove
Author
Owner

@ghost commented on GitHub (Mar 26, 2013):

That's what it was. When I run it without the "-f" option, I get:

administrator@qp-kvm-ibm:~/webvirtmgrSandbox/webvirtmgr$ sudo update-rc.d
novnc remove
update-rc.d: /etc/init.d/novnc exists during rc.d purge (use -f to force)

But with the -f:
administrator@qp-kvm-ibm:~/webvirtmgrSandbox/webvirtmgr$ sudo update-rc.d
-f novnc remove
Removing any system startup links for /etc/init.d/novnc ...
/etc/rc0.d/K20novnc
/etc/rc1.d/K20novnc
/etc/rc2.d/S20novnc
/etc/rc3.d/S20novnc
/etc/rc4.d/S20novnc
/etc/rc5.d/S20novnc
/etc/rc6.d/K20novnc

and it all works!!!
Should the "-f" option be added to the instructions? Thanks!!!

On Tue, Mar 26, 2013 at 7:12 AM, Anatoliy Guskov
notifications@github.comwrote:

$ sudo service novnc stop
$ sudo update-rc.d -f novnc remove


Reply to this email directly or view it on GitHubhttps://github.com/retspen/webvirtmgr/issues/44#issuecomment-15452379
.

<!-- gh-comment-id:15452799 --> @ghost commented on GitHub (Mar 26, 2013): That's what it was. When I run it without the "-f" option, I get: administrator@qp-kvm-ibm:~/webvirtmgrSandbox/webvirtmgr$ sudo update-rc.d novnc remove update-rc.d: /etc/init.d/novnc exists during rc.d purge (use -f to force) But with the -f: administrator@qp-kvm-ibm:~/webvirtmgrSandbox/webvirtmgr$ sudo update-rc.d -f novnc remove Removing any system startup links for /etc/init.d/novnc ... /etc/rc0.d/K20novnc /etc/rc1.d/K20novnc /etc/rc2.d/S20novnc /etc/rc3.d/S20novnc /etc/rc4.d/S20novnc /etc/rc5.d/S20novnc /etc/rc6.d/K20novnc and it all works!!! Should the "-f" option be added to the instructions? Thanks!!! On Tue, Mar 26, 2013 at 7:12 AM, Anatoliy Guskov notifications@github.comwrote: > $ sudo service novnc stop > $ sudo update-rc.d -f novnc remove > > — > Reply to this email directly or view it on GitHubhttps://github.com/retspen/webvirtmgr/issues/44#issuecomment-15452379 > .
Author
Owner

@retspen commented on GitHub (Mar 26, 2013):

Ok. Fix it.

<!-- gh-comment-id:15452844 --> @retspen commented on GitHub (Mar 26, 2013): Ok. Fix it.
Author
Owner

@boozedog commented on GitHub (Mar 27, 2013):

I'm getting the same issue. Ubuntu 12.04 with all patches and latest webvirtmgr code.

Tried
$ sudo service novnc stop
$ sudo update-rc.d -f novnc remove

But still getting Server disconnected (code: 1006) when I click console.

<!-- gh-comment-id:15524760 --> @boozedog commented on GitHub (Mar 27, 2013): I'm getting the same issue. Ubuntu 12.04 with all patches and latest webvirtmgr code. Tried $ sudo service novnc stop $ sudo update-rc.d -f novnc remove But still getting Server disconnected (code: 1006) when I click console.
Author
Owner

@retspen commented on GitHub (Mar 28, 2013):

You have running processes ?
$ ps axf | grep websockify

<!-- gh-comment-id:15571635 --> @retspen commented on GitHub (Mar 28, 2013): You have running processes ? $ ps axf | grep websockify
Author
Owner

@boozedog commented on GitHub (Mar 28, 2013):

Yes:

david@ubuntu:~/images$ ps axf | grep websockify
6785 pts/1 S+ 0:00 _ grep --color=auto websockify
6781 ? S 0:00 python /usr/bin/websockify 6080 127.0.0.1:5900 -D

On Thu, Mar 28, 2013 at 3:14 AM, Anatoliy Guskov
notifications@github.comwrote:

You have running processes ?
$ ps axf | grep websockify


Reply to this email directly or view it on GitHubhttps://github.com/retspen/webvirtmgr/issues/44#issuecomment-15571635
.

<!-- gh-comment-id:15607621 --> @boozedog commented on GitHub (Mar 28, 2013): Yes: david@ubuntu:~/images$ ps axf | grep websockify 6785 pts/1 S+ 0:00 _ grep --color=auto websockify 6781 ? S 0:00 python /usr/bin/websockify 6080 127.0.0.1:5900 -D On Thu, Mar 28, 2013 at 3:14 AM, Anatoliy Guskov notifications@github.comwrote: > You have running processes ? > $ ps axf | grep websockify > > — > Reply to this email directly or view it on GitHubhttps://github.com/retspen/webvirtmgr/issues/44#issuecomment-15571635 > .
Author
Owner

@retspen commented on GitHub (Mar 28, 2013):

Can you connected to VNC (127.0.0.1:5900)?

<!-- gh-comment-id:15608172 --> @retspen commented on GitHub (Mar 28, 2013): Can you connected to VNC (127.0.0.1:5900)?
Author
Owner

@boozedog commented on GitHub (Mar 28, 2013):

Yes! When I connect to VNC I see the console of the guest OS.

<!-- gh-comment-id:15608860 --> @boozedog commented on GitHub (Mar 28, 2013): Yes! When I connect to VNC I see the console of the guest OS.
Author
Owner

@retspen commented on GitHub (Mar 28, 2013):

$ telnet 127.0.0.1 6080
Connected ?

<!-- gh-comment-id:15609108 --> @retspen commented on GitHub (Mar 28, 2013): $ telnet 127.0.0.1 6080 Connected ?
Author
Owner

@boozedog commented on GitHub (Mar 28, 2013):

Connects momentarily and then disconnects itself:

david@ubuntu:~/images$ telnet 127.0.0.1 6080
Trying 127.0.0.1...
Connected to 127.0.0.1.
Escape character is '^]'.
Connection closed by foreign host.

On Thu, Mar 28, 2013 at 3:25 PM, Anatoliy Guskov
notifications@github.comwrote:

$ telnet 127.0.0.1 6080
Connected ?


Reply to this email directly or view it on GitHubhttps://github.com/retspen/webvirtmgr/issues/44#issuecomment-15609108
.

<!-- gh-comment-id:15609386 --> @boozedog commented on GitHub (Mar 28, 2013): Connects momentarily and then disconnects itself: david@ubuntu:~/images$ telnet 127.0.0.1 6080 Trying 127.0.0.1... Connected to 127.0.0.1. Escape character is '^]'. Connection closed by foreign host. On Thu, Mar 28, 2013 at 3:25 PM, Anatoliy Guskov notifications@github.comwrote: > $ telnet 127.0.0.1 6080 > Connected ? > > — > Reply to this email directly or view it on GitHubhttps://github.com/retspen/webvirtmgr/issues/44#issuecomment-15609108 > .
Author
Owner

@retspen commented on GitHub (Mar 28, 2013):

  1. $ sudo killall websockify
  2. $ sudo websockify 5080 127.0.0.1:5900 -D
  3. $ telnet 127.0.0.1 5900 (or run web console)
<!-- gh-comment-id:15609750 --> @retspen commented on GitHub (Mar 28, 2013): 1. $ sudo killall websockify 2. $ sudo websockify 5080 127.0.0.1:5900 -D 3. $ telnet 127.0.0.1 5900 (or run web console)
Author
Owner

@boozedog commented on GitHub (Mar 28, 2013):

david@ubuntu:~/images$ ps axf | grep websockify
 6882 pts/1    S+     0:00              \_ grep --color=auto websockify
 6839 ?        S      0:00 python /usr/bin/websockify 6080 127.0.0.1:5900 -D
david@ubuntu:~/images$ sudo killall websockify
websockify: no process found
david@ubuntu:~/images$ sudo kill 6839
david@ubuntu:~/images$ ps axf | grep websockify
 6888 pts/1    S+     0:00              \_ grep --color=auto websockify
david@ubuntu:~/images$ sudo websockify 5080 127.0.0.1:5900 -D
WebSocket server settings:
  - Listen on :5080
  - Flash security policy server
  - No SSL/TLS support (no cert file)
  - Backgrounding (daemon)
david@ubuntu:~/images$ telnet 127.0.0.1 5900
Trying 127.0.0.1...
Connected to 127.0.0.1.
Escape character is '^]'.
RFB 003.008

Am now able to connect on telnet. Connection from VNC client also works. But when I run web console, I still get same Server disconnected (code: 1006) message.

<!-- gh-comment-id:15610075 --> @boozedog commented on GitHub (Mar 28, 2013): ``` david@ubuntu:~/images$ ps axf | grep websockify 6882 pts/1 S+ 0:00 \_ grep --color=auto websockify 6839 ? S 0:00 python /usr/bin/websockify 6080 127.0.0.1:5900 -D david@ubuntu:~/images$ sudo killall websockify websockify: no process found david@ubuntu:~/images$ sudo kill 6839 david@ubuntu:~/images$ ps axf | grep websockify 6888 pts/1 S+ 0:00 \_ grep --color=auto websockify david@ubuntu:~/images$ sudo websockify 5080 127.0.0.1:5900 -D WebSocket server settings: - Listen on :5080 - Flash security policy server - No SSL/TLS support (no cert file) - Backgrounding (daemon) david@ubuntu:~/images$ telnet 127.0.0.1 5900 Trying 127.0.0.1... Connected to 127.0.0.1. Escape character is '^]'. RFB 003.008 ``` Am now able to connect on telnet. Connection from VNC client also works. But when I run web console, I still get same `Server disconnected (code: 1006)` message.
Author
Owner

@retspen commented on GitHub (Mar 28, 2013):

Sorry,
$ sudo killall websockify
$ sudo websockify 6080 127.0.0.1:5900
$ telnet 127.0.0.1 6080

<!-- gh-comment-id:15610272 --> @retspen commented on GitHub (Mar 28, 2013): Sorry, $ sudo killall websockify $ sudo websockify 6080 127.0.0.1:5900 $ telnet 127.0.0.1 6080
Author
Owner

@boozedog commented on GitHub (Mar 28, 2013):

david@ubuntu:~/images$ websockify 6080 127.0.0.1:5900
WebSocket server settings:
  - Listen on :6080
  - Flash security policy server
  - No SSL/TLS support (no cert file)
  - proxying from :6080 to 127.0.0.1:5900

  1: 172.16.19.1: ignoring socket not ready
  2: 127.0.0.1: ignoring socket not ready

Still able to VNC to port 5900. Message 1 above is where I tried to connect using VNC client. Message 2 is when I used telnet 127.0.0.1 6080 .

<!-- gh-comment-id:15610683 --> @boozedog commented on GitHub (Mar 28, 2013): ``` david@ubuntu:~/images$ websockify 6080 127.0.0.1:5900 WebSocket server settings: - Listen on :6080 - Flash security policy server - No SSL/TLS support (no cert file) - proxying from :6080 to 127.0.0.1:5900 1: 172.16.19.1: ignoring socket not ready 2: 127.0.0.1: ignoring socket not ready ``` Still able to VNC to port 5900. Message 1 above is where I tried to connect using VNC client. Message 2 is when I used `telnet 127.0.0.1 6080` .
Author
Owner

@retspen commented on GitHub (Mar 28, 2013):

OpenStack users have same problem too. Maybe DNS can not resorv ip, add ip to hosts.
Try run:
$ websockify 127.0.0.1:6080 127.0.0.1:5900
OR
$ websockify 172.16.19.1:6080 127.0.0.1:5900

<!-- gh-comment-id:15613889 --> @retspen commented on GitHub (Mar 28, 2013): OpenStack users have same problem too. Maybe DNS can not resorv ip, add ip to hosts. Try run: $ websockify 127.0.0.1:6080 127.0.0.1:5900 OR $ websockify 172.16.19.1:6080 127.0.0.1:5900
Author
Owner

@boozedog commented on GitHub (Mar 28, 2013):

No joy.

One thing I notice when I check the JavaScript in the vnc web page --

        // By default, use the host and port of server that served this file
        host = '127.0.0.1';
        port = '6080'

Does that mean the web page is trying to connect to localhost (127.0.0.1) rather than the KVM server (172.16.19.138) ?

<!-- gh-comment-id:15616138 --> @boozedog commented on GitHub (Mar 28, 2013): No joy. One thing I notice when I check the JavaScript in the vnc web page -- ``` // By default, use the host and port of server that served this file host = '127.0.0.1'; port = '6080' ``` Does that mean the web page is trying to connect to localhost (127.0.0.1) rather than the KVM server (172.16.19.138) ?
Author
Owner

@retspen commented on GitHub (Mar 29, 2013):

Can you describe your network diagram? WebVirtMgr install on server where use KVM?

<!-- gh-comment-id:15630751 --> @retspen commented on GitHub (Mar 29, 2013): Can you describe your network diagram? WebVirtMgr install on server where use KVM?
Author
Owner

@boozedog commented on GitHub (Mar 29, 2013):

Yes both on same server.

On Mar 29, 2013, at 2:52, Anatoliy Guskov notifications@github.com wrote:

Can you describe your network diagram? WebVirtMgr install on server where
use KVM?


Reply to this email directly or view it on
GitHubhttps://github.com/retspen/webvirtmgr/issues/44#issuecomment-15630751
.

<!-- gh-comment-id:15636162 --> @boozedog commented on GitHub (Mar 29, 2013): Yes both on same server. On Mar 29, 2013, at 2:52, Anatoliy Guskov notifications@github.com wrote: Can you describe your network diagram? WebVirtMgr install on server where use KVM? — Reply to this email directly or view it on GitHubhttps://github.com/retspen/webvirtmgr/issues/44#issuecomment-15630751 .
Author
Owner

@retspen commented on GitHub (Mar 29, 2013):

When your run same problem?

$ websockify 6080 176.9.19.138:5900

<!-- gh-comment-id:15656587 --> @retspen commented on GitHub (Mar 29, 2013): When your run same problem? $ websockify 6080 176.9.19.138:5900
Author
Owner

@boozedog commented on GitHub (Mar 30, 2013):

I assume you mean websockify 6080 172.16.19.138:5900 ...

Looks like same problem when I try to connect using KVM client directly to port 6080:

david@ubuntu:~$ websockify 6080 172.16.19.138:5900
WebSocket server settings:
  - Listen on :6080
  - Flash security policy server
  - No SSL/TLS support (no cert file)
  - proxying from :6080 to 172.16.19.138:5900

 1: 172.16.19.1: ignoring socket not ready

When I try to connect using the web console, my websockify is killed and the daemon is started. And I'm still seeing Server disconnected (code: 1006) in my web browser.

Did you see my note above about the Javascript? It seems strange to me that Javascript (the client) would try to connect to 127.0.0.1 ...

<!-- gh-comment-id:15682127 --> @boozedog commented on GitHub (Mar 30, 2013): I assume you mean `websockify 6080 172.16.19.138:5900` ... Looks like same problem when I try to connect using KVM client directly to port 6080: ``` david@ubuntu:~$ websockify 6080 172.16.19.138:5900 WebSocket server settings: - Listen on :6080 - Flash security policy server - No SSL/TLS support (no cert file) - proxying from :6080 to 172.16.19.138:5900 1: 172.16.19.1: ignoring socket not ready ``` When I try to connect using the web console, my websockify is killed and the daemon is started. And I'm still seeing `Server disconnected (code: 1006)` in my web browser. Did you see my note above about the Javascript? It seems strange to me that Javascript (the client) would try to connect to 127.0.0.1 ...
Author
Owner

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

IP address is taken from dashboard page. What IP you input in dashboard page? Something is blocking creating socket on server.

<!-- gh-comment-id:15682276 --> @retspen commented on GitHub (Mar 30, 2013): IP address is taken from dashboard page. What IP you input in dashboard page? Something is blocking creating socket on server.
Author
Owner

@boozedog commented on GitHub (Mar 30, 2013):

Success! I had put 127.0.0.1 on the dashboard page. I changed that to the public IP of the server and now I can get console in the browser.

Thanks for all your help!

<!-- gh-comment-id:15682484 --> @boozedog commented on GitHub (Mar 30, 2013): Success! I had put 127.0.0.1 on the dashboard page. I changed that to the public IP of the server and now I can get console in the browser. Thanks for all your help!
Author
Owner

@Ulv3r commented on GitHub (Apr 18, 2013):

i've had a little issue with vnc connections... i follow all the procedures described here.. without success , but the leadme at the point of the connecting issue in webconsole is related to how kvm start the vnc's console... by default , parameter vnc_listen (in /etc/libvirt/qemu.conf) it's set only for listen at 127.0.0.1 and according to info posted here the ip is taken from the dashboard for it's the socksify process couldn't be avaible...

at my case also must i set this parameter as following

vnc_listen = "0.0.0.0"

and voilá

<!-- gh-comment-id:16584174 --> @Ulv3r commented on GitHub (Apr 18, 2013): i've had a little issue with vnc connections... i follow all the procedures described here.. without success , but the leadme at the point of the connecting issue in webconsole is related to how kvm start the vnc's console... by default , parameter vnc_listen (in /etc/libvirt/qemu.conf) it's set only for listen at 127.0.0.1 and according to info posted here the ip is taken from the dashboard for it's the socksify process couldn't be avaible... at my case also must i set this parameter as following vnc_listen = "0.0.0.0" and voilá
Author
Owner

@swatcat commented on GitHub (Jul 16, 2013):

Failed to connect the server: error code 1006 on redhat enterprise server. I removed "password = autogenerated password" but nothingg works for me.

<!-- gh-comment-id:21078129 --> @swatcat commented on GitHub (Jul 16, 2013): Failed to connect the server: error code 1006 on redhat enterprise server. I removed "password = autogenerated password" but nothingg works for me.
Author
Owner

@retspen commented on GitHub (Jul 17, 2013):

Port 59xx for VNC open ?

<!-- gh-comment-id:21096724 --> @retspen commented on GitHub (Jul 17, 2013): Port 59xx for VNC open ?
Author
Owner

@jaydeepch15 commented on GitHub (Feb 15, 2014):

My KVM and webvirtmgr is installed on same server (CentOS 6.5)

followed below link to install webvirtmgr
https://github.com/retspen/webvirtmgr/wiki/Install-WebVirtMgr

Getting same error
Failed to connect to server (code: 1006)

When I run
[root@kvm ~]# websockify 6080 10.10.8.107:5900
WebSocket server settings:

  • Listen on :6080
  • Flash security policy server
  • No SSL/TLS support (no cert file)
    Traceback (most recent call last):
    File "/usr/bin/websockify", line 9, in
    load_entry_point('websockify==0.4.1', 'console_scripts', 'websockify')()
    File "/usr/lib/python2.6/site-packages/websockify/websocketproxy.py", line 390, in websockify_init
    server.start_server()
    File "/usr/lib/python2.6/site-packages/websockify/websocket.py", line 834, in start_server
    lsock = self.socket(self.listen_host, self.listen_port, False, self.prefer_ipv6)
    File "/usr/lib/python2.6/site-packages/websockify/websocket.py", line 198, in socket
    sock.bind(addrs[0][4])
    File "", line 1, in bind
    socket.error: [Errno 98] Address already in use

Removed comment in /etc/libvirt/qemu.conf file, then restart libvirted service.
vnc_listen = "0.0.0.0"
&
remote_display_port_min = 5900
remote_display_port_max = 65535

FYI

I haven't created VM from Webvirtmgr, I had created it from backend

[root@kvm ~]# virt-install --connect qemu:///system -n vm10 -r 1024 --vcpus=2 --disk path=/var/lib/libvirt/images/vm10.img,size=12 -c /dev/sr0 --vnc --noautoconsole --os-type windows --os-variant win7 --accelerate --network=bridge:br0 --hvm

<!-- gh-comment-id:35158896 --> @jaydeepch15 commented on GitHub (Feb 15, 2014): My KVM and webvirtmgr is installed on same server (CentOS 6.5) followed below link to install webvirtmgr https://github.com/retspen/webvirtmgr/wiki/Install-WebVirtMgr Getting same error Failed to connect to server (code: 1006) When I run [root@kvm ~]# websockify 6080 10.10.8.107:5900 WebSocket server settings: - Listen on :6080 - Flash security policy server - No SSL/TLS support (no cert file) Traceback (most recent call last): File "/usr/bin/websockify", line 9, in <module> load_entry_point('websockify==0.4.1', 'console_scripts', 'websockify')() File "/usr/lib/python2.6/site-packages/websockify/websocketproxy.py", line 390, in websockify_init server.start_server() File "/usr/lib/python2.6/site-packages/websockify/websocket.py", line 834, in start_server lsock = self.socket(self.listen_host, self.listen_port, False, self.prefer_ipv6) File "/usr/lib/python2.6/site-packages/websockify/websocket.py", line 198, in socket sock.bind(addrs[0][4]) File "<string>", line 1, in bind socket.error: [Errno 98] Address already in use Removed comment in /etc/libvirt/qemu.conf file, then restart libvirted service. vnc_listen = "0.0.0.0" & remote_display_port_min = 5900 remote_display_port_max = 65535 FYI I haven't created VM from Webvirtmgr, I had created it from backend [root@kvm ~]# virt-install --connect qemu:///system -n vm10 -r 1024 --vcpus=2 --disk path=/var/lib/libvirt/images/vm10.img,size=12 -c /dev/sr0 --vnc --noautoconsole --os-type windows --os-variant win7 --accelerate --network=bridge:br0 --hvm
Author
Owner

@wmariuss commented on GitHub (Dec 1, 2014):

I have the same issue running over https. Server disconnected (code: 1006)

<!-- gh-comment-id:65130080 --> @wmariuss commented on GitHub (Dec 1, 2014): I have the same issue running over https. Server disconnected (code: 1006)
Author
Owner

@ghost commented on GitHub (May 9, 2015):

I have the same problem when running over https.
Server disconnected (code: 1006)

<!-- gh-comment-id:100435617 --> @ghost commented on GitHub (May 9, 2015): I have the same problem when running over https. Server disconnected (code: 1006)
Author
Owner

@howels commented on GitHub (Aug 16, 2015):

Same issue running over HTTPS, main site works but console connects are messed up. Interestingly I also get a timeout when I try to access console connections via DNS instead of the direct IP.

<!-- gh-comment-id:131639116 --> @howels commented on GitHub (Aug 16, 2015): Same issue running over HTTPS, main site works but console connects are messed up. Interestingly I also get a timeout when I try to access console connections via DNS instead of the direct IP.
Author
Owner

@lord-kyron commented on GitHub (May 10, 2018):

Hello all,
I know this project is long forgotten, but I am experiencing the same issue like @howels.
Over HTTPS everything else is working, except the noVNC. I have a domain name and when I try to access the system over the domain name, the noVNC is timing out. It is working when I use the IPaddress:port. I am using the WebVirtCloud project now, but the issue is the same and persists there too. Did any one of you found a solution to this?

<!-- gh-comment-id:387969577 --> @lord-kyron commented on GitHub (May 10, 2018): Hello all, I know this project is long forgotten, but I am experiencing the same issue like @howels. Over HTTPS everything else is working, except the noVNC. I have a domain name and when I try to access the system over the domain name, the noVNC is timing out. It is working when I use the IPaddress:port. I am using the WebVirtCloud project now, but the issue is the same and persists there too. Did any one of you found a solution to this?
Author
Owner

@ghost commented on GitHub (May 10, 2018):

Hello @Bandic007
I am using over https with let's encrypt and everything working fine. My settings.py was changed to support https. Could you please share your settings.py?

Thanks.

<!-- gh-comment-id:388157837 --> @ghost commented on GitHub (May 10, 2018): Hello @Bandic007 I am using over https with let's encrypt and everything working fine. My settings.py was changed to support https. Could you please share your settings.py? Thanks.
Author
Owner

@lord-kyron commented on GitHub (May 10, 2018):

I was not able to find info how to properly setup setup noVNC to use SSL.
Can you share me your settings.py file and explain me in brief what and where did you done and changed (if there are other files that needs additional changes) so that I can set it up and test?

Just FYI - I am using CloudFlare and the SSL certificate is not local on the host, but it is the cloudflare ssl that I am using. My setup is more specific and I don't know if it can work like that, but anyway - please, explain to me so that I can move to LetsEncrypt eventually in order to use the VNC over SSL!

Thank you very much!

<!-- gh-comment-id:388166828 --> @lord-kyron commented on GitHub (May 10, 2018): I was not able to find info how to properly setup setup noVNC to use SSL. Can you share me your settings.py file and explain me in brief what and where did you done and changed (if there are other files that needs additional changes) so that I can set it up and test? Just FYI - I am using CloudFlare and the SSL certificate is not local on the host, but it is the cloudflare ssl that I am using. My setup is more specific and I don't know if it can work like that, but anyway - please, explain to me so that I can move to LetsEncrypt eventually in order to use the VNC over SSL! Thank you very much!
Author
Owner

@ghost commented on GitHub (May 10, 2018):

Hi @Bandic007

See mey settings.py with the certificate. My certificate file is stored at the same server that I am running webvirtcloud.

WebVirtCloud settings

Wobsock port

WS_PORT = 6080

Websock host

WS_HOST = "panel.yourdomain.com"

Websock public port

WS_PUBLIC_HOST = "panel.yourdomain.com"

Websock SSL connection

#WS_CERT = "/etc/ssl/certificate.pem"
WS_CERT = "/etc/letsencrypt/live/panel.yourdomain.com/fullchain.pem"

<!-- gh-comment-id:388182055 --> @ghost commented on GitHub (May 10, 2018): Hi @Bandic007 See mey settings.py with the certificate. My certificate file is stored at the same server that I am running webvirtcloud. # WebVirtCloud settings # Wobsock port WS_PORT = 6080 # Websock host WS_HOST = "panel.yourdomain.com" # Websock public port WS_PUBLIC_HOST = "panel.yourdomain.com" # Websock SSL connection #WS_CERT = "/etc/ssl/certificate.pem" WS_CERT = "/etc/letsencrypt/live/panel.yourdomain.com/fullchain.pem"
Author
Owner

@lord-kyron commented on GitHub (May 15, 2018):

I see but I am using CloudFlare and my SSL certificate is not locally stored on the host, but it is being offloaded on cloudfalre portal. I am using their share SSL cert... Maybe this is my problem?

<!-- gh-comment-id:389074397 --> @lord-kyron commented on GitHub (May 15, 2018): I see but I am using CloudFlare and my SSL certificate is not locally stored on the host, but it is being offloaded on cloudfalre portal. I am using their share SSL cert... Maybe this is my problem?
Author
Owner

@multfaciladm commented on GitHub (May 15, 2018):

for sure it is your problem. The settings.py is looking for the cert locally.

<!-- gh-comment-id:389171254 --> @multfaciladm commented on GitHub (May 15, 2018): for sure it is your problem. The settings.py is looking for the cert locally.
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#34
No description provided.