Re: How to handle "Node does not exist" error?

2010-08-16 Thread Vishal K
In my case, I am pretty sure that the configuration was right. I will reproduce it and post more info later. Thanks. On Mon, Aug 16, 2010 at 1:08 PM, Patrick Hunt wrote: > Try using the logs, stat command or JMX to verify that each ZK server is > indeed a leader/follower as expected. You should

Re: How to handle "Node does not exist" error?

2010-08-16 Thread Patrick Hunt
Try using the logs, stat command or JMX to verify that each ZK server is indeed a leader/follower as expected. You should have one leader and n-1 followers. Verify that you don't have any "standalone" servers (this is the most frequent error I see - misconfiguration of a server such that it thi

Re: How to handle "Node does not exist" error?

2010-08-16 Thread Vishal K
Hi Dr Hao, If you think this is not a configuration issue, then it would be a good idea to open a jira. Thanks. On Thu, Aug 12, 2010 at 8:42 PM, Ted Dunning wrote: > On Thu, Aug 12, 2010 at 4:57 PM, Dr Hao He wrote: > > > hi, Ted, > > > > I am a little bit confused here. So, is the node incon

Re: How to handle "Node does not exist" error?

2010-08-12 Thread Ted Dunning
On Thu, Aug 12, 2010 at 4:57 PM, Dr Hao He wrote: > hi, Ted, > > I am a little bit confused here. So, is the node inconsistency problem > that Vishal and I have seen here most likely caused by configurations or > embedding? > > If it is the former, I'd appreciate if you can point out where those

Re: How to handle "Node does not exist" error?

2010-08-12 Thread Dr Hao He
hi, Ted, I am a little bit confused here. So, is the node inconsistency problem that Vishal and I have seen here most likely caused by configurations or embedding? If it is the former, I'd appreciate if you can point out where those silly mistakes have been made and the correct way to embed ZK

Re: How to handle "Node does not exist" error?

2010-08-12 Thread Benjamin Reed
i thought there was a jira about supporting embedded zookeeper. (i remember rejecting a patch to fix it. one of the problems is that we have a couple of places that do System.exit().) i can't seem to find it though. one case that would be great for embedding is writing test cases, so i think

Re: How to handle "Node does not exist" error?

2010-08-12 Thread Ted Dunning
I am not saying that the API shouldn't support embedded ZK. I am just saying that it is almost always a bad idea. It isn't that I am asking you to not do it, it is just that I am describing the experience I have had and that I have seen others have. In a nutshell, embedding leads to problems and

Re: How to handle "Node does not exist" error?

2010-08-12 Thread Vishal K
Hi, I don't intend to hijack Dr. Hao's email thread here, but I would like to point out two things: 1. I use embedded server as well. But I don't use any setters. We extend QuorumPeerMain and call initializeAndRun() function. So we are doing pretty much the same thing that QuorumPeerMain is doin

Re: How to handle "Node does not exist" error?

2010-08-12 Thread Ted Dunning
It doesn't. But running a ZK cluster that is incorrectly configured can cause this problem and configuring ZK using setters is likely to be subject to changes in what configuration is needed. Thus, your style of code is more subject to decay over time than is nice. The rest of my comments detail

Re: How to handle "Node does not exist" error?

2010-08-12 Thread Vishal K
Hi Ted, Can you explain why running ZK in embedded mode can cause znode inconsistencies? Thanks. -Vishal On Thu, Aug 12, 2010 at 12:01 AM, Ted Dunning wrote: > Try running the server in non-embedded mode. > > Also, you are assuming that you know everything about how to configure the > quorumPe

Re: How to handle "Node does not exist" error?

2010-08-11 Thread Ted Dunning
Try running the server in non-embedded mode. Also, you are assuming that you know everything about how to configure the quorumPeer. That is going to change and your code will break at that time. If you use a non-embedded cluster, this won't be a problem and you will be able to upgrade ZK version

Re: How to handle "Node does not exist" error?

2010-08-11 Thread Dr Hao He
hi, Ted and Mahadev, Here are some more details about my setup: I run zookeeper in the embedded mode with the following code: quorumPeer = new QuorumPeer(); quorumPeer.setClientPort(getClientPort());

Re: How to handle "Node does not exist" error?

2010-08-11 Thread Mahadev Konar
HI Dr Hao, Can you please post the configuration of all the 3 zookeeper servers? I suspect it might be misconfigured clusters and they might not belong to the same ensemble. Just to be clear: /xpe/queues/3bd7851e79381ef4bfd1a5857b5e34c04e5159e5/msgs/msg002807 And other such nodes exist on o

Re: How to handle "Node does not exist" error?

2010-08-11 Thread Ted Dunning
What do your nodes have in their logs during startup? Are you sure you have them configured correctly? Are the file ephemeral? Could they have disappeared on their own? Sent from my iPhone On Aug 11, 2010, at 12:10 AM, Dr Hao He wrote: hi, Ted, Thanks for the reply. Here is what I d

Re: How to handle "Node does not exist" error?

2010-08-11 Thread Dr Hao He
hi, Ted, Thanks for the reply. Here is what I did: [zk: localhost:2181(CONNECTED) 0] ls /xpe/queues/3bd7851e79381ef4bfd1a5857b5e34c04e5159e5/msgs/msg002948 [] zk: localhost:2181(CONNECTED) 1] ls /xpe/queues/3bd7851e79381ef4bfd1a5857b5e34c04e5159e5/msgs [msg002807, msg

Re: How to handle "Node does not exist" error?

2010-08-10 Thread Ted Dunning
Can you provide some more information? The output of some of the four letter commands and a transcript of what you are doing would be very helpful. Also, there is no way for znodes to exist on one node of a properly operating ZK cluster and not on either of the other two. Something has to be wro