Changing the secure port number for the Teracloud® Streams data service
By default, an open port is dynamically chosen for the Teracloud® Streams data service when an instance is started. This is done to avoid port conflict errors when starting multiple instances on the same resource. You can override this behavior by specifying a port number when you create or update an instance. If you try to start an instance and the port is already being used, the instance fails to start and you receive a message that the port is in use.
About this task
The new port number must be a value between 0 and
65535. If the domain.portRange domain property is
set, the new port number must be within the specified port range. If you specify a value of
0, an open port is dynamically chosen when the domain is started. After
the domain starts, you can determine the port number by using the
streamtool
getinstanceurl --data
command. Note: If you do not override
the dynamic port allocation option, the URL for the Teracloud®
Streams
data service might change each time the service restarts. If you have applications that use the
data exchange API, you must reestablish a connection to the Streams data service after it restarts
and use the updated URL. For these reasons, consider using an assigned port number in
these scenarios.
Procedure
To use a non-default port number:
-
Create a domain and specify the data.port instance property.
Specify the following parameter in the
streamtool mkinstance
command:--property data.port=port-number
-
Update the data.port instance property value for the
instance:
-
Update the instance property using the
streamtool setproperty
command. - Stop and restart the instance.
For more information, refer to Firewall configuration guidelines for Teracloud Streams. -
Update the instance property using the