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

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

I take my suggestion back - everything should work fine now. It doesn't work 
because of two bugs - see below.

About standaloneEnabled - I think we should have a known default value for 
standaloneEnabled and that shouldn't change based on other flags. I think it 
was set to true for backward comaptibility reasons. Michi [~michim] can 
probably explain better.

But actually, I think there are 2 bugs we should fix.
1) in QuorumPeerConfig the following lines are executed only when its 
distributed mode. I think this is why the standalone mode doesn't listen on the 
client port. I think we should move it out of CheckValidity - run it after 
checkValidity is invoked, wherever that happens. 

QuorumServer qs = quorumVerifier.getAllMembers().get(serverId);
if (qs!=null && qs.clientAddr != null) clientPortAddress = qs.clientAddr; 

2) bin/zkServer.sh doesn't look for for client port in the static file. There 
is a bunch of code there to find it in the dynamic file but not in the static 
one if its specified in the new format. Fixing this seems important for 
backward compatibility. I attach a draft of this fix.

> 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
>
> Currently, when a server only specify client port only in dynamic file, on 
> standalone mode it will be ignored and no client port will be setup.
> It confuses the use of dynamic file and we should come up with something to 
> handle this. One solution would be dynamic file doesn't allow standalone mode.



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

Reply via email to