Changing the secure port number for the JMX management API service
By default, the JMX management API service runs on port 9975. The JMX management API service uses an HTTP service for handling large data operations. By default, an open port is dynamically chosen for this HTTP service when the domain is started. You can specify port numbers for each of these services 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
getjmxconnect command. For large data operations, the URL with the chosen port is
returned on the call to initiate the operation.
Note: If you use the
dynamic port allocation option, the connection string for the JMX management API service might change each time the service restarts. If you have applications that use the JMX API,
you must reestablish a connection to the JMX management API service after it restarts and use the updated connection string. For these reasons, consider using
an assigned port number in these scenarios. This does not apply to large data operations since
the URL is returned for each operation.
Procedure
To use a non-default port number:
-
Create a domain and specify the jmx.port and
jmx.httpPort domain properties.
Specify the following parameters in the streamtool mkdomain command:
--property jmx.port=port-number
--property jmx.httpPort=port-number
- Update the jmx.port domain
property value for the domain:
- Update the domain properties using the streamtool setdomainproperty command.
- Stop and restart the domain.
For more information, refer to Firewall configuration guidelines for Teracloud Streams.