IllegalArgumentException excpetion : Path cannot be null

2010-08-26 Thread Yatir Ben Shlomo
I am running a zookeeper ensemble of 3 zookeeper instances
and established a solrCloud to work with it (2 masters , 2 slaves)
on one of the masters I keep noticing ZooKeeper related exceptions which I 
can't understand:
And the other is java.lang.IllegalArgumentException: Path cannot be null 
(PathUtils.java:45)

Here are my logs (I set the log level to FINE on zookeeper package)

 Anyone can identify the issue?
(I could not yet get any help from the solrCloud community)


FINE: Reading reply sessionid:0x12a97312613010b, packet:: clientPath:null 
serverPath:null finished:false header:: -8,101  replyHeader:: -8,-1,0  
request:: 
30064776552,v{'/collections},v{},v{'/collections/ENPwl/shards/ENPWL1,'/collections/ENPwl/shards/ENPWL4,'/collections/ENPwl/shards/ENPWL2,'/collections,'/collections/ENPwl/shards/ENPWL3,'/collections/ENPwlMaster/shards/ENPWLMaster_3,'/collections/ENPwlMaster/shards/ENPWLMaster_4,'/live_nodes,'/collections/ENPwlMaster/shards/ENPWLMaster_1,'/collections/ENPwlMaster/shards/ENPWLMaster_2}
  response:: null
Aug 25, 2010 5:18:19 AM org.apache.log4j.Category debug
FINE: Reading reply sessionid:0x12a97312613010b, packet:: clientPath:null 
serverPath:null finished:false header:: 540,8  replyHeader:: 540,-1,0  
request:: '/collections,F  response:: v{'ENPwl,'ENPwlMaster}
Aug 25, 2010 5:18:19 AM org.apache.solr.common.cloud.ZkStateReader 
updateCloudState
INFO: Cloud state update for ZooKeeper already scheduled
Aug 25, 2010 5:18:19 AM org.apache.log4j.Category error
SEVERE: Error while calling watcher
java.lang.IllegalArgumentException: Path cannot be null
at org.apache.zookeeper.common.PathUtils.validatePath(PathUtils.java:45)
at 
org.apache.zookeeper.ZooKeeper.getChildren(zookeeper:ZooKeeper.java):1196)
at 
org.apache.solr.common.cloud.SolrZkClient.getChildren(SolrZkClient.java:200)
at 
org.apache.solr.common.cloud.ZkStateReader$5.process(ZkStateReader.java:315)
at 
org.apache.zookeeper.ClientCnxn$EventThread.run(zookeeper:ClientCnxn.java):425)
Aug 25, 2010 5:18:19 AM org.apache.solr.common.cloud.ZkStateReader$4 process
INFO: Detected a shard change under ShardId:ENPWL3 in collection:ENPwl
Aug 25, 2010 5:18:19 AM org.apache.solr.common.cloud.ZkStateReader 
updateCloudState
INFO: Cloud state update for ZooKeeper already scheduled
Aug 25, 2010 5:18:19 AM org.apache.solr.common.cloud.ZkStateReader$4 process
INFO: Detected a shard change under ShardId:ENPWL4 in collection:ENPwl
Aug 25, 2010 5:18:19 AM org.apache.solr.common.cloud.ZkStateReader 
updateCloudState
INFO: Cloud state update for ZooKeeper already scheduled
Aug 25, 2010 5:18:19 AM org.apache.solr.common.cloud.ZkStateReader$4 process
INFO: Detected a shard change under ShardId:ENPWL1 in collection:ENPwl
Aug 25, 2010 5:18:19 AM org.apache.solr.common.cloud.ZkStateReader 
updateCloudState
INFO: Cloud state update for ZooKeeper already scheduled
Aug 25, 2010 5:18:19 AM org.apache.solr.cloud.ZkController$2 process
INFO: Updating live nodes:org.apache.solr.common.cloud.solrzkcli...@55308275
Aug 25, 2010 5:18:19 AM org.apache.solr.common.cloud.ZkStateReader 
updateCloudState
INFO: Updating live nodes from ZooKeeper...
Aug 25, 2010 5:18:19 AM org.apache.log4j.Category debug
FINE: Reading reply sessionid:0x12a97312613010b, packet:: clientPath:null 
serverPath:null finished:false header:: 541,8  replyHeader:: 541,-1,0  
request:: '/live_nodes,F  response:: 
v{'ob1078.nydc1.outbrain.com:8983_solr2,'ob1078.nydc1.outbrain.com:8983_solr1,'ob1061.nydc1.outbrain.com:8983_solr2,'ob1062.nydc1.outbrain.com:8983_solr1,'ob1062.nydc1.outbrain.com:8983_solr2,'ob1061.nydc1.outbrain.com:8983_solr1,'ob1077.nydc1.outbrain.com:8983_solr2,'ob1077.nydc1.outbrain.com:8983_solr1}
Aug 25, 2010 5:18:19 AM org.apache.log4j.Category error
SEVERE: Error while calling watcher
java.lang.IllegalArgumentException: Path cannot be null
at org.apache.zookeeper.common.PathUtils.validatePath(PathUtils.java:45)
at 
org.apache.zookeeper.ZooKeeper.getChildren(zookeeper:ZooKeeper.java):1196)
at 
org.apache.solr.common.cloud.SolrZkClient.getChildren(SolrZkClient.java:200)
at org.apache.solr.cloud.ZkController$2.process(ZkController.java:321)
at 
org.apache.zookeeper.ClientCnxn$EventThread.run(zookeeper:ClientCnxn.java):425)
Aug 25, 2010 5:18:19 AM org.apache.solr.common.cloud.ConnectionManager process
INFO: Watcher org.apache.solr.common.cloud.connectionmana...@339bb448 
name:ZooKeeperConnection Watcher:zook1:2181,zook2:2181,zook3:2181 got event 
WatchedEvent: Server state change. New state: Disconnected path:null type:None
Aug 25, 2010 5:18:19 AM org.apache.solr.common.cloud.ZkStateReader$4 process
INFO: Detected a shard change under ShardId:ENPWLMaster_1 in 
collection:ENPwlMaster
Aug 25, 2010 5:18:19 AM org.apache.solr.common.cloud.ZkStateReader 
updateCloudState
INFO: Cloud state update for ZooKeeper already scheduled
Aug 25, 2010 5:18:19 AM org.apache.solr.common.cloud.ZkStateReader$4 process
INFO: 

Exception causing close of session

2010-08-26 Thread Ted Yu
Hi,
zookeeper-3.2.2 is used out of HBase 0.20.5

Linux sjc1-.com 2.6.18-92.el5 #1 SMP Tue Jun 10 18:51:06 EDT 2008 x86_64
x86_64 x86_64 GNU/Linux

In hbase-hadoop-zookeeper-sjc1-cml-grid00.log, I see a lot of the following:

2010-08-26 22:58:01,930 INFO org.apache.zookeeper.server.NIOServerCnxn:
closing session:0x0 NIOServerCnxn: java.nio.channels.SocketChannel[connected
local=/10.201.9.40:2181 remote=/10.201.9.22:63316]
2010-08-26 22:58:02,097 INFO org.apache.zookeeper.server.NIOServerCnxn:
Connected to /10.201.9.22:63317 lastZxid 4004
2010-08-26 22:58:02,097 WARN org.apache.zookeeper.server.NIOServerCnxn:
Client has seen zxid 0xfa4 our last zxid is 0x42
2010-08-26 22:58:02,097 WARN org.apache.zookeeper.server.NIOServerCnxn:
Exception causing close of session 0x0 due to java.io.IOException: Client
has seen zxid 0xfa4 our last zxid is 0x42

If you can shed some thought on root cause, that would be great.


Re: Exception causing close of session

2010-08-26 Thread Patrick Hunt

 Client has seen zxid 0xfa4 our last zxid is 0x42

Someone reset the zk server database without restarting the clients. As 
a result the client is forward in time relative to the cluster.


Patrick

On 08/26/2010 04:03 PM, Ted Yu wrote:

Hi,
zookeeper-3.2.2 is used out of HBase 0.20.5

Linux sjc1-.com 2.6.18-92.el5 #1 SMP Tue Jun 10 18:51:06 EDT 2008 x86_64
x86_64 x86_64 GNU/Linux

In hbase-hadoop-zookeeper-sjc1-cml-grid00.log, I see a lot of the following:

2010-08-26 22:58:01,930 INFO org.apache.zookeeper.server.NIOServerCnxn:
closing session:0x0 NIOServerCnxn: java.nio.channels.SocketChannel[connected
local=/10.201.9.40:2181 remote=/10.201.9.22:63316]
2010-08-26 22:58:02,097 INFO org.apache.zookeeper.server.NIOServerCnxn:
Connected to /10.201.9.22:63317 lastZxid 4004
2010-08-26 22:58:02,097 WARN org.apache.zookeeper.server.NIOServerCnxn:
Client has seen zxid 0xfa4 our last zxid is 0x42
2010-08-26 22:58:02,097 WARN org.apache.zookeeper.server.NIOServerCnxn:
Exception causing close of session 0x0 due to java.io.IOException: Client
has seen zxid 0xfa4 our last zxid is 0x42

If you can shed some thought on root cause, that would be great.



Receiving create events for self with synchronous create

2010-08-26 Thread Todd Nine
Hi all,
  I'm running into a strange issue I could use a hand with.   I've
implemented leader election, and this is working well.  I'm now
implementing a follower queue with ephemeral nodes. I have an interface
IClusterManager which simply has the api clusterChanged.  I don't care
if nodes are added or deleted, I always want to fire this event.  I have
the following basic algorithm.


init

Create a path with /follower/+mynode name

fire the clusterChangedEvent

Watch set the event watcher on the path /follower.


watch:

reset the watch on /follower

if event is not a NodeDeleted or NodeCreated, ignore

fire the clustermanager event


this seems pretty straightforward.  Here is what I'm expecting


1. Create my node path
2. fire the clusterChanged event
3. Set watch on /follower
4. Receive watch events for changes from any other nodes.

What's actually happening

1. Create my node path
2. fire the clusterChanged event
3. Set Watch on /follower
4. Receive watch event for node created in step 1
5. Receive future watch events for changes from any other nodes.


Here is my code.  Since I set the watch after I create the node, I'm not
expecting to receive the event for it.  Am I doing something incorrectly
in creating my watch?  Here is my code.

http://pastebin.com/zDXgLagd

Thanks,
Todd






client notification of partition in ensemble

2010-08-26 Thread Ryan King
I'm new to zookeeper so forgive me if this question is naive, but I
can't seem to find an answer in the documentation or archives.


If a zookeeper node is partitioned from the rest of the ensemble will
clients connected to that node know?

-ryan


Re: Receiving create events for self with synchronous create

2010-08-26 Thread Mahadev Konar
Hi Todd,
  The code that you point to, I am not able to make out the sequence of steps.
   Can you be more clear on what you are trying to do in terms of zookeeper api?

Thanks
mahadev
On 8/26/10 5:58 PM, Todd Nine t...@spidertracks.co.nz wrote:

Hi all,
  I'm running into a strange issue I could use a hand with.   I've
implemented leader election, and this is working well.  I'm now
implementing a follower queue with ephemeral nodes. I have an interface
IClusterManager which simply has the api clusterChanged.  I don't care
if nodes are added or deleted, I always want to fire this event.  I have
the following basic algorithm.


init

Create a path with /follower/+mynode name

fire the clusterChangedEvent

Watch set the event watcher on the path /follower.


watch:

reset the watch on /follower

if event is not a NodeDeleted or NodeCreated, ignore

fire the clustermanager event


this seems pretty straightforward.  Here is what I'm expecting


1. Create my node path
2. fire the clusterChanged event
3. Set watch on /follower
4. Receive watch events for changes from any other nodes.

What's actually happening

1. Create my node path
2. fire the clusterChanged event
3. Set Watch on /follower
4. Receive watch event for node created in step 1
5. Receive future watch events for changes from any other nodes.


Here is my code.  Since I set the watch after I create the node, I'm not
expecting to receive the event for it.  Am I doing something incorrectly
in creating my watch?  Here is my code.

http://pastebin.com/zDXgLagd

Thanks,
Todd