Project

General

Profile

Actions

Bug #3916

closed

ws_proxy port issues

Added by Markus Nussdorfer about 10 years ago. Updated almost 8 years ago.

Status:
Resolved
Priority:
Normal
Assignee:
-
Category:
Compute resources
Target version:
-
Difficulty:
Triaged:
Fixed in Releases:
Found in Releases:

Description

Was just trying to set up console access to our VMWare Servers and discovered, that the host_port variable is never assigned from the defined PORTS Range
set in lib/ws_proxy.rb

Setting the VNC settings according to the manual has no effect, as the connections get opend on some random ports outside of that range
http://theforeman.org/manuals/1.3/index.html#5.2.8VMwareNotes

/usr/bin/python /usr/share/foreman/extras/noVNC/websockify.py --daemon --idle-timeout=120 --timeout=120 5910 esxhost:5902
/usr/bin/python /usr/share/foreman/extras/noVNC/websockify.py --daemon --idle-timeout=120 --timeout=120 5910 esxhost:5908

Actions #1

Updated by Markus Nussdorfer about 10 years ago

After a bit of further digging it seems foreman gets the port range from vSphere
but vSphere 5.1 uses the Portrange 5900-5964

therefore i guess it should be sufficient to update the documentation

Cheers
Markus

Actions #2

Updated by Lukas Zapletal about 10 years ago

  • Category set to Compute resources
  • Status changed from New to Need more information

Hello,

if you create your VM instance through Foreman, we will set VNC port to the one that is in documentation I guess. Can you confirm that you created a VM instance through Foreman and you have been assigned a VNC port from outside of the range?

Thanks.

Actions #3

Updated by Markus Nussdorfer about 10 years ago

Hi

Yes i definitely crested the VM through Foreman.

As far as i see it, the Range in the documentation only affects the connection from the end-user to the VNC proxy on the Foreman node, but not the backend connection to the ESX server.

if you look into
app/models/compute_resources/foreman/model/vmware.rb
and esp. the unused_vnc_port method

where port is defined as:

      10.times do
        port = 5901 + rand(64)

This also matches the range defined by VSphere.
Although i'm not sure if the initial port should actually start at 5900, to stay within the range, as the max value might be 5965.

Cheers
Markus

Actions #4

Updated by Markus Nussdorfer about 10 years ago

Hi

please ignore the last line, just read up the ruby docs where it says
'greater than or equal to zero and less than max1' so the range should be fine

Markus

Actions #5

Updated by Tomer Brisker almost 8 years ago

  • Status changed from Need more information to Resolved

Port range was corrected in the docs: http://theforeman.org/manuals/1.11/index.html#5.2.9VMwareNotes
Closing.

Actions

Also available in: Atom PDF