Changing the port number for embedded ZooKeeper
Use this procedure to change the port number that Teracloud® Streams uses for embedded ZooKeeper. If the port number you specify is not available, embedded ZooKeeper finds an available port when it starts.
Before you begin
streamtool stopdomain -d domain-id --embeddedzk
Procedure
- To display the embedded
ZooKeeper property settings, enter the following command:
streamtool getbootproperty --all
The streams.zookeeper.property.clientPort property value is the embedded ZooKeeper port number, as shown in the following example:streams.zkmonitor.checkIntervalMs=50000 streams.zkmonitor.connTimeoutMs=5000 streams.zkmonitor.port=21820 streams.zookeeper.jvmFlags= streams.zookeeper.logDir=/home/myuser/.streams/var/embeddedzk streams.zookeeper.property.autopurge.purgeInterval=1 streams.zookeeper.property.autopurge.snapRetainCount=3 streams.zookeeper.property.clientPort=21810 streams.zookeeper.property.dataDir=/home/myuser/.streams/var/embeddedzk/datadir streams.zookeeper.property.initLimit=10 streams.zookeeper.property.maxClientCnxns=0 streams.zookeeper.property.maxSessionTimeout=180000 streams.zookeeper.property.minSessionTimeout=-1 streams.zookeeper.property.syncLimit=5 streams.zookeeper.property.tickTime=3000 streams.zookeeper.quorum=myhost.com streams.zookeeper.rootLogger=INFO,CONSOLE,ROLLINGFILE
- To change the port number, use the streamtool
setbootproperty command.For example, to change the port number to 21811, enter the following command:
streamtool setbootproperty streams.zookeeper.property.clientPort=21811
Note: Do not use a delimiter, such as a comma, when you specify the port number. For example, specifying 21,811 results in an error. - Start the domain by entering the following command:
streamtool startdomain -d domain-id --embeddedzk