curator-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Kunal Bharati (JIRA)" <j...@apache.org>
Subject [jira] [Created] (CURATOR-285) LeaderElection with 3.0.0
Date Fri, 08 Jan 2016 10:07:39 GMT
Kunal Bharati created CURATOR-285:
-------------------------------------

             Summary: LeaderElection with 3.0.0
                 Key: CURATOR-285
                 URL: https://issues.apache.org/jira/browse/CURATOR-285
             Project: Apache Curator
          Issue Type: Bug
          Components: Recipes
    Affects Versions: 3.0.0
         Environment: Mac OS X version 10.11.1, Java 1.8.0_45, ZooKeeper 3.4.7
            Reporter: Kunal Bharati


I am running 3 instances of ZooKeeper and the config is this:

tickTime=2000
initLimit=10
syncLimit=5
dataDir=/tmp/zookeeper1
clientPort=2181
maxClientCnxns=1000
server.1=127.0.0.1:2888:3888
server.2=127.0.0.1:2889:3889
server.3=127.0.0.1:2890:3890

I am using the leader election example code given here: https://git-wip-us.apache.org/repos/asf?p=curator.git;a=tree;f=curator-examples/src/main/java/leader;h=73b547eadb98995c0ccbd06a5b76d0741ffef263;hb=HEAD

The code runs fine with TestingServer but when I change connection string to : "127.0.0.1:2181,127.0.0.1:2182,127.0.0.1:2183",
I get the exceptions:

[main-SendThread(127.0.0.1:2183)] INFO org.apache.zookeeper.ClientCnxn - Opening socket connection
to server 127.0.0.1/127.0.0.1:2183. Will not attempt to authenticate using SASL (unknown error)
[main-SendThread(127.0.0.1:2183)] INFO org.apache.zookeeper.ClientCnxn - Socket connection
established, initiating session, client: /127.0.0.1:56111, server: 127.0.0.1/127.0.0.1:2183
[main-SendThread(127.0.0.1:2183)] INFO org.apache.zookeeper.ClientCnxn - Session establishment
complete on server 127.0.0.1/127.0.0.1:2183, sessionid = 0x3521552283c0000, negotiated timeout
= 40000
[main-EventThread] INFO org.apache.curator.framework.state.ConnectionStateManager - State
change: CONNECTED
[main-SendThread(127.0.0.1:2183)] INFO org.apache.zookeeper.ClientCnxn - Unable to read additional
data from server sessionid 0x3521552283c0000, likely server has closed socket, closing socket
connection and attempting reconnect
[main-EventThread] INFO org.apache.curator.framework.imps.EnsembleTracker - New config event
received: null
[main-EventThread] ERROR org.apache.curator.framework.imps.CuratorFrameworkImpl - Background
exception was not retry-able or retry gave up
java.lang.NullPointerException
    at java.io.ByteArrayInputStream.<init>(ByteArrayInputStream.java:106)
    at org.apache.curator.framework.imps.EnsembleTracker.processConfigData(EnsembleTracker.java:163)
    at org.apache.curator.framework.imps.EnsembleTracker.access$200(EnsembleTracker.java:48)
    at org.apache.curator.framework.imps.EnsembleTracker$2.processResult(EnsembleTracker.java:134)
    at org.apache.curator.framework.imps.CuratorFrameworkImpl.sendToBackgroundCallback(CuratorFrameworkImpl.java:829)
    at org.apache.curator.framework.imps.CuratorFrameworkImpl.processBackgroundOperation(CuratorFrameworkImpl.java:611)
    at org.apache.curator.framework.imps.WatcherRemovalFacade.processBackgroundOperation(WatcherRemovalFacade.java:151)
    at org.apache.curator.framework.imps.GetConfigBuilderImpl$2.processResult(GetConfigBuilderImpl.java:210)
    at org.apache.zookeeper.ClientCnxn$EventThread.processEvent(ClientCnxn.java:619)
    at org.apache.zookeeper.ClientCnxn$EventThread.run(ClientCnxn.java:528)
[main-EventThread] INFO org.apache.curator.framework.state.ConnectionStateManager - State
change: SUSPENDED



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message