[ https://issues.apache.org/jira/browse/ZOOKEEPER-1625?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Alexander Shraer updated ZOOKEEPER-1625: ---------------------------------------- Description: zkServer.sh is currently looking for "clientPort" entry in the static configuration file and uses it to contact the server. With ZOOKEEPER-1411 clientPort is part of the dynamic configuration, and may appear in the separate dynamic configuration file. The "clientPort" entry may no longer be in the static config file. With the proposed patch zkServer.sh first looks in the old (static) config file, then if clientPort is not there, it figures out the id of the server by looking at myid file, and then using that id finds the client port in the dynamic config file. was: With ZOOKEEPER-1411 clientPort is part of the dynamic configuration, and may appear in the separate dynamic configuration file. zkServer.sh is looking for "clientPort" only in the static configuration file and uses it to contact the server. There are several alternatives to fix this: 1. add a parameter to zkServer.sh similarly to the parameter of zkCli.sh (for example -server 127.0.0.1:2792) 2. Have zkServer.sh first look in the old config file, then if clientPort is not there, it should figure out the id of the server by looking at myid file, and then using that id find the client port in the dynamic config file. 3. Always have clientPort in the static config file. If the client port changes in a reconfiguration, update clientPort in the static config file in addition to updating the dynamic config file. This would require changes to 1411 and 107, while the scripts would remain the same. This is a bit ugly since it requires updating the port in two files and breaks the separation of static and dynamic configs in 1411. I'd prefer the easiest option - 1, but not sure if there are any implications on the people using zkServer.sh > zkServer.sh is looking for clientPort in config file, but it may no longer be > there with ZK-1411 > ------------------------------------------------------------------------------------------------ > > Key: ZOOKEEPER-1625 > URL: https://issues.apache.org/jira/browse/ZOOKEEPER-1625 > Project: ZooKeeper > Issue Type: Bug > Components: scripts, server > Affects Versions: 3.5.0 > Reporter: Alexander Shraer > Assignee: Alexander Shraer > Fix For: 3.5.0 > > Attachments: ZOOKEEPER-1625.patch > > > zkServer.sh is currently looking for "clientPort" entry in the static > configuration file and uses it to contact the server. > With ZOOKEEPER-1411 clientPort is part of the dynamic configuration, and may > appear in the separate dynamic configuration file. The "clientPort" entry may > no longer be in the static config file. > With the proposed patch zkServer.sh first looks in the old (static) config > file, then if clientPort is not there, it figures out the id of the server by > looking at myid file, and then using that id finds the client port in the > dynamic config file. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira