Port Number

The project name is normally used to compute the number of the TCP port on which the vovserver listens for connections. This is done by hashing the project name into the port range 6200-6455, using the function vtk_port_number.

Clients can connect to the vovserver and interact using either the proprietary VOV protocol or HTTP. It is also possible to connect to a specific "Web" port using either HTTPS or HTTP or to a special read-only port also using HTTP, all of which is explained in Advanced Control of the Product Ports. However, a vovserver may use other than the default port as computed above, when the port is chosen manually at project startup using the -port option of the vovproject create command, or when there is a conflict with another project that is already using the default port.

VOV normally maps the project name into an integer that ranges from 6200 to 6455 - unless otherwise directed by the environment variable VOV_PORT_NUMBER. This variable is typically set in the setup.tcl file.

The following table shows the mapping for some of the standard project names.
Note: licmon, the project name for Monitor, uses a non-default port.
Project Name
Port number
intro
6244
licadm
6306
licmon
5555
vnc
6271
wa
6416
To find out a port number that can be used for a project, use vovbrowser, or vsi in a shell where the project is enabled.
% vovproject enable intro
venus intro@mercury [DEFAULT] 201> vovbrowser
http://mercury:6444/project
From Tcl, use vtk_port_number to compute the default port number for a given project. Example:
% vovsh -x 'puts [vtk_port_number vovtutorial]'
6407
The option -checkenv in vtk_port_number checks the value of the environment variable VOV_PORT_NUMBER.
% env VOV_PORT_NUMBER=7777 vovsh -x 'puts [vtk_port_number -checkenv vovtutorial]'
7777
% env VOV_PORT_NUMBER=7777 vovsh -x 'puts [vtk_port_number vovtutorial]'
6407

Conflicts in the Port Number

It is possible for different names to map to the same port number, thus making it impossible to run the corresponding servers concurrently on the same host. This occurs because only one process may listen on a host:port at a time, an operating system (OS) restriction.

If this problem occurs, it can be resolved as follows: change the host, change the project name, or explicitly choose the number of the port using the environment variable VOV_PORT_NUMBER. This variable is defined in the setup.tcl file in the server configuration directory.

The following subsection describes another method to resolve this issue.

Getting the Port Number in vovsh Connected to vovserver

If writing a script using vovsh, and finding the port number on which your script connected to vovserver is needed, the port number can be located by using vtk_generic_get. The following example assumes Monitor is owned by "cadmgr" and is using the regular port, 5555.
% vovproject enable -u cadmgr licmon% vovsh -x 'vtk_generic_get project P; puts $P(port)'
5555

This method is recommended, as it queries vovserver for the port number.

From version 2014.11, vtk_port_number has the option -checkenv, which causes it to return the value of the environment variable VOV_PORT_NUMBER.