[ 
https://issues.apache.org/jira/browse/ZOOKEEPER-2006?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14100828#comment-14100828
 ] 

Alexander Shraer commented on ZOOKEEPER-2006:
---------------------------------------------

Hi Hongchao, 

I tried to run it and there are still multiple issues with zkServer.sh changes.
I can work on this tonight or if you have time you can take a look.

Currently there's a small parsing error in zkServer.sh, but besides that there 
are a few issues:
- myid is not checked. Its possible that clientPort wasn't specified, myid 
wasn't set and yet it finds the port. 
- if there was no ";port" in the server.x line, it will find port2 here 
"sever.1=host:port1:port2" since it deletes everything before ";" but there's 
no ";" here. We need to check that there's a ";" and something after it before 
doing "sed".
- clientPortAddress is not set correctly if I write 
"server.1=host:port1:port2;host2:port3"

we need to check this more by running with different possible config files.

Maybe this should be a separate JIRA since this is not only related to 
standalone mode.


> Standalone mode won't take client port from dynamic config file
> ---------------------------------------------------------------
>
>                 Key: ZOOKEEPER-2006
>                 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-2006
>             Project: ZooKeeper
>          Issue Type: Bug
>    Affects Versions: 3.5.0
>            Reporter: Hongchao Deng
>            Assignee: Hongchao Deng
>         Attachments: ZOOKEEPER-2006-v2.patch, ZOOKEEPER-2006-v3.patch, 
> ZOOKEEPER-2006-v4.patch, ZOOKEEPER-2006-v5.patch, ZOOKEEPER-2006.patch, draft
>
>
> When clientPort is specified in the new format, using 
> "server.x=host:port1:port2;clientPort" in either static or dynamic file and 
> without a "clientPort = xxxx" statement, a standalone mode server doesn't set 
> up client port. 
> A second problem is that zkServer.sh looks for the client port in both static 
> and dynamic files, but when looking in the static files it only looks for the 
> "clientPort" statement, so if its specified in the new format the port will 
> be missed and commands such as "zkServer.sh status" will not work. This is a 
> problem for standalone mode, but also in distributed mode when the server is 
> still LOOKING (once a leader is established and the server is 
> LEADING/FOLLOWING/OBSERVING, a dynamic file is created and the client port 
> will be found by the script).
> Review Board:
> https://reviews.apache.org/r/24786/



--
This message was sent by Atlassian JIRA
(v6.2#6252)

Reply via email to