You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@zookeeper.apache.org by craig w <co...@gmail.com> on 2014/11/24 12:52:11 UTC

zookeeper configuration file, does each server have to have exact same server.x information?

I am trying to get Zookeeper running on Kubernetes (http://kubernetes.io/)
and as a result each server in the quorum has a slightly different looking
config file. For example, in the 3-node quorum where I have 3 hosts (named
s1, s2 and s3):

s1 zoo.cfg
-----
server.1=0.0.0.0:2888:3888
server.2=s1:2889:3889
server.3=s1.2890:3890

s2 zoo.cfg
-----
server.1=s2:2888:3888
server.2=0.0.0.0:2888:3888
server.3=s2.2890:3890

s3 zoo.cfg
-----
server.1=s3:2888:3888
server.2=s3:2889:3889
server.3=0.0.0.0.2888:3888

As you can see the server.x lines are a bit different. With Kubernetes,
each host will have a proxy that forwards traffic the appropriate host. For
example, the proxy on s1 would have an entry that says "all traffic
destined for port 2888 will go to s1:2888", "all traffic going to 2889 will
go to s2:2888".

When I start up the zookeeper servers in their logs I see things like:

logging INFO "Have smaller server identifier, so dropping the connection:
(3, 1) and then WARN "Connection broken for id 1, my id = 1, error =
java.io.EOFException"

Any ideas how as how to debug further to figure out what's going on?

I am using Zookeeper 3.4.5.

Thanks,
craig

Re: zookeeper configuration file, does each server have to have exact same server.x information?

Posted by craig w <co...@gmail.com>.
Looks like my problem was networking related, thanks.

On Mon, Nov 24, 2014 at 11:05 AM, Flavio Junqueira <
fpjunqueira@yahoo.com.invalid> wrote:

> You have "." instead of ":" in a few places.
>
> > server.3=s1.2890:3890
> > server.3=s2.2890:3890
> > server.3=0.0.0.0.2888:3888
>
>
> Is this causing the problem? Also, the message you asked about is coming
> from the quorum cnx manager, which connects servers when they're trying to
> elect a leader. I'd need to see the server logs to be able to say something
> more meaningful.
>
> -Flavio
>
>
> > On 24 Nov 2014, at 11:52, craig w <co...@gmail.com> wrote:
> >
> > I am trying to get Zookeeper running on Kubernetes (
> http://kubernetes.io/)
> > and as a result each server in the quorum has a slightly different
> looking
> > config file. For example, in the 3-node quorum where I have 3 hosts
> (named
> > s1, s2 and s3):
> >
> > s1 zoo.cfg
> > -----
> > server.1=0.0.0.0:2888:3888
> > server.2=s1:2889:3889
> > server.3=s1.2890:3890
> >
> > s2 zoo.cfg
> > -----
> > server.1=s2:2888:3888
> > server.2=0.0.0.0:2888:3888
> > server.3=s2.2890:3890
> >
> > s3 zoo.cfg
> > -----
> > server.1=s3:2888:3888
> > server.2=s3:2889:3889
> > server.3=0.0.0.0.2888:3888
> >
> > As you can see the server.x lines are a bit different. With Kubernetes,
> > each host will have a proxy that forwards traffic the appropriate host.
> For
> > example, the proxy on s1 would have an entry that says "all traffic
> > destined for port 2888 will go to s1:2888", "all traffic going to 2889
> will
> > go to s2:2888".
> >
> > When I start up the zookeeper servers in their logs I see things like:
> >
> > logging INFO "Have smaller server identifier, so dropping the connection:
> > (3, 1) and then WARN "Connection broken for id 1, my id = 1, error =
> > java.io.EOFException"
> >
> > Any ideas how as how to debug further to figure out what's going on?
> >
> > I am using Zookeeper 3.4.5.
> >
> > Thanks,
> > craig
>
>


-- 

https://github.com/mindscratch
https://www.google.com/+CraigWickesser
https://twitter.com/mind_scratch
https://twitter.com/craig_links

Re: zookeeper configuration file, does each server have to have exact same server.x information?

Posted by Flavio Junqueira <fp...@yahoo.com.INVALID>.
You have "." instead of ":" in a few places.

> server.3=s1.2890:3890
> server.3=s2.2890:3890
> server.3=0.0.0.0.2888:3888


Is this causing the problem? Also, the message you asked about is coming from the quorum cnx manager, which connects servers when they're trying to elect a leader. I'd need to see the server logs to be able to say something more meaningful.

-Flavio


> On 24 Nov 2014, at 11:52, craig w <co...@gmail.com> wrote:
> 
> I am trying to get Zookeeper running on Kubernetes (http://kubernetes.io/)
> and as a result each server in the quorum has a slightly different looking
> config file. For example, in the 3-node quorum where I have 3 hosts (named
> s1, s2 and s3):
> 
> s1 zoo.cfg
> -----
> server.1=0.0.0.0:2888:3888
> server.2=s1:2889:3889
> server.3=s1.2890:3890
> 
> s2 zoo.cfg
> -----
> server.1=s2:2888:3888
> server.2=0.0.0.0:2888:3888
> server.3=s2.2890:3890
> 
> s3 zoo.cfg
> -----
> server.1=s3:2888:3888
> server.2=s3:2889:3889
> server.3=0.0.0.0.2888:3888
> 
> As you can see the server.x lines are a bit different. With Kubernetes,
> each host will have a proxy that forwards traffic the appropriate host. For
> example, the proxy on s1 would have an entry that says "all traffic
> destined for port 2888 will go to s1:2888", "all traffic going to 2889 will
> go to s2:2888".
> 
> When I start up the zookeeper servers in their logs I see things like:
> 
> logging INFO "Have smaller server identifier, so dropping the connection:
> (3, 1) and then WARN "Connection broken for id 1, my id = 1, error =
> java.io.EOFException"
> 
> Any ideas how as how to debug further to figure out what's going on?
> 
> I am using Zookeeper 3.4.5.
> 
> Thanks,
> craig