I can't get vnc console

Asked by Rafael Durán Castañeda on 2011-04-18

Hi,

I need some support in order to get VNC console from running instances. I'm using stack get_vnc_cosole:

stack --user=rafael --project=myproject compute get_vnc_console instance_id=4
{u'url': u'http://127.0.0.1:6080/vnc_auto.html?token=090929ea-f573-45e0-9efa-efe68b72af49&host=hostignore&port=portignore'}

Then I've tried the given url in both chrome and firefox, getting two different errors. In chrome I've got noVNC screen and a 'Server disconnected' error. In firefox I've also got noVNC screen but error message is now 'Connect timeout', in addition when firefox is used I get this output from command line:

localhost.localdomain - - [18/Apr/2011 12:41:48] code 400, message Bad request syntax ('<policy-file-request/>\x00')
localhost.localdomain - - [18/Apr/2011 12:41:48] "<policy-file-request/>" 40

I'd appreciate some help a lot

Question information

Language:
English Edit question
Status:
Solved
For:
OpenStack Compute (nova) Edit question
Assignee:
No assignee Edit question
Solved by:
Édouard Thuleau
Solved:
2011-04-26
Last query:
2011-04-26
Last reply:
2011-04-20
Vish Ishaya (vishvananda) said : #1

Are you running nova-vncproxy?

It has to be running for vnc console to work.

On Apr 18, 2011, at 3:49 AM, Rafael Durán Castañeda wrote:

> New question #153266 on OpenStack Compute (nova):
> https://answers.launchpad.net/nova/+question/153266
>
> Hi,
>
> I need some support in order to get VNC console from running instances. I'm using stack get_vnc_cosole:
>
> stack --user=rafael --project=myproject compute get_vnc_console instance_id=4
> {u'url': u'http://127.0.0.1:6080/vnc_auto.html?token=090929ea-f573-45e0-9efa-efe68b72af49&host=hostignore&port=portignore'}
>
> Then I've tried the given url in both chrome and firefox, getting two different errors. In chrome I've got noVNC screen and a 'Server disconnected' error. In firefox I've also got noVNC screen but error message is now 'Connect timeout', in addition when firefox is used I get this output from command line:
>
> localhost.localdomain - - [18/Apr/2011 12:41:48] code 400, message Bad request syntax ('<policy-file-request/>\x00')
> localhost.localdomain - - [18/Apr/2011 12:41:48] "<policy-file-request/>" 40
>
> I'd appreciate some help a lot
>
> --
> You received this question notification because you are a member of Nova
> Core, which is an answer contact for OpenStack Compute (nova).

Yes I'm running nova-api, nova-compute, nova-network, nova-objestore, nova-scheduler, nova-direct-api and nova-vncproxy. Any other suggesstion?

Anyway thanks for your answer

Vish Ishaya (vishvananda) said : #3

Do you also have the patched version of NoVNC?

I also recall having to set vncproxy_url to a public facing ip, although that may have just been because I didn't have a web browser on the machine that was running it.

Vish

On Apr 19, 2011, at 12:35 AM, Rafael Durán Castañeda wrote:

> Question #153266 on OpenStack Compute (nova) changed:
> https://answers.launchpad.net/nova/+question/153266
>
> Status: Answered => Open
>
> Rafael Durán Castañeda is still having a problem:
> Yes I'm running nova-api, nova-compute, nova-network, nova-objestore,
> nova-scheduler, nova-direct-api and nova-vncproxy. Any other
> suggesstion?
>
> Anyway thanks for your answer
>
> --
> You received this question notification because you are a member of Nova
> Core, which is an answer contact for OpenStack Compute (nova).

Édouard Thuleau (ethuleau) said : #4

I've got the same issue than Rafael.
I set the flag vncproxy_url to a public IP for the same reasons of Vish.
In chrome I've got noVNC screen and a 'Server disconnected' error.

I try to use it with libvirt/KVM with bzr1003.

I'm using https://github.com/sleepsonthefloor/noVNC noVNC version, and I'm testing all in localhost. Do I need test from another computer? Any ohter suggestion?

Are you on a multi-server configuration? If so, how are your services organized across hosts? Also, just to double check, do your instance.host names resolve properly? and are your instances pingable?

There do appear to be issues with Firefox - noVNC switches to using a websocket emulation mode that uses adobe flash for the socket connection. The flash protocol aspects are not yet supported.

I'm testing all on a single machine installation, I'll check again, but I haven't had any network problem so far. I can connect via ssh, using noVNC server directly, using others VNC clients,.. but I can't connect neither via chrome nor firefox using nova-vncproxy + noVNC.

Thanks for answering

You can check which port the actual vncserver is bound to by using 'virsh dumpxml.' Verify that you can curl that port (It will respond with an error, but that should tell you that the instance's vnc server is up and running).

The version of noVNC you are using should be fine, but the most recent one is here: git://github.com/openstack/noVNC.git

As you told me I've checked running machines with virsh dumpxml. Virtual machines are using ports 5900 and 5901 as expected. When I tried curl http://127.0.0.1:5900/5901 I got: RFB 003.008. So that isn't the problem, it occurs only when I use nova-vncproxy, as I explain before I can get VNC console from noVNC server and any other VNC clients, only when I try to reach virtual machines via proxy I get error. In addition I noticed an error in vnc_auto.html when I'm using noVNC, nova-vncproxy and chrome. In my first attempt I didn't get noVNC screen and after inspect the given url (via chrome debugger) I got: Uncaught ReferenceError: token is not defined in window.onload: vnc_auto.html: 98. After this I changed vnc_auto.html:92

var host, port, password; --> var host, port, password, token;

After this I got noVNC scrren and sever disconnected error.

Any other suggestion?

Best Édouard Thuleau (ethuleau) said : #10

I solve the same problem on my installation (Nova bzr1003 on Ubuntu 10.04 LTS) by put the flag 'vnc_debug' to false (normally it's the default value but I set it to true the first time I try to use VNC proxy).
I hope it's can help you and if the case, we should open a bug.

Thanks Edouard Thuleau, that solved my question.

Édouard Thuleau (ethuleau) said : #12

Your welcome.

Could you open a ticket for that ?

Regards,
Édouard.

Ok, I will open a bug report

The flag vnc_debug is for protocol debugging. It bypasses authentication, and allows you to specify the vnc host and port in the url, thereby allowing you to connect to vnc consoles without asking for a token.

The vnc host and port is considered private, which is why the api doesn't return that information. Perhaps if the vnc_debug flag is set, we could embed the proper host/port info in the url so that it works by default.

antiError (zhonghuabaima0913) said : #15

dear all, i have the same question.

i cannot connect the instance from dashboard. I have 11 machines to build the cloud.keystone,glance,dashboard,mysql and nova were installed on the controller(192.168.80.10/192.168.78.10) . And glance ,nova are also are installed other machines.
my question is that nova-consoleauth is needed to install on every machine???

And nova-novncproxy is also needed to install on every machine???

That is the machine's (192.168.80.11/192.168.78.11)nova.conf

[DEFAULT]
verbose=True
auth_strategy=keystone
allow_resize_to_same_host=True
compute_scheduler_driver=nova.scheduler.filter_scheduler.FilterScheduler
dhcpbridge_flagfile=/etc/nova/nova.conf
fixed_range=10.0.3.0/24
flat_network_dhcp_start=10.0.3.2
s3_host=192.168.78.10
network_manager=nova.network.manager.FlatDHCPManager
volume_group=nova-volumes
volume_name_template=volume-%08x
iscsi_helper=tgtadm
iscsi_ip_prefix=192.168.80.
osapi_compute_extension=nova.api.openstack.compute.contrib.standard_extensions
my_ip=192.168.78.10
public_interface=eth0
flat_interface=eth0
floating_range=192.168.81.0/24
flat_network_bridge=br100
sql_connection=mysql://nova:nova@192.168.78.10/nova
libvirt_type=kvm
instance_name_template=instance-%08x
novncproxy_base_url=http://192.168.80.10:6080/vnc_auto.html
xvpvncproxy_base_url=http://192.168.80.10:6081/console
vncserver_listen=192.168.80.10
vncserver_proxyclient_address=192.168.80.10
api_paste_config=/etc/nova/api-paste.ini
image_service=nova.image.glance.GlanceImageService
ec2_dmz_host=192.168.78.10
rabbit_host=192.168.78.10
rabbit_password=guest
glance_api_servers=192.168.78.10:9292
force_dhcp_release=True
connection_type=libvirt
firewall_driver=nova.virt.libvirt.firewall.IptablesFirewallDriver
logdir=/var/log/nova
multi_host=true

and my /etc/init/nova-novncproxy.conf was wrote "exec /opt/stack/noVNC/utils/nova-novncproxy --config_file /etc/nova/nova.conf --web /opt/stack/noVNC -d --debug"

What is wrong with me ??? Thankyou!