Table of Content

VNC console access failure

I installed one vm node openstack for testing, cannot access to new instance console, got error as below,

Failed to connect to server (code: 1006)

Found some clue from nova log

/var/log/nova/nova-consoleauth.log

2018-01-24 01:58:37.323 1331 INFO nova.consoleauth.manager [req-bc9e5095-6306-48ed-821d-28c18634f3d9 2b1047d6cd5644f98de277ba45771651 401c817b58a0446ba78a2c199da8178e - default default] Received Token: 9e97e880-32dc-44ba-a601-efe566aae2fe, {'instance_uuid': u'7c90e1f9-f2fe-4279-a8e9-cee2a1f1b480', 'access_url': u'http://10.120.0.21:6080/vnc_auto.html?token=9e97e880-32dc-44ba-a601-efe566aae2fe', 'token': u'9e97e880-32dc-44ba-a601-efe566aae2fe', 'last_activity_at': 1516759117.323072, 'internal_access_path': None, 'console_type': u'novnc', 'host': u'ctopenstack.xxx.com', 'port': u'5900'}

/var/log/nova/nova-novncproxy.log

2018-01-24 01:58:37.928 19865 INFO nova.console.websocketproxy [req-0bf891af-495c-4a33-a849-8a588557c214 - - - - -]  30: connect info: {u'instance_uuid': u'7c90e1f9-f2fe-4279-a8e9-cee2a1f1b480', u'internal_access_path': None, u'last_activity_at': 1516759117.323072, u'console_type': u'novnc', u'host': u'ctopenstack.xxx.com', u'token': u'9e97e880-32dc-44ba-a601-efe566aae2fe', u'access_url': u'http://10.120.0.21:6080/vnc_auto.html?token=9e97e880-32dc-44ba-a601-efe566aae2fe', u'port': u'5900'}
2018-01-24 01:58:37.928 19865 INFO nova.console.websocketproxy [req-0bf891af-495c-4a33-a849-8a588557c214 - - - - -]  30: connecting to: ctopenstack.xxx.com:5900
2018-01-24 01:58:38.077 19865 INFO nova.console.websocketproxy [req-0bf891af-495c-4a33-a849-8a588557c214 - - - - -] handler exception: [Errno -2] No address found

from log we know it used novnc, and trying to connect to ctopenstack.xxx.com:5900 but "No address found"

check nova.conf setting

host name is for vncserver_proxyclient_address,

[root@ctopenstack nova]# cat nova.conf |grep ctopenstack.xxx.com
vncserver_proxyclient_address=ctopenstack.xxx.com

don’t know why it will use host alias name, it should be nova compute management ip address, in our case it 10.120.0.21 .

change it management ip 10.120.0.21

#vncserver_proxyclient_address=ctopenstack.xxx.com
vncserver_proxyclient_address=10.120.0.21

test ip:port seems good,

[root@ctopenstack nova]# curl 10.120.0.21:5900
RFB 003.008

then need to restart nova service,

[root@ctopenstack nova]# systemctl restart openstack-nova-compute
[root@ctopenstack nova]# systemctl status openstack-nova-compute
● openstack-nova-compute.service - OpenStack Nova Compute Server
   Loaded: loaded (/usr/lib/systemd/system/openstack-nova-compute.service; enabled; vendor preset: disabled)
   Active: active (running) since Wed 2018-01-24 02:36:01 UTC; 8s ago
 Main PID: 473 (nova-compute)
   CGroup: /system.slice/openstack-nova-compute.service
           ├─473 /usr/bin/python2 /usr/bin/nova-compute
           └─539 /usr/bin/python2 /bin/privsep-helper --config-file /usr/share/nova/nova-dist.conf --config-file /etc/nova/nova.conf --privsep_context vif_plug_ovs.priv...

Jan 24 02:35:53 ctopenstack systemd[1]: Starting OpenStack Nova Compute Server...
Jan 24 02:36:01 ctopenstack systemd[1]: Started OpenStack Nova Compute Server.
Jan 24 02:36:01 ctopenstack sudo[518]:     nova : TTY=unknown ; PWD=/ ; USER=root ; COMMAND=/bin/nova-rootwrap /etc/nova/rootwrap.conf privsep-helper --confi...rivsep.sock
Hint: Some lines were ellipsized, use -l to show in full.

test VNC console in dashboard

reload dashboad GUI, the VNC console is working well now.