Changing the secure port number for the REST management API service

By default, the REST management API service runs on port 9714. You can specify a port number when you create or update a domain.

About this task

If you have multiple copies of Teracloud® Streams on the same resource, you must use non-default port numbers because separate ports are required for each domain. If you try to start a domain and the port is already being used, the domain fails to start and you receive a message that the port is in use.

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 geturl --api command.
Note: If you use the dynamic port allocation option, the URL for the REST management API service might change each time the service restarts. If you have applications that use the REST management API, you must reestablish a connection to the REST management API 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 rest.port domain property.
    Specify the following parameter in the streamtool mkdomain command: --property rest.port=port-number
  • Update the rest.port domain property value for the domain:
    1. Update the domain property using the streamtool setdomainproperty command.
    2. Stop and restart the domain.