Ask Your Question
4

VNC Console in Dashboard fails to connect ot server (code: 1006) [closed]

asked 2013-04-24 10:37:17 -0600

this post is marked as community wiki

This post is a wiki. Anyone with karma >75 is welcome to improve it.

I followed the instructions to setup a multiple node Openstack Grizzly multiple node.Now the only thing doesnt work is the vnc on the browser I get error:

 Failed to connect to server (code: 1006)

I have tried different browser and safari too. My controller ip is 192.168.2.231 and ext 192.168.221.231, both controller and compute /etc/nova/nova.conf have :

novnc_enabled=true
novncproxy_base_url=http://192.168.221.231:6080/vnc_auto.html
novncproxy_port=6080
vncserver_proxyclient_address=192.168.2.231
vncserver_listen=0.0.0.0

all services are fine , nova and quantum ...only get problem on nova-novncproxy that is running but :

 cat /var/log/upstart/nova-novncproxy.log
WebSocket server settings:
  - Listen on 0.0.0.0:6080
  - Flash security policy server
  - Web server. Web root: /usr/share/novnc
  - No SSL/TLS support (no cert file)
  - proxying from 0.0.0.0:6080 to ignore:ignore

  1: 192.168.221.1: new handler Process
  2: 192.168.221.1: new handler Process
  3: 192.168.221.1: new handler Process
  1: 192.168.221.1: "GET /vnc_auto.html?token=f70fbd58-695b-4ddf-8e76-417aa958ee79&title=vm234(f944ad21-54c0-43aa-b218-44c8800a7a53) HTTP/1.1" 200 -
  4: 192.168.221.1: new handler Process
  4: 192.168.221.1: Plain non-SSL (ws://) WebSocket connection
  4: 192.168.221.1: Version hybi-13, base64: 'True'
  4: 192.168.221.1: Path: '/websockify'
  4: connecting to: 192.168.2.231:5900
  4: handler exception: [Errno 111] Connection refused
  4: Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/websockify/websocket.py", line 797, in top_new_client
    self.new_client()
  File "/usr/lib/python2.7/dist-packages/nova/console/websocketproxy.py", line 62, in new_client
    tsock = self.socket(host, port, connect=True)
  File "/usr/lib/python2.7/dist-packages/websockify/websocket.py", line 193, in socket
    sock.connect(addrs[0][4])
  File "/usr/lib/python2.7/socket.py", line 224, in meth
    return getattr(self._sock,name)(*args)
error: [Errno 111] Connection refused

  2: 192.168.221.1: ignoring socket not ready
  3: 192.168.221.1: ignoring socket not ready

in controller the port 5900 is not open but is open the 6080

sudo lsof -i:6080
COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME
nova-novn 29447 nova 3u IPv4 446639 0t0 TCP *:6080 (LISTEN)

and in compute is open 5900 but not 6080

 lsof -i:5900
COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME
kvm 2016 libvirt-qemu 16u IPv4 792378 0t0 TCP *:5900 (LISTEN)

nova get-vnc-console <id-instance> novnc

get the Url , but then doesn't work either. Also I can see before became red label with error message "Failed to connect to server (code: 1006)" on the top of the console the label is yellow and said "Starting VNC handshake" .

edit retag flag offensive reopen merge delete

Closed for the following reason the question is answered, right answer was accepted by koolhead17
close date 2014-06-05 08:39:00.178357

4 answers

Sort by ยป oldest newest most voted
16

answered 2013-04-25 11:27:35 -0600

gnhill gravatar image

I ran into the same issue and finally sorted it out with a lot of googling and trial/error. This is my setup:

controller - 10.30.177.42

running:
nova-consoleauth
nova-novncproxy

nova.conf:
novncproxy_host=0.0.0.0
novncproxy_port=6080
novncproxy_base_url=http://10.30.177.42:6080/vnc_auto.html

compute - 10.30.177.39

running:
nova-compute

nova.conf:
vnc_enabled=True
novncproxy_base_url=http://10.30.177.42:6080/vnc_auto.html
vncserver_listen=0.0.0.0
vncserver_proxyclient_address=10.30.177.39

Then I restarted all the processes and it was able to establish a connection. The hangup for me was that 'vncserverproxyclientaddress' is a setting for the compute process and is the address of the compute process that is accessible to the novncproxy process on the other machine (i.e. it needs to be an IP that the novncproxy can connect to if you have multiple networks going on the compute node). I had originally set it on the nonvcproxy side and to its IP, which was wrong. I have a feeling you're doing something similar.

I hope that helps.

edit flag offensive delete link more

Comments

1

thanks fixed it !!!! finally thanks

claudio-enjoy gravatar imageclaudio-enjoy ( 2013-04-25 14:43:14 -0600 )edit

Could you tell me what services you restarted. I made the changes you gave above, but for some reason the console is still pulling the old ip address.

cvdsouza gravatar imagecvdsouza ( 2013-11-08 22:40:03 -0600 )edit

I was having a wrong address in vncserver_proxyclient_address. Thank you !

Luigi gravatar imageLuigi ( 2015-11-19 07:21:39 -0600 )edit

I restarted all the services :P

And I had ".localdomain" attached to the hostname of my vncserver_proxyclient_address. Removed it, replaced with IP, restarted services,

Works like a charm~! :)

sidx64 gravatar imagesidx64 ( 2016-03-08 23:16:18 -0600 )edit
2

answered 2014-01-04 06:02:27 -0600

zhangyue gravatar image

updated 2014-01-04 06:07:18 -0600

actually you just need change your nova.conf in compute node like this

smy_ip = 172.17.10.12 
vncserver_listen = 0.0.0.0
vncserver_proxyclient_address = 1    72.17.10.12
novncproxy_base_url = http://172.17.10.111:6080/vnc_auto.html

172.17.10.12 is your compute node ip

172.17.10.111 is your controller node ip

then restart you compute service

/etc/init.d/openstack-nova-compute restart

done

edit flag offensive delete link more

Comments

2

One trick. If you already have instance lunched, you might need to reboot the instance to take effect.

Gail gravatar imageGail ( 2014-10-13 02:31:00 -0600 )edit

Thanks Gail - This one worked for me!

nfv-zombie gravatar imagenfv-zombie ( 2015-04-21 18:05:34 -0600 )edit

good , i solved my question about console timeout.it is better to enlarge vnc connect timeout value.thanks very much

349317925 gravatar image349317925 ( 2015-06-09 04:39:13 -0600 )edit
0

answered 2014-01-30 12:18:12 -0600

Also in addition to the solutions mentioned, check iptables configuration on both controller and compute nodes, it must allow the ports 5900:5999 on compute node and port 6080 on controller node for accepting novncproxy incoming traffic

edit flag offensive delete link more

Comments

Hi,

I am facing same issue on Juno 3 node configuration. Ports are listening but it is not open in the firewall. Shouldn't these ports allowed by default by nova?

rvarghese gravatar imagervarghese ( 2015-01-27 07:42:43 -0600 )edit
0

answered 2013-04-25 16:04:36 -0600

this post is marked as community wiki

This post is a wiki. Anyone with karma >75 is welcome to improve it.

Almost all properties for compute nodes you can keep same as controller. Here is what I changed on my compute nodes after I copied nova.conf:

vncserver_proxyclient_address=172.20.12.104
enabled_apis=metadata

Of course on compute nodes I have this file also /etc/nova/nova-compute.conf:

[DEFAULT]
libvirt_type=kvm
connection_type=libvirt
compute_driver=libvirt.LibvirtDriver
edit flag offensive delete link more

Get to know Ask OpenStack

Resources for moderators

Question Tools

4 followers

Stats

Asked: 2013-04-24 10:37:17 -0600

Seen: 101,804 times

Last updated: Jan 30 '14