[GH-ISSUE #180] webvirtmgr-novnc: [Errno 111] Connection refused #140

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

Originally created by @drakulavich on GitHub (Dec 23, 2013).
Original GitHub issue: https://github.com/retspen/webvirtmgr/issues/180

Pre-conditions:
RHEL 6.5 with webvirtmgr and novnc package.
KVM host on RHEL 6.4 (192.168.116.194), vnc_listen is enabled in /etc/libvirt/qemu.conf.

How to reproduce the problem:

  • Run webvirtmgr-novnc script and try to open VM console:
python /var/www/webvirtmgr/console/webvirtmgr-novnc
WebSocket server settings:
  - Listen on 0.0.0.0:6080
  - Flash security policy server
  - No SSL/TLS support (no cert file)
  - proxying from 0.0.0.0:6080 to ignore:ignore

  1: 192.168.117.163: Plain non-SSL (ws://) WebSocket connection
  1: 192.168.117.163: Version hybi-13, base64: 'False'
  1: connecting to: 192.168.116.194:5900
  1: handler exception: [Errno 111] Connection refused

Could you explain, please, is it a bug or broken configuration?

Originally created by @drakulavich on GitHub (Dec 23, 2013). Original GitHub issue: https://github.com/retspen/webvirtmgr/issues/180 Pre-conditions: RHEL 6.5 with webvirtmgr and novnc package. KVM host on RHEL 6.4 (192.168.116.194), vnc_listen is enabled in /etc/libvirt/qemu.conf. How to reproduce the problem: - Run webvirtmgr-novnc script and try to open VM console: ``` python /var/www/webvirtmgr/console/webvirtmgr-novnc WebSocket server settings: - Listen on 0.0.0.0:6080 - Flash security policy server - No SSL/TLS support (no cert file) - proxying from 0.0.0.0:6080 to ignore:ignore 1: 192.168.117.163: Plain non-SSL (ws://) WebSocket connection 1: 192.168.117.163: Version hybi-13, base64: 'False' 1: connecting to: 192.168.116.194:5900 1: handler exception: [Errno 111] Connection refused ``` Could you explain, please, is it a bug or broken configuration?
kerem closed this issue 2026-02-27 16:38:06 +03:00
Author
Owner

@k3oni commented on GitHub (Dec 23, 2013):

/etc/init.d/webvirtmgr-novnc start

<!-- gh-comment-id:31129649 --> @k3oni commented on GitHub (Dec 23, 2013): /etc/init.d/webvirtmgr-novnc start
Author
Owner

@retspen commented on GitHub (Dec 23, 2013):

Use https ?

<!-- gh-comment-id:31131802 --> @retspen commented on GitHub (Dec 23, 2013): Use https ?
Author
Owner

@drakulavich commented on GitHub (Dec 24, 2013):

@retspen
No, Apache config grabbed from wiki, no https.

I see another error on client side:

Failed to connect to server (code: 1006)
<!-- gh-comment-id:31159637 --> @drakulavich commented on GitHub (Dec 24, 2013): @retspen No, Apache config grabbed from wiki, no https. I see another error on client side: ``` Failed to connect to server (code: 1006) ```
Author
Owner

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

Connected ?

$ telnet x.x.x.x 5900

<!-- gh-comment-id:31160164 --> @retspen commented on GitHub (Dec 24, 2013): Connected ? $ telnet x.x.x.x 5900
Author
Owner

@drakulavich commented on GitHub (Dec 24, 2013):

Yes, I could connect 5900 and 6080 via telnet.

<!-- gh-comment-id:31160288 --> @drakulavich commented on GitHub (Dec 24, 2013): Yes, I could connect 5900 and 6080 via telnet.
Author
Owner

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

Are you have vncviewer, can you connect via vncviewer to port 5900 ?

<!-- gh-comment-id:31160588 --> @retspen commented on GitHub (Dec 24, 2013): Are you have vncviewer, can you connect via vncviewer to port 5900 ?
Author
Owner

@drakulavich commented on GitHub (Dec 24, 2013):

Sorry, I found my mistake.
VNC port for KVM host is 5901. If I run:

websockify 6080 192.168.116.45:5901

I could open VNC session via browser.

Is there a place to change port number for each server on webvirtmgr side?

<!-- gh-comment-id:31161436 --> @drakulavich commented on GitHub (Dec 24, 2013): Sorry, I found my mistake. VNC port for KVM host is 5901. If I run: ``` websockify 6080 192.168.116.45:5901 ``` I could open VNC session via browser. Is there a place to change port number for each server on webvirtmgr side?
Author
Owner

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

You can set port in instance xml manual but webvirtmgr get port from libvirt auto. Hover mouse on button Console and you can see instance VNC port.

<!-- gh-comment-id:31161726 --> @retspen commented on GitHub (Dec 24, 2013): You can set port in instance xml manual but webvirtmgr get port from libvirt auto. Hover mouse on button Console and you can see instance VNC port.
Author
Owner

@drakulavich commented on GitHub (Dec 24, 2013):

Thanks for help.

I understood why VNC was not working with VMs. It seems like vnc_listen in /etc/libvirt/qemu.conf does't enable listening for external IP addresses.
I've added listen='0.0.0.0' to the graphics section of VM's config. It works after that.

<!-- gh-comment-id:31163713 --> @drakulavich commented on GitHub (Dec 24, 2013): Thanks for help. I understood why VNC was not working with VMs. It seems like `vnc_listen` in /etc/libvirt/qemu.conf does't enable listening for external IP addresses. I've added `listen='0.0.0.0'` to the `graphics` section of VM's config. It works after that.
Author
Owner

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

If VM create before you change section "vnc_listen" in file /etc/libvirt/qemu.conf all vm not response to public interface. In next time try simple test:

$ netstat -ant | grep 590

Any time!

<!-- gh-comment-id:31163943 --> @retspen commented on GitHub (Dec 24, 2013): If VM create before you change section "vnc_listen" in file /etc/libvirt/qemu.conf all vm not response to public interface. In next time try simple test: $ netstat -ant | grep 590 Any time!
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#140
No description provided.