Cannot connect to Openstack Instance via horizon, but SSH works?

5,499

Solution 1

I think your URL reference should be your public IP.

novncproxy_base_url=http://:6080/vnc_auto.html

xvpvncproxy_base_url=http://:6081/console

Try that.

Solution 2

Try this on the compute node you want to access from NoVNC

iptables -A INPUT -m state --state NEW -m tcp -p tcp --dport 5900:5950 -j ACCEPT
iptables -D INPUT -j REJECT --reject-with icmp-host-prohibited

If this is the right solution save it

iptables-save

Hope you can find the solution. Regards Gerardo

Solution 3

Put --vncserver_listen=0.0.0.0 instated of --vncserver_listen=172.16.0.1 in your configuration. Restart relevant services then try to access the instance via VNC. It should work.

Share:
5,499
user16818402
Author by

user16818402

Updated on September 18, 2022

Comments

  • user16818402
    user16818402 over 1 year

    I've got an OpenStack deployment running inside a VM for testing purposes. My setup is as follows: Host Ubuntu x64 with Virtualbox -> Guest Ubuntu x64 with OpenStack -> Ubuntu X64 Server Test Instances through Openstack.

    I realize it is of no practical use, but as said, it is for testing purposes only. I successfully launched an instance, binding it to 11.1.0.3 and 172.16.1.1 (host is 172.16.0.1) and I can successfully ssh into it from either the host or the guest VM with ssh -i key.pem [email protected] (or 172.16.1.1). Unfortunately, the NoVNC via Horizon does not work (Starting VNC handshake -> Failed to connect).

    The relevant lines from my nova.conf are the following:

    --novnc_enabled=true
    --novncproxy_base_url=http://172.16.0.1:6080/vnc_auto.html
    --vncserver_proxyclient_address=172.16.0.1
    --vncserver_listen=172.16.0.1
    

    So I'm not sure what's going wrong. The keypair that matches the .pem file I ssh with is of course coupled with the instance, and the instance is Active and Running.

    Any help would be greatly appreciated.

    Edit: nova get-vnc-console [id] novnc correctly supplies me with a link to vnc into the vm, but it also fails to connect.

    Edit 2: To clarify: I have an active, running instance that successfully launched through the OpenStack dashboard. I can ping the instance, I can ssh into it (using 'ssh -i key.pem ip), but I cannot access it through VNC (specifically novnc on the dashboard). Trying to access the VM through the URL nova supplies through get-vnc-console does not work either. What I wish to do is access this instance via VNC.

    • Chakri
      Chakri about 11 years
      So is your question about VNC on openstack or VMz not being reachable.
    • user16818402
      user16818402 about 11 years
      Sorry if it was a little unclear: I added clarification as to what I meant. I wish to access the instance via VNC, but cannot as of right now.
  • user16818402
    user16818402 about 11 years
    Could you elaborate on that slightly? In my nova.conf above, I have: --novncproxy_base_url=http://172.16.0.1:6080/vnc_auto.html, with 172.16.0.1 being the VM's (= the system running Openstack services) public IP address as far as it is concerned. Am I missing something?