You can configure Unravel to use custom ports instead of the default ports. This configuration can be set from the Unravel manager. In a multi-cluster environment, you can configure custom ports for both core nodes and edge nodes. You can also Remap ports within a range.
Tip
Run the manager help config ports command to view the help section for config ports.
To configure custom ports, do the following:
Stop Unravel.
<Unravel installation directory>/unravel/manager stop
Display the list of ports and keys
<Unravel installation directory>/unravel/manager config ports show
Set the port using the following command with the port and port key.
<Unravel installation directory>/unravel/manager config ports set <port key> <port>
For example, if you run the following command, NGUI listens on port 1234.
<Unravel installation directory>/unravel/manager config ports set /hosts/host_main/instances/ngui_1/config/network/port 1234
Note
Run manager config ports unset <port key> command to return the ports to their default values.
<Unravel installation directory>/unravel/manager config ports unset /hosts/host_main/instances/appstore_1/config/flask/port
Apply the changes.
<Unravel installation directory>/unravel/manager config apply
Start Unravel.
<Unravel installation directory>/unravel/manager start
Note
If you customize the log_receiver_1 port from the default port, you should also update the custom port details on the cluster manager. Otherwise, the metrics and sensor data are not shown on the Unravel UI.
The log_receiver_1 port is customized from default to 5018 in the following example. The customized port 5018 should be updated in the cluster manager.
<Unravel installation directory>/unravel/manager config ports set /hosts/host_main/instances/log_receiver_1/config/network/port 5018
Stop Unravel.
<Unravel installation directory>/unravel/manager stop
Display the list of ports and keys
<Unravel installation directory>/unravel/manager config ports show
Run manager config ports remap to remap all the ports within a range.
<Unravel installation directory>/unravel/manager config ports remap
begin<specify start range>
end<specify end range>
For example, if you run the following command, all the ports get remapped between 5000 and 6000:
<Unravel installation directory>/unravel/manager config ports remap 5000 6000
Note
You can reset the remapped ports to default using the following command:
<Unravel installation directory>/unravel/manager config ports unset
<port key>
For example:
/opt/unravel/manager config ports unset /hosts/host_main/instances/appstore_1/config/flask/port
Apply the changes.
<Unravel installation directory>/unravel/manager config apply
Start Unravel.
<Unravel installation directory>/unravel/manager start
Note
In a multi-cluster environment, do the following to avoid connectivity issues between the core and edge node due to port remapping:
Remap the ports on the core node.
Manually apply the same port mappings on the edge nodes for those ports that refer to the core node.