Ask Your Question
0

nova get-vnc-console does not return VNC url. Fails with HTTP 500 error

asked 2012-03-21 09:29:33 -0500

elvinas-piliponis gravatar image

Deployed a multinode OpenStack system from Ubuntu 12.04 supplied packages.

Everything seems to be working well except for VNC console in Dashboard. I have traced it to not being able to receive VNC url from nova. stack201 is main controller node with management services, stack208 compute node.

When running nova get-vnc-console on main controller node I do get:

root@stack201:/etc/keystone# nova --debug get-vnc-console 16034854-60ec-42d1-aeda-a9173213a447 novnc connect: (stack201, 5000) send: 'POST /v2.0/tokens HTTP/1.1\r\nHost: stack201:5000\r\nContent-Length: 112\r\ncontent-type: application/json\r\naccept-encoding: gzip, deflate\r\naccept: application/json\r\nuser-agent: python-novaclient\r\n\r\n{"auth": {"tenantName": "projecta", "passwordCredentials": {"username": "adminUser", "password": "secretword"}}}' reply: 'HTTP/1.1 200 OK\r\n' header: Content-Type: application/json header: Vary: X-Auth-Token header: Date: Wed, 21 Mar 2012 09:06:36 GMT header: Transfer-Encoding: chunked connect: (stack201, 8774) send: u'GET /v1.1/9ca6fca4d5c0409aa064cc461ac74d24/servers/16034854-60ec-42d1-aeda-a9173213a447 HTTP/1.1\r\nHost: stack201:8774\r\nx-auth-project-id: projecta\r\nx-auth-token: 44372f0179054d1db8d8ebe6ea198273\r\naccept-encoding: gzip, deflate\r\naccept: application/json\r\nuser-agent: python-novaclient\r\n\r\n' reply: 'HTTP/1.1 200 OK\r\n' header: X-Compute-Request-Id: req-9a3022d1-0c5b-4f6c-9724-e0be591027fc header: Content-Type: application/json header: Content-Length: 1377 header: Date: Wed, 21 Mar 2012 09:06:36 GMT send: u'GET /v1.1/9ca6fca4d5c0409aa064cc461ac74d24/servers/16034854-60ec-42d1-aeda-a9173213a447 HTTP/1.1\r\nHost: stack201:8774\r\nx-auth-project-id: projecta\r\nx-auth-token: 44372f0179054d1db8d8ebe6ea198273\r\naccept-encoding: gzip, deflate\r\naccept: application/json\r\nuser-agent: python-novaclient\r\n\r\n' reply: 'HTTP/1.1 200 OK\r\n' header: X-Compute-Request-Id: req-c4ff6e00-78d5-48ad-9924-ce37f5b0c4f5 header: Content-Type: application/json header: Content-Length: 1377 header: Date: Wed, 21 Mar 2012 09:06:36 GMT send: u'POST /v1.1/9ca6fca4d5c0409aa064cc461ac74d24/servers/16034854-60ec-42d1-aeda-a9173213a447/action HTTP/1.1\r\nHost: stack201:8774\r\nContent-Length: 39\r\nx-auth-project-id: projecta\r\naccept-encoding: gzip, deflate\r\naccept: application/json\r\nx-auth-token: 44372f0179054d1db8d8ebe6ea198273\r\nuser-agent: python-novaclient\r\ncontent-type: application/json\r\n\r\n{"os-getVNCConsole": {"type": "novnc"}}' reply: 'HTTP/1.1 500 Internal Server Error\r\n' header: Content-Length: 128 header: Content-Type: application/json; charset=UTF-8 header: X-Compute-Request-Id: req-c8f1025d-65bf-4e96-822c-2eb54e23e97b header: Date: Wed, 21 Mar 2012 09:07:37 GMT DEBUG (shell:394) The server has either erred or is incapable of performing the requested operation. (HTTP 500) Traceback (most recent call last): File "/usr/lib/python2.7/dist-packages/novaclient/shell.py", line 391, in main OpenStackComputeShell().main(sys.argv[1:]) File "/usr/lib/python2.7/dist-packages/novaclient/shell.py", line 342, in main args.func(self.cs, args) File "/usr/lib/python2.7/dist-packages/novaclient/v1_1/shell.py", line 996, in do_get_vnc_console data = server.get_vnc_console(args.console_type) File "/usr/lib/python2.7/dist-packages/novaclient/v1_1/servers.py", line 64, in get_vnc_console return self.manager.get_vnc_console(self, console_type) File "/usr/lib/python2.7/dist-packages/novaclient/v1_1/servers.py", line 316, in get_vnc_console {'type': console_type})[1] File "/usr/lib/python2.7/dist-packages/novaclient/v1_1/servers.py", line 589, in _action return self.api.client.post(url, body=body) File "/usr/lib/python2.7/dist-packages/novaclient/client.py", line 137, in ... (more)

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted
0

answered 2012-03-26 11:31:45 -0500

elvinas-piliponis gravatar image

Issue partially solved. This was both configuration and Ubuntu packaging issue. Ubuntu did not have nova-consoleauth package (not nova-console which is deprecated XEN related package). Also ubuntu 12.04 packages mentioned below still DOES NOT have FULL nova-vncproxy functionality so while the update fixes "nova get-vnc-console" issue, VNC console still does not work in DashBoard! See below:

I have updated local mirror (as servers does not have external access) and installed nova-consoleauth on main controller and updated packages to the following versions:

root@stack201:~# dpkg -l | grep nova ii nova-api 2012.1~rc1-0ubuntu2 OpenStack Compute - API frontend ii nova-cert 2012.1~rc1-0ubuntu2 OpenStack Compute - certificate management ii nova-common 2012.1~rc1-0ubuntu2 OpenStack Compute - common files ii nova-consoleauth 2012.1~rc1-0ubuntu2 OpenStack Compute - Console Authenticator ii nova-doc 2012.1~rc1~20120316.13416-0ubuntu1 OpenStack Compute - documentation ii nova-network 2012.1~rc1-0ubuntu2 OpenStack Compute - Network manager ii nova-objectstore 2012.1~rc1-0ubuntu2 OpenStack Compute - object store ii nova-scheduler 2012.1~rc1-0ubuntu2 OpenStack Compute - virtual machine scheduler ii nova-vncproxy 2012.1~rc1-0ubuntu2 OpenStack Compute - VNC proxy ii python-nova 2012.1~rc1-0ubuntu2 OpenStack Compute Python libraries

ii python-novaclient 2012.1~rc1-0ubuntu1 client library for OpenStack Compute API

This update fixes URL retrieval but not Dashboard issue. To allow Dashboard VNC access NoVNC is required which is not included in "RC1-0" packages yet. Package nova-vncproxy does not contain nova-vnxproxy (it is actually removed in favour of not yet included novncproxy) but only nova-xvpvncproxy, which is different and does not provide Nova Dashboard functionality I had to download nova-vncproxy manually from https://github.com/cloudbuilders/noVNC as zip file, unpacked it to /home/localadmin/novnc and create the following upstart init script:

root@stack201:~# cat /etc/init/nova-vncproxy.conf description "Nova VNC proxy" author "Vishvananda Ishaya vishvananda@gmail.com"

start on (filesystem and net-device-up IFACE!=lo) stop on runlevel [016]

chdir /var/run

pre-start script mkdir -p /var/run/nova chown nova:root /var/run/nova/

    mkdir -p /var/lock/nova
    chown nova:root /var/lock/nova/

end script

exec su -s /bin/sh -c "exec nova-xvpvncproxy --flagfile=/etc/nova/nova.conf" nova root@stack201:~# cat /etc/init/nova-git-vncproxy.conf description "Nova VNC proxy GIT" author "Vishvananda Ishaya vishvananda@gmail.com"

start on (filesystem and net-device-up IFACE!=lo) stop on runlevel [016]

chdir /home/localadmin/novnc/

pre-start script mkdir -p /var/run/nova chown nova:root /var/run/nova/

    mkdir -p /var/lock/nova
    chown nova:root /var/lock/nova/

end script

exec su -s /bin/sh -c "exec /home/localadmin/novnc/utils/nova-novncproxy --flagfile=/etc/nova/nova.conf" nova

After ln -s /lib/init/upstart-job /etc/init.d/nova-git-vncproxy I am able to start NoVNC proxy service and DashBoard functionality.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Get to know Ask OpenStack

Resources for moderators

Question Tools

1 follower

Stats

Asked: 2012-03-21 09:29:33 -0500

Seen: 587 times

Last updated: Mar 26 '12