[
https://issues.apache.org/jira/browse/ZOOKEEPER-1137?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13071707#comment-13071707
]
Laxman commented on ZOOKEEPER-1137:
-----------------------------------
Following piece of code in AuthFLE class looks to be problematic.
{code}
for (QuorumServer server : self.getVotingView().values()) {
InetSocketAddress saddr = new InetSocketAddress(server.addr
.getAddress(), port);
addrChallengeMap.put(saddr, new ConcurrentHashMap<Long,
Long>());
}
{code}
We are populating the addrChallengeMap with same port all the times.
Ideally, this should be
{code}
for (QuorumServer server : self.getVotingView().values()) {
addrChallengeMap.put(server.electionAddr, new
ConcurrentHashMap<Long, Long>());
}
{code}
Any other thoughts?
> AuthFLE is throwing NPE when servers are configured with different election
> ports.
> ----------------------------------------------------------------------------------
>
> Key: ZOOKEEPER-1137
> URL: https://issues.apache.org/jira/browse/ZOOKEEPER-1137
> Project: ZooKeeper
> Issue Type: Bug
> Components: leaderElection
> Affects Versions: 3.3.3
> Reporter: Laxman
> Assignee: Laxman
> Priority: Critical
> Original Estimate: 24h
> Remaining Estimate: 24h
>
> AuthFLE is throwing NPE when servers are configured with different election
> ports.
> *Configuration*
> {noformat}
> server.1 = 10.18.52.25:2888:3888
> server.2 = 10.18.52.205:2889:3889
> server.3 = 10.18.52.144:2899:3890
> {noformat}
> *Logs*
> {noformat}
> 2011-07-22 16:06:22,404 - INFO
> [QuorumPeer:/0:0:0:0:0:0:0:0:65170:AuthFastLeaderElection@844] - Election
> tally
> 2011-07-22 16:06:29,483 - ERROR [WorkerSender Thread:
> 6:NIOServerCnxn$Factory$1@81] - Thread Thread[WorkerSender Thread: 6,5,main]
> died
> java.lang.NullPointerException
> at
> org.apache.zookeeper.server.quorum.AuthFastLeaderElection$Messenger$WorkerSender.process(AuthFastLeaderElection.java:488)
> at
> org.apache.zookeeper.server.quorum.AuthFastLeaderElection$Messenger$WorkerSender.run(AuthFastLeaderElection.java:432)
> at java.lang.Thread.run(Thread.java:619)
> 2011-07-22 16:06:29,583 - ERROR [WorkerSender Thread:
> 1:NIOServerCnxn$Factory$1@81] - Thread Thread[WorkerSender Thread: 1,5,main]
> died
> java.lang.NullPointerException
> {noformat}
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira