Discussion:
[one-users] noVNC Error - unable to establish VNC connection
Carlos Jiménez
2012-08-21 12:57:22 UTC
Permalink
Hi guys,

I've just installed OpenNebula 3.6 on a computer running CentOS 6.2
acting as a frontend. Also, I have 2 additional computers running CentOS
6.2 acting as a host with qemu-kvm installed. Sunstone is properly working.
The problem is that after configuring a template for a new VM, when I
create the VM, the status appears to be RUNNING but I can't connect via
VNC to the VM.

In the template I've configured:
GRAPHICS=[
LISTEN="0.0.0.0",
TYPE="vnc" ]

I've tried to follow the vnc_troubleshooting guide for solving this
issue, but I guess I've missed something important. These are the results:
I think novnc is properly installed and sunstone-server.conf contains
the right websockify path.
It's installed python 2.6.
When I try to launch VNC via sunstone web it appears another window with
this output: "Failed to connect to server (code: 1006)", so I have no
other choice than closing it.

Examining sunstone-server.log, this is the relevant output for the
previous action:
Tue Aug 21 14:25:59 2012 [I]: Starting vnc proxy:
/usr/share/one/noVNC/utils/websockify 35781 Host1:5905
Tue Aug 21 14:25:59 2012 [I]: 192.168.101.119 - - [21/Aug/2012 14:25:59]
"POST /vm/5/startvnc HTTP/1.1" 200 30 0.1033
Tue Aug 21 14:26:04 2012 [I]: 192.168.101.119 - - [21/Aug/2012 14:26:04]
"GET /group?timeout=true HTTP/1.1" 200 585 0.0739
Tue Aug 21 14:26:08 2012 [I]: 192.168.101.119 - - [21/Aug/2012 14:26:08]
"GET /host?timeout=true HTTP/1.1" 200 2362 0.0139
Tue Aug 21 14:26:08 2012 [I]: 192.168.101.119 - - [21/Aug/2012 14:26:08]
"POST /vm/5/stopvnc HTTP/1.1" 200 - 0.0623

Once I've checked that no websockify was running on the server and port
35781 was unused, I've manually launched novnc on the frontend executing
"/usr/share/one/noVNC/utils/websockify -v 35781 Host1:5905"
This is the output:
WARNING: no 'numpy' module, HyBi protocol is slower or disabled
WebSocket server settings:
- Listen on :35781
- Flash security policy server
- No SSL/TLS support (no cert file)
- proxying from :35781 to Host1:5905

Then, I try to establish a VNC connection from my PC using a VNC client
(vinagre) against the frontend specifying the listening port (35781). It
appears to connect, but a few seconds later it disconnects. This is the
output from the frontend (novnc manually launched):
1: 192.168.101.119: new handler Process
1: 192.168.101.119: ignoring socket not ready

I've tried the same from the frontend itself (against the localhost).
This is the output:
2: 127.0.0.1: new handler Process
2: 127.0.0.1: ignoring socket not ready

The same test but using Firefox from my computer:
3: 192.168.101.119: Normal web request received but disallowed


Finally, with novnc manually launched and listening on the frontend, I
tried to connect via VNC to the VM, using sunstone web GUI. It appeared
the same window stating "Failed to connect to server (code: 1006)".
Also, this is the output on the command line:
4: 192.168.101.119: new handler Process
4: 192.168.101.119: Plain non-SSL (ws://) WebSocket connection
4: 192.168.101.119: Version hybi-13, base64: 'True'
4: connecting to: Host1:5905
4: handler exception: [Errno 113] No route to host
4: Traceback (most recent call last):
File "/usr/share/one/noVNC/utils/websocket.py", line 767, in
top_new_client
self.new_client()
File "/usr/share/one/noVNC/utils/websockify", line 145, in new_client
connect=True)
File "/usr/share/one/noVNC/utils/websocket.py", line 187, in socket
sock.connect(addrs[0][4])
File "<string>", line 1, in connect
error: [Errno 113] No route to host

I can connect via ssh from the frontend to both hosts (host1 and host2)
without having to introduce password. Hostnames are properly resolved to
IP addresses.

Please, could anybody help me with this issue?


Thanks in advance.

Carlos.
Hector Sanjuan
2012-08-21 14:10:10 UTC
Permalink
Hello,
Post by Carlos Jiménez
Then, I try to establish a VNC connection from my PC using a VNC client
(vinagre)..
1: 192.168.101.119: ignoring socket not ready
...
2: 127.0.0.1: ignoring socket not ready
3: 192.168.101.119: Normal web request received but disallowed
This is because you are connecting to websockify with a normal VNC client,
not with a websockets client as expected. You can try to see if you can
use vinagre to connect directly to Host1:5905 in first place, to assure
that the VM VNC is responding.
Post by Carlos Jiménez
4: connecting to: Host1:5905
4: handler exception: [Errno 113] No route to host
Do you have a firewall or some other mechanism that might prevent that
Host1 is reachable from the frontend? Perhaps you can try launching
websockify with Host1 IP directly, to see if its a name resolve issue in
the end...
--
Hector Sanjuan
OpenNebula Developer
Carlos Jiménez
2012-08-22 08:28:31 UTC
Permalink
Hi Hector,

You were right. It was the firewall on Host1 (iptables) configured to
accept only by default incoming ICMP and SSH traffic. I thought I had
configured iptables on both hosts but I just did it on Host2.
Now, I clic VNC icon on Sunstone web and it successfully connects to the VM.


Thank you very much.

Carlos.
Post by Hector Sanjuan
Hello,
Post by Carlos Jiménez
Then, I try to establish a VNC connection from my PC using a VNC
client (vinagre)..
1: 192.168.101.119: ignoring socket not ready
...
2: 127.0.0.1: ignoring socket not ready
3: 192.168.101.119: Normal web request received but disallowed
This is because you are connecting to websockify with a normal VNC
client, not with a websockets client as expected. You can try to see
if you can use vinagre to connect directly to Host1:5905 in first
place, to assure that the VM VNC is responding.
Post by Carlos Jiménez
4: connecting to: Host1:5905
4: handler exception: [Errno 113] No route to host
Do you have a firewall or some other mechanism that might prevent that
Host1 is reachable from the frontend? Perhaps you can try launching
websockify with Host1 IP directly, to see if its a name resolve issue
in the end...
Carlos Jiménez
2012-08-22 08:28:31 UTC
Permalink
Hi Hector,

You were right. It was the firewall on Host1 (iptables) configured to
accept only by default incoming ICMP and SSH traffic. I thought I had
configured iptables on both hosts but I just did it on Host2.
Now, I clic VNC icon on Sunstone web and it successfully connects to the VM.


Thank you very much.

Carlos.
Post by Hector Sanjuan
Hello,
Post by Carlos Jiménez
Then, I try to establish a VNC connection from my PC using a VNC
client (vinagre)..
1: 192.168.101.119: ignoring socket not ready
...
2: 127.0.0.1: ignoring socket not ready
3: 192.168.101.119: Normal web request received but disallowed
This is because you are connecting to websockify with a normal VNC
client, not with a websockets client as expected. You can try to see
if you can use vinagre to connect directly to Host1:5905 in first
place, to assure that the VM VNC is responding.
Post by Carlos Jiménez
4: connecting to: Host1:5905
4: handler exception: [Errno 113] No route to host
Do you have a firewall or some other mechanism that might prevent that
Host1 is reachable from the frontend? Perhaps you can try launching
websockify with Host1 IP directly, to see if its a name resolve issue
in the end...
Carlos Jiménez
2012-08-22 08:28:31 UTC
Permalink
Hi Hector,

You were right. It was the firewall on Host1 (iptables) configured to
accept only by default incoming ICMP and SSH traffic. I thought I had
configured iptables on both hosts but I just did it on Host2.
Now, I clic VNC icon on Sunstone web and it successfully connects to the VM.


Thank you very much.

Carlos.
Post by Hector Sanjuan
Hello,
Post by Carlos Jiménez
Then, I try to establish a VNC connection from my PC using a VNC
client (vinagre)..
1: 192.168.101.119: ignoring socket not ready
...
2: 127.0.0.1: ignoring socket not ready
3: 192.168.101.119: Normal web request received but disallowed
This is because you are connecting to websockify with a normal VNC
client, not with a websockets client as expected. You can try to see
if you can use vinagre to connect directly to Host1:5905 in first
place, to assure that the VM VNC is responding.
Post by Carlos Jiménez
4: connecting to: Host1:5905
4: handler exception: [Errno 113] No route to host
Do you have a firewall or some other mechanism that might prevent that
Host1 is reachable from the frontend? Perhaps you can try launching
websockify with Host1 IP directly, to see if its a name resolve issue
in the end...
Carlos Jiménez
2012-08-21 12:57:22 UTC
Permalink
Hi guys,

I've just installed OpenNebula 3.6 on a computer running CentOS 6.2
acting as a frontend. Also, I have 2 additional computers running CentOS
6.2 acting as a host with qemu-kvm installed. Sunstone is properly working.
The problem is that after configuring a template for a new VM, when I
create the VM, the status appears to be RUNNING but I can't connect via
VNC to the VM.

In the template I've configured:
GRAPHICS=[
LISTEN="0.0.0.0",
TYPE="vnc" ]

I've tried to follow the vnc_troubleshooting guide for solving this
issue, but I guess I've missed something important. These are the results:
I think novnc is properly installed and sunstone-server.conf contains
the right websockify path.
It's installed python 2.6.
When I try to launch VNC via sunstone web it appears another window with
this output: "Failed to connect to server (code: 1006)", so I have no
other choice than closing it.

Examining sunstone-server.log, this is the relevant output for the
previous action:
Tue Aug 21 14:25:59 2012 [I]: Starting vnc proxy:
/usr/share/one/noVNC/utils/websockify 35781 Host1:5905
Tue Aug 21 14:25:59 2012 [I]: 192.168.101.119 - - [21/Aug/2012 14:25:59]
"POST /vm/5/startvnc HTTP/1.1" 200 30 0.1033
Tue Aug 21 14:26:04 2012 [I]: 192.168.101.119 - - [21/Aug/2012 14:26:04]
"GET /group?timeout=true HTTP/1.1" 200 585 0.0739
Tue Aug 21 14:26:08 2012 [I]: 192.168.101.119 - - [21/Aug/2012 14:26:08]
"GET /host?timeout=true HTTP/1.1" 200 2362 0.0139
Tue Aug 21 14:26:08 2012 [I]: 192.168.101.119 - - [21/Aug/2012 14:26:08]
"POST /vm/5/stopvnc HTTP/1.1" 200 - 0.0623

Once I've checked that no websockify was running on the server and port
35781 was unused, I've manually launched novnc on the frontend executing
"/usr/share/one/noVNC/utils/websockify -v 35781 Host1:5905"
This is the output:
WARNING: no 'numpy' module, HyBi protocol is slower or disabled
WebSocket server settings:
- Listen on :35781
- Flash security policy server
- No SSL/TLS support (no cert file)
- proxying from :35781 to Host1:5905

Then, I try to establish a VNC connection from my PC using a VNC client
(vinagre) against the frontend specifying the listening port (35781). It
appears to connect, but a few seconds later it disconnects. This is the
output from the frontend (novnc manually launched):
1: 192.168.101.119: new handler Process
1: 192.168.101.119: ignoring socket not ready

I've tried the same from the frontend itself (against the localhost).
This is the output:
2: 127.0.0.1: new handler Process
2: 127.0.0.1: ignoring socket not ready

The same test but using Firefox from my computer:
3: 192.168.101.119: Normal web request received but disallowed


Finally, with novnc manually launched and listening on the frontend, I
tried to connect via VNC to the VM, using sunstone web GUI. It appeared
the same window stating "Failed to connect to server (code: 1006)".
Also, this is the output on the command line:
4: 192.168.101.119: new handler Process
4: 192.168.101.119: Plain non-SSL (ws://) WebSocket connection
4: 192.168.101.119: Version hybi-13, base64: 'True'
4: connecting to: Host1:5905
4: handler exception: [Errno 113] No route to host
4: Traceback (most recent call last):
File "/usr/share/one/noVNC/utils/websocket.py", line 767, in
top_new_client
self.new_client()
File "/usr/share/one/noVNC/utils/websockify", line 145, in new_client
connect=True)
File "/usr/share/one/noVNC/utils/websocket.py", line 187, in socket
sock.connect(addrs[0][4])
File "<string>", line 1, in connect
error: [Errno 113] No route to host

I can connect via ssh from the frontend to both hosts (host1 and host2)
without having to introduce password. Hostnames are properly resolved to
IP addresses.

Please, could anybody help me with this issue?


Thanks in advance.

Carlos.
Hector Sanjuan
2012-08-21 14:10:10 UTC
Permalink
Hello,
Post by Carlos Jiménez
Then, I try to establish a VNC connection from my PC using a VNC client
(vinagre)..
1: 192.168.101.119: ignoring socket not ready
...
2: 127.0.0.1: ignoring socket not ready
3: 192.168.101.119: Normal web request received but disallowed
This is because you are connecting to websockify with a normal VNC client,
not with a websockets client as expected. You can try to see if you can
use vinagre to connect directly to Host1:5905 in first place, to assure
that the VM VNC is responding.
Post by Carlos Jiménez
4: connecting to: Host1:5905
4: handler exception: [Errno 113] No route to host
Do you have a firewall or some other mechanism that might prevent that
Host1 is reachable from the frontend? Perhaps you can try launching
websockify with Host1 IP directly, to see if its a name resolve issue in
the end...
--
Hector Sanjuan
OpenNebula Developer
Carlos Jiménez
2012-08-21 12:57:22 UTC
Permalink
Hi guys,

I've just installed OpenNebula 3.6 on a computer running CentOS 6.2
acting as a frontend. Also, I have 2 additional computers running CentOS
6.2 acting as a host with qemu-kvm installed. Sunstone is properly working.
The problem is that after configuring a template for a new VM, when I
create the VM, the status appears to be RUNNING but I can't connect via
VNC to the VM.

In the template I've configured:
GRAPHICS=[
LISTEN="0.0.0.0",
TYPE="vnc" ]

I've tried to follow the vnc_troubleshooting guide for solving this
issue, but I guess I've missed something important. These are the results:
I think novnc is properly installed and sunstone-server.conf contains
the right websockify path.
It's installed python 2.6.
When I try to launch VNC via sunstone web it appears another window with
this output: "Failed to connect to server (code: 1006)", so I have no
other choice than closing it.

Examining sunstone-server.log, this is the relevant output for the
previous action:
Tue Aug 21 14:25:59 2012 [I]: Starting vnc proxy:
/usr/share/one/noVNC/utils/websockify 35781 Host1:5905
Tue Aug 21 14:25:59 2012 [I]: 192.168.101.119 - - [21/Aug/2012 14:25:59]
"POST /vm/5/startvnc HTTP/1.1" 200 30 0.1033
Tue Aug 21 14:26:04 2012 [I]: 192.168.101.119 - - [21/Aug/2012 14:26:04]
"GET /group?timeout=true HTTP/1.1" 200 585 0.0739
Tue Aug 21 14:26:08 2012 [I]: 192.168.101.119 - - [21/Aug/2012 14:26:08]
"GET /host?timeout=true HTTP/1.1" 200 2362 0.0139
Tue Aug 21 14:26:08 2012 [I]: 192.168.101.119 - - [21/Aug/2012 14:26:08]
"POST /vm/5/stopvnc HTTP/1.1" 200 - 0.0623

Once I've checked that no websockify was running on the server and port
35781 was unused, I've manually launched novnc on the frontend executing
"/usr/share/one/noVNC/utils/websockify -v 35781 Host1:5905"
This is the output:
WARNING: no 'numpy' module, HyBi protocol is slower or disabled
WebSocket server settings:
- Listen on :35781
- Flash security policy server
- No SSL/TLS support (no cert file)
- proxying from :35781 to Host1:5905

Then, I try to establish a VNC connection from my PC using a VNC client
(vinagre) against the frontend specifying the listening port (35781). It
appears to connect, but a few seconds later it disconnects. This is the
output from the frontend (novnc manually launched):
1: 192.168.101.119: new handler Process
1: 192.168.101.119: ignoring socket not ready

I've tried the same from the frontend itself (against the localhost).
This is the output:
2: 127.0.0.1: new handler Process
2: 127.0.0.1: ignoring socket not ready

The same test but using Firefox from my computer:
3: 192.168.101.119: Normal web request received but disallowed


Finally, with novnc manually launched and listening on the frontend, I
tried to connect via VNC to the VM, using sunstone web GUI. It appeared
the same window stating "Failed to connect to server (code: 1006)".
Also, this is the output on the command line:
4: 192.168.101.119: new handler Process
4: 192.168.101.119: Plain non-SSL (ws://) WebSocket connection
4: 192.168.101.119: Version hybi-13, base64: 'True'
4: connecting to: Host1:5905
4: handler exception: [Errno 113] No route to host
4: Traceback (most recent call last):
File "/usr/share/one/noVNC/utils/websocket.py", line 767, in
top_new_client
self.new_client()
File "/usr/share/one/noVNC/utils/websockify", line 145, in new_client
connect=True)
File "/usr/share/one/noVNC/utils/websocket.py", line 187, in socket
sock.connect(addrs[0][4])
File "<string>", line 1, in connect
error: [Errno 113] No route to host

I can connect via ssh from the frontend to both hosts (host1 and host2)
without having to introduce password. Hostnames are properly resolved to
IP addresses.

Please, could anybody help me with this issue?


Thanks in advance.

Carlos.
Hector Sanjuan
2012-08-21 14:10:10 UTC
Permalink
Hello,
Post by Carlos Jiménez
Then, I try to establish a VNC connection from my PC using a VNC client
(vinagre)..
1: 192.168.101.119: ignoring socket not ready
...
2: 127.0.0.1: ignoring socket not ready
3: 192.168.101.119: Normal web request received but disallowed
This is because you are connecting to websockify with a normal VNC client,
not with a websockets client as expected. You can try to see if you can
use vinagre to connect directly to Host1:5905 in first place, to assure
that the VM VNC is responding.
Post by Carlos Jiménez
4: connecting to: Host1:5905
4: handler exception: [Errno 113] No route to host
Do you have a firewall or some other mechanism that might prevent that
Host1 is reachable from the frontend? Perhaps you can try launching
websockify with Host1 IP directly, to see if its a name resolve issue in
the end...
--
Hector Sanjuan
OpenNebula Developer
Loading...