Re: tagging clients of zookeeper

2016-05-09 Thread Michael Han
Hi Arun, There is no API to associate data with a session. I think you can track the tag to session id mappings explicitly out side of ZooKeeper if this is for forensic purposes. When a client connects to ZK server ensemble you can call getSessionId method on the client instance which gives you th

Re: sharing a post on ZAB architecture

2016-05-31 Thread Michael Han
Sounds a great idea to me. BTW here is another post that might be useful for those interested in ZAB: http://www.easonliao.org/an-implementation-of-zookeeper-atomic-broadcast-protocol/ On Sun, May 29, 2016 at 7:21 AM, Flavio Junqueira wrote: > This is great, Guy, thanks for sharing! I think it

Re: zookeeper deployment strategy for multi data centers

2016-06-03 Thread Michael Han
ZK supports more than just majority quorum rule, there are also weights / hierarchy of groups based quorum [1]. So probably one can assign more weights to one out of two data center which can form a weight based quorum even if another DC is failing? Another idea is to instead of forming a single Z

Re: Zookeeper 3.4.8 is bundled with old version of Netty:jar

2016-06-06 Thread Michael Han
FYI branch 3.4 was recently patched with Netty 3.10 to address some of the security concerns as described in ZOOKEEPER-2423: Upgrade Netty version due to security vulnerability. https://github.com/apache/zookeeper/commit/f0a49567d545bd6584cb8ece2d491dc6c65174f8 On Mon, Jun 6, 2016 at 1:38 PM,

Re: observer changing to participant when there is no quorum

2016-06-14 Thread Michael Han
This might help: https://zookeeper.apache.org/doc/trunk/zookeeperReconfig.html section '*Changing an observer into a follower:'* "first invoke a reconfig to remove D from the configuration and then invoke a second command to add it back as a participant (follower)." On Tue, Jun 14, 2016 at 8:53 A

Re: Zookeeper 3.4.8 is bundled with old version of Netty:jar

2016-06-14 Thread Michael Han
f0a49567d545bd6584cb8ece2d491dc6c65174f8 > > > > or would we still need to backup netty 4.x support to that branch > > (eventually)? > > > > > > -rgs > > > > > > > > > > > > > > > Patrick > > > > > > On Mon,

Re: zookeeper SASL issue

2016-07-21 Thread Michael Han
'No key to store' implies the keytab file is either not present or is invalid. I'd suggest validate the keytab file out of the context of zookeeper (for example using kinit) and check if it's valid. On Thu, Jul 21, 2016 at 10:13 AM, Aneela Saleem wrote: > Hi, > > I have configured zookeeper to w

Re: one bad ip behind DNS causing zk client failure

2016-07-21 Thread Michael Han
This does not sound like a ZK bug - the contract on ZooKeeper is the IP addresses resolved from the host DNS name extracted from the connection string should have ZK server process running.. so in this case either the 'bad' IP should be removed from the record or you can use the IP address instead

Re: Config options not being loaded?

2016-07-21 Thread Michael Han
The fact that 'conf' does not print out all configuration options encoded in zoo.cfg does not necessarily mean these options are not loaded in ZK. In face the options 'conf' will print out is pretty limited and you can check those options in ZooKeeperServerConf.java

Re: Config options not being loaded?

2016-07-21 Thread Michael Han
er log but not any of the other 3 configs. Was it because I specified a > wrong value for these configs maybe? > > A 9:56PM Qui, 21 de Jul de 2016, Michael Han escreveu: > > > The fact that 'conf' does not print out all configuration options encoded > > in zoo.cfg

Re: Config options not being loaded?

2016-07-21 Thread Michael Han
ovide their insights. On Thu, Jul 21, 2016 at 2:35 PM, André Mantas wrote: > Ok thanks I'll check it out. As for my other question of using zookeeper > only in memory, what would you suggest? > > Thanks for the help so far. > > A 10:18PM Qui, 21 de Jul de 2016, Michael Ha

Re: one bad ip behind DNS causing zk client failure

2016-07-21 Thread Michael Han
ents with explicit names > for the server addresses, using a single name to represent the entire > collection.It also makes it possible to add and delete servers from the > group transparently to the clients by manipulating the DNS entry for the > group. > > -dB, > > Or

Re: How to investigate these error codes

2016-08-12 Thread Michael Han
On top of what Flavio pointed out: The liveness of a session is maintained by regular heartbeats between client and server, and heartbeats could fail due to a couple of reasons: - Network: increased latency, or network error. - Server overloaded such as IO contention / swapping; server GC took to

Re: 3.4.6 rolling restart failing with "Have smaller server identifier"

2016-08-31 Thread Michael Han
What if the rolling restart is performed from highest sid to lowest sid - 5, 4, 3, 2, 1 in this case - would this work? On Wed, Aug 31, 2016 at 12:25 PM, Irfan Hamid wrote: > Hi, > > I have a 5 node ensemble on which I restarted server.1. Ever since it is > unable to rejoin the quorum. I've even

Re: Issue with NettyServerCnxn.java

2016-09-01 Thread Michael Han
I think it is not just about IOException - the current NIOServerCnxn.sendResponse swallows any exception it caught (including the NPE this thread the related JIRA is talking about.). On the other hand, the NettyServerCnx.sendResponse only catches IOException, so there is a discrepancy in terms of t

Re: Issue with NettyServerCnxn.java

2016-09-01 Thread Michael Han
'm saying makes any sense, we > should instead remove the catch Exception block at the end of > NIOServerCnx.sendResponse. > > -Flavio > > > On 01 Sep 2016, at 20:05, Michael Han wrote: > > > > I think it is not just about IOException - the current > &

Re: november meetup at facebook

2016-09-27 Thread Michael Han
Works for me - ready to register :) On Tue, Sep 27, 2016 at 10:08 PM, Raúl Gutiérrez Segalés < r...@itevenworks.net> wrote: > On 27 September 2016 at 22:05, Benjamin Reed wrote: > > > facebook would like to host a zookeeper meetup in our offices in menlo > > park, ca on november 8th (a tuesday).

Re: november meetup at facebook (take 2)

2016-09-30 Thread Michael Han
+1, thanks! On Fri, Sep 30, 2016 at 4:25 PM, Rahul R wrote: > +1 , would love to be a part of it. > > Thanks, > ./Rahul > > On Fri, Sep 30, 2016 at 4:09 PM, Alexander Shraer > wrote: > > > +1 for me too, thanks! > > > > On Fri, Sep 30, 2016 at 3:18 PM, Ryan Zhang > > wrote: > > > > > +1. My co

Re: ZooKeeper clients does not handle new error codes properly

2016-10-04 Thread Michael Han
Hi Arshad, I am curious where the IllegalArgumentException was thrown in code in your use case - I am asking because I spotted that in KeeperException.create, we have a default fall through [1] that throws IllegalArgumentException, and if this is not the place where you observed the IllegalArgumen

Re: Zookeeper leader election takes a long time.

2016-10-11 Thread Michael Han
Hi Anand, >> We have isolated it to a test setup, where we are able to reproduce this somewhat consistently if we keep a node powered off. Do you mind share your setup / steps to reproduce if the setup only involves ZooKeeper without other dependencies? On Tue, Oct 11, 2016 at 2:56 PM, Anand Pa

Re: Zookeeper leader election takes a long time.

2016-10-13 Thread Michael Han
; > separately. If it needs to be shared with more people, I am happy to > share > > with them as well. > > > > Thanks > > Anand. > > > > On Tue, Oct 11, 2016 at 3:46 PM, Michael Han wrote: > > > >> Hi Anand, > >> > >> >&g

Re: Zookeeper leader election takes a long time.

2016-10-13 Thread Michael Han
>> it started a new round but then I seem to see the election messages from Node 2 again. Any idea why? My guess is node 2 is back online and ZK service was started. In this use case node 2 does not get offline permanently, IIUC. On Thu, Oct 13, 2016 at 3:41 PM, Ryan Zhang wrote: > Hi, Anand,

Re: Extending session lifetime with client requests

2016-10-16 Thread Michael Han
The liveness of a session is maintained by heart beats between ZK client and server, and this heartbeat comes as two forms: the periodic ping, or an explicit request (e..g getData). So yes, a client sends a getData request will extend the timeout of the session. >> In other words, will a client re

Re: Adding and removing replicas?

2016-10-20 Thread Michael Han
+1 on what Rakesh mentioned - dynamic reconfig is a great feature for this use case. For 3.4.x where dynamic reconfig feature is not available we could do a 'rolling restart' of the cluster for the use case of adding or removing a ZK server node. A rolling restart is pretty much like what you desc

Re: Adding and removing replicas?

2016-10-20 Thread Michael Han
Hi Steve, I don't think there are official ZooKeeper documentation regarding best practices for adding / removing replicas prior to 3.5.0 or how to do a rolling restart. The community is working towards 3.5.3 release which will remove the alpha tag. So 3.5.3 might be good for you if you want a sta

Re: Zookeeper fails to connect in cluster while using DNS

2016-10-26 Thread Michael Han
This looks like server logs - since the problem is ZK client fail to connect to server, could you also post client logs? For route 53, if you associate multiple IP addresses to a single DNS name configured in ZK ensemble and for some reasons one of the IP address does not have ZK server process ru

Re: Unit tests failing for modified C client

2016-10-27 Thread Michael Han
It's not obvious to me what went wrong without seeing what's actually changed. Jim, maybe you could send a git PR to https://issues.apache.org/jira/browse/ZOOKEEPER-2122 if your patch is in reasonable good shape so others can help? On Wed, Oct 26, 2016 at 2:29 PM, Jim Brower wrote: > Hi, I'm try

Re: zookeeper client seems to timeout earlier than it should

2016-11-03 Thread Michael Han
Adam, Regarding 4980RAM, these are virtual address spaces assigned to ZK. In your case, since the resident memory is 104MB, I suspect your OS has similar memory allocator that allocate per thread memory pool, something like [1]. So if a process has multiple threads (which ZK server process does),

Re: Subscribe to the ZooKeeper user mailing list

2016-11-08 Thread Michael Han
To subscribe, please send a message to user-subscr...@zookeeper.apache.org More info on https://zookeeper.apache.org/lists.html. On Tue, Nov 8, 2016 at 6:08 PM, lvxiaod...@motie.com wrote: > hi, > > Please add me, thx. > > > > lvxiaod...@motie.com > -- Cheers Michael.

Re: four letter commands not working as expected.

2016-11-30 Thread Michael Han
'ruok' is the very basic sanity check of the ZooKeeper server process - it will return ok as long as the server process is up and reachable through network (in fact, the server does not nothing but immediately return ok upon receives 'ruok' request). 'ruup' does seem a better naming semantically to

Re: ClusterId read in ZooKeeper is null

2016-12-02 Thread Michael Han
The top of call stack, 'client.ZooKeeperRegistry' in particular is from HBase code base, so this is unlikely a pure ZK issue. I'd suggest you send your question to HBase user group. On Fri, Dec 2, 2016 at 4:16 AM, Vincent Fontana <74f...@gmail.com> wrote: > Hello, > > I have and error i can't und

Re: ACL - restricting connections by IP address

2016-12-08 Thread Michael Han
Correct - if the purpose is to restrict connection requests from known ips then using iptables / firewall. A side note is ZK does have a built in IP scheme that will grant permission on znode based on IP[1], but in that case the ensemble is still open to connection requests from the world. [1] http

Re: Zookeeper in two data centers and disaster recovery

2016-12-08 Thread Michael Han
If "keep running" is defined as serving both read and write requests then no there is no way to build a reliable ZooKeeper ensemble across only two data centers simply because we can't guarantee that the single data center remaining after another one is lost contains the majority number of servers

Re: Zookeeper in two data centers and disaster recovery

2016-12-10 Thread Michael Han
olny allows conections that are read only ? or allows any > connection but fails on write operations ? > > > > > > > On Thu, Dec 8, 2016 at 10:05 PM, Michael Han wrote: > > > If "keep running" is defined as serving both read and write requests then > >

Re: security

2016-12-15 Thread Michael Han
>> is there any plan to support SSL There is ZOOKEEPER-1000 , but no one is actively pushing this. >> Does zookeeper provide KDC HA as off-shelf support? HA of KDC is not part of ZooKeeper's responsibility. KDC has its own HA solutions (i.e. t

Re: can the value of myid > 255?

2016-12-20 Thread Michael Han
>> I can not see any limitation on this myid?? There is no hard limitation in code that enforce myid is in range of [1..255] - myid is required to be in such range because it's used as server id which is used to generate session id. Each session id should be unique, so this requires the higher 8 b

Re: Zookeeper communication protocol

2017-01-02 Thread Michael Han
Wire protocol is documented at: https://github.com/apache/zookeeper/blob/master/src/zookeeper.jute There is also a tool to analyze the ZK messages, which might help for your case: https://github.com/twitter/zktraffic On Sun, Jan 1, 2017 at 11:24 PM, Ankit Shah wrote: > Hi, > > I need to debug t

Re: Zookeeper Ensemble Automation

2017-01-05 Thread Michael Han
>> I don’t see any indication when It will jump to beta or even stable. The ZooKeeper community is working on getting a Release Candidate of 3.5.3 beta build very soon (in a matter of weeks). So optimistically speaking we will reach beta very soon and hopefully have a stable release after that. >

Re: jepsen testing

2017-01-05 Thread Michael Han
Forwarding this to user mail list. On Wed, Jan 4, 2017 at 1:56 PM, Charles Allen wrote: > Hi All, > > A few years ago there was a Jepsen test for zookeeper > https://aphyr.com/posts/291-jepsen-zookeeper > > Since then there have been some improvements to zookeeper (3.5 in alpha) > and improvemen

Re: Zookeeper data loss scenarios

2017-01-05 Thread Michael Han
I suspect that you might hit ZOOKEEPER-2325 / ZOOKEEPER-261 which could possible cause data loss. Consider this case - we have A, B, C servers but for some reasons A and B got replaced by Ex

Re: are ephemeral nodes removed when client receives session expiration

2017-01-25 Thread Michael Han
>> Does ZK guarantee that ephemeral nodes from a client are removed on the sever by the time the client receives a session expiration event? "the server" is a vague definition, as ZooKeeper ensemble is composed of multiple servers :). >> Therefore, it seems to be possible for a client to connect

Re: are ephemeral nodes removed when client receives session expiration

2017-01-25 Thread Michael Han
>> If you ask whether the client will see its ephemerals upon creating a new session, then the answer is that it shouldn't because the createSession txn will be ordered necessarily before the closeSession txn, which implies that the client should not see the ephemerals. Second this - so *for the s

Re: are ephemeral nodes removed when client receives session expiration

2017-01-26 Thread Michael Han
txns. However, saying that > ZK does not guarantee a consistent view isn't correct, the view of clients > is always consistent (we guarantee sequential consistency), but they aren't > necessarily the same and they don't necessarily reflect the latest > committed state. > &g

Re: Extremely different readings on different zookeeper deployments

2017-02-07 Thread Michael Han
+1 on checking the disk set up first. Also, it is good to check the server logs on the Windows 7 boxes to see if there is anything obviously suspicious. In particular we log warnings if flushing the transaction to disk takes longer than a predefined threshold (1ms by default). Meanwhile another ex

Re: are ephemeral nodes removed when client receives session expiration

2017-02-07 Thread Michael Han
Zhang wrote: > I am a bit confused by the code > > On Jan 25, 2017, at 1:33 PM, Michael Han mailto:hanm > @cloudera.com>> wrote: > > Does ZK guarantee that ephemeral nodes from a client are removed on the > sever by the time the client receives a session expiration e

Re: Observers taking a long time to recover after network outage

2017-02-07 Thread Michael Han
>> My expectation was that it would reconnect once the network healed. Right, it is intended to behave like that, but I see there are a couple of cases that it could took longer to recover: * Network condition is not stable after outage - for example the latency is longer than what's configured f

Re: are ephemeral nodes removed when client receives session expiration

2017-02-07 Thread Michael Han
(or in > parallel as the original post seems to indicate). I think I can definitely > simulate this with a test but it will be tricky to make it pass/fail > deterministically so I didn’t try. > > Am I missing something? > > -Ryan > > > > On Feb 7, 2017, at 1:24 PM, Mic

Re: are ephemeral nodes removed when client receives session expiration

2017-02-08 Thread Michael Han
Id); > } > if (secureServerCnxnFactory != null) { > secureServerCnxnFactory.closeSession(sessionId); > } > cnxn.setSessionId(sessionId); > reopenSession(cnxn, sessionId, passwd, sessionTimeout); > } > > > > > > On Feb 7, 2017, at 3:46 PM,

Re: zookeeper and SSL

2017-02-09 Thread Michael Han
Hi Juan, >> I am wondering when 3.5 will become stable release? The current plan is to cut 3.5.3 beta release candidates this month, get it out, have folks tested and used it and iterate and eventually remove the beta tag to reach a stable release of 3.5 that replaces current 3.4. Sorry I don't h

Re: are ephemeral nodes removed when client receives session expiration

2017-02-09 Thread Michael Han
e if you find it). Furthermore, > the mark the session closing code I posted only run on the lead as far as I > can see (again, please point me to the code) > > > > Just to repeat, the race is between the learner gets the quorum > closeSession and the client issue a read. No? >

Re: ZooKeeper DOS exploit published

2017-02-15 Thread Michael Han
I have a patch for https://issues.apache.org/jira/browse/ZOOKEEPER-2693 (pull request 179 ). Feedback will be highly appreciated. It would be good that we can get this in a few days as it is both a security fix and a blocker for two ongoing releases (3.

Re: etcd performance comparison

2017-02-21 Thread Michael Han
Kudus to etcd team for making this blog and thanks for sharing. >> I feel like they're running a questionable configuration. Looks like the test configuration does not have separate dir

Re: etcd performance comparison

2017-02-22 Thread Michael Han
#x27;m more concerned about the fact that I saw a talk yesterday > >>> that > >>>> mentioned both etcd and consul as options for service discovery but > not > >>> ZK. > >>>> That feels like a big hit for our community. Orthogonal to this topic, &g

Re: Zookeeper Cross Datacenter Cluster

2017-03-06 Thread Michael Han
Back up requires replication which has two types, synchronous and asynchronous. ZooKeeper quorum provides synchronous replication. But as mentioned, 2 DC will not work no matter how. You need at least three (and in general odd numbers - for majority quorum). There are quorum weights and groups tha

Re: Zookeeper statup issue

2017-03-08 Thread Michael Han
Did your ZK server stay in this "not running" state forever - or eventually it's up and serving requests? If it's the later, then this is not a bug, because during start up ZK server has to initialize various sub systems after the server instance is initialized; so if there are client requests comi

Re: RE: Zookeeper statup issue

2017-03-09 Thread Michael Han
ssue > > > > It stays there forever. The ZK version is 3.4.6. > > We just use the bin/zkServer.sh script to start up ZK. > > It seems not reproducible again. > > Also logged a bug https://issues.apache.org/jira/browse/ZOOKEEPER-2714 > for the issue. > >

Re: shutdown Observer

2017-03-09 Thread Michael Han
The log indicates that your server socket on observer timed out after syncing with leader. It could simply because that the latency between your DCs exceeds the socket timeout configuration ZK uses. The timeout is calculated as tickTime * syncLimit so you might want tweak these values to fit the la

Re: shutdown Observer

2017-03-09 Thread Michael Han
> > datacenters, unless you know you have a solid network between them. If > your > > observers are falling offline "randomly", packet loss is a pretty likely > > culprit. > > > > On Thu, Mar 9, 2017 at 9:54 AM, Michael Han wrote: > > > > &g

Re: Client backward compat with server

2017-03-28 Thread Michael Han
Releases with fixed major.minor version are backward compatible - so 3.4.9 is backward compatible with 3.4.6 (major=3, minor=4 in this case.). Backward compatible means two different versions of client and server can be mixed - in your case it could be 3.4.9 client with 3.4.6 server. So this should

Re: Automatically obtaining zookeeper server version

2017-04-03 Thread Michael Han
Server version is also exposed through JMX - that might be a better alternative than using four letter words, which will be deprecated in future. On Mon, Apr 3, 2017 at 10:16 AM, Keith Turner wrote: > A bit ago I wrote a blog post[1] about building shaded jars to run > Fluo applications with Spa

Re: Automatically obtaining zookeeper server version

2017-04-04 Thread Michael Han
urrently > building out our infrastructure monitoring, and it would be useful to have > a more specific target date: > > Thanks, > > Marcos > > On Mon, Apr 3, 2017 at 11:56 AM, Michael Han wrote: > > > Server version is also exposed through JMX - that might be a be

Re: Zookeeper C-client API zookeeper_close does not always close the session at server

2017-04-06 Thread Michael Han
>> The documentation for zookeeper_close seems to indicate that the call will block until the session is cleaned up at the server or a failure occurs There is no guarantee that after the call of zookeeper_close the session will be cleaned up. Similar for Java client's close as well. ZOK return cod

Re: Two way (mutual) SSL authentication

2017-04-08 Thread Michael Han
Please check out https://cwiki.apache.org/confluence/display/ZOOKEEPER/ZooKeeper+SSL+User+Guide On Fri, Apr 7, 2017 at 1:12 PM, martin wrote: > Hello Is Zookeeper supporting 2-way (mutual or client authentication) > authentication SSL?I would like to use as a simple way to restrict clients > acc

[ANNOUNCE] Apache ZooKeeper 3.5.3-beta

2017-04-17 Thread Michael Han
The Apache ZooKeeper team is proud to announce Apache ZooKeeper version *3.5.3-beta*. ZooKeeper is a high-performance coordination service for distributed applications. It exposes common services - such as naming, configuration management, synchronization, and group services - in a simple interfac

Re: [ANNOUNCE] Apache ZooKeeper 3.5.3-beta

2017-04-19 Thread Michael Han
ere any docs written yet or any known pitfalls coming > > from 3.4.9 (or .10) to the 3.5.x release? > > > > On Mon, Apr 17, 2017 at 10:48 AM, Michael Han wrote: > > > > > The Apache ZooKeeper team is proud to announce Apache ZooKeeper version > > > *3.5.3-b

Re: [ANNOUNCE] Apache ZooKeeper 3.5.3-beta

2017-04-20 Thread Michael Han
ine script was a nice feature to have by > default. > > On Wed, Apr 19, 2017 at 6:02 PM, Michael Han wrote: > > > >> pitfalls coming from 3.4.9 (or .10) to the 3.5.x release? > > If coming from 3.4.9, one note is all four letter words except srvr are > > disab

Re: zookeeper node fails to communicate with Leader node

2017-04-20 Thread Michael Han
The script should be simple enough to debug. Maybe try executing the command yourself and see what happens? Could it be that JAVA_HOME was not set correctly? On Tue, Apr 18, 2017 at 1:24 PM, ravisinha0506 wrote: > I have a zookeeper cluster which includes 3 nodes. Zookeeper config is > mentione

Re: What is the role of Zookeeper and its external Integration dependencies

2017-04-24 Thread Michael Han
Some notes on the CVE - it's only affecting the C client shell, which is not part of the C client API. Even if some of the projects mentioned here use C client API (which afaik does not), they should not be impacted by this specific CVE from a functional point of view. On Fri, Apr 21, 2017 at 6:48

Re: EOFException on snapshot dump

2017-04-25 Thread Michael Han
No debug mode afaik. I suspect the snapshot was corrupted - it's partial so the read was expecting more bytes than the file actually has, thus EOFException. A workaround would be patch SnapshotFormatter so it caught the exception and print what's already loaded and parsed, instead of bail out and t

Re: Follower drops out of quorum, can't reconnect

2017-05-10 Thread Michael Han
I would suggest create a JIRA issue and attach the full log of sid 5 (if that's possible). The log posted here does not have enough information to analyze what happened on sid 5 during the 15 minutes when it's trying to connect to an established quorum. Please also attach another one or two servers

Re: Observers taking long time to serve requests

2017-05-16 Thread Michael Han
When an observer (and in general a follower) restarted, it will go through these stages: * Look for leader by starting a new leader election round and usually this is quick as there is already a leader. * Register with leader and begin synchronize phase - depends on the observer state the sync mig

Re: Observers taking long time to serve requests

2017-05-17 Thread Michael Han
ing leader to snapshotting is taking 30mins. > > Ram > > On May 16, 2017 2:07 PM, "Michael Han" wrote: > > > When an observer (and in general a follower) restarted, it will go > through > > these stages: > > > > * Look for leader by starting

Re: Ephemeral node not auto deleted after change the system time?

2017-05-19 Thread Michael Han
Please check https://issues.apache.org/jira/browse/ZOOKEEPER-2744 - if you are using 3.4.x this should be fixed in next release (3.4.11). On Fri, May 19, 2017 at 2:21 AM, Sigmond Hola wrote: > Scenario: > > 1. Client connect to zk server, and created a ephemeral sequential node; > 2. Change syst

Re: How to secure zookeeper?

2017-06-13 Thread Michael Han
We just published a blog about 4lw and security today which provides more context about history and possible solutions, hope this also helps. https://blog.cloudera.com/blog/2017/06/apache-zookeeper-four-letter-words-and-security/ On Sat, Jun 3, 2017 at 9:43 AM, Novin Novin wrote: > thanks Flavi

Re: Zookeeper is always CP or AP in terms of CAP theorem

2017-06-19 Thread Michael Han
Martin had a good blog post about this - see the ZooKeeper case study section. https://martin.kleppmann.com/2015/05/11/please-stop-calling-databases-cp-or-ap.html On Mon, Jun 19, 2017 at 11:47 AM, Kaushal Shriyan wrote: > Hi, > > I am reading the CAP theorem and zookeeper either satisfies CP or

Re: Client hangs waiting for connection

2017-06-20 Thread Michael Han
Sounds like a dead lock on client library. One idea is to instrument your client code and dump the thread stack when the wait timeouts. The stack will hopefully contain the states of various threads and provide some insights on what to look for next. On Tue, Jun 20, 2017 at 3:14 PM, John Lindwall

Re: How to add nodes to a Zookeeper 3.5.3-beta ensemble with reconfigEnabled=false

2017-06-21 Thread Michael Han
You can still do rolling restarts for 3.5.x including 3.5.3-beta. Rolling restart requires edits the zoo.cfg - the static configuration files, instead of zoo.cfg.dynamic.x, which is the dynamic reconfiguration file that stores reconfig parameters. This dynamic config file is managed by ZK and is no

Re: How to add nodes to a Zookeeper 3.5.3-beta ensemble with reconfigEnabled=false

2017-06-22 Thread Michael Han
reconfigEnabled only disables reconfig command when reconfigEnabled=false; it does not disable the feature by mute all code paths of the reconfig feature introduced in ZOOKEEPER-107. So regardless of the value of reconfigEnabled, 3.5.x ZK will create static config file and dynamic config file in an

Re: How to add nodes to a Zookeeper 3.5.3-beta ensemble with reconfigEnabled=false

2017-06-22 Thread Michael Han
e reconfig ? > > Alex > > > > > On Thu, Jun 22, 2017 at 10:18 PM, Michael Han wrote: > > > reconfigEnabled only disables reconfig command when > reconfigEnabled=false; > > it does not disable the feature by mute all code paths of the reconfig > > feature in

Re: How to add nodes to a Zookeeper 3.5.3-beta ensemble with reconfigEnabled=false

2017-06-23 Thread Michael Han
. > > Cheers > Alex > > > On Thu, Jun 22, 2017 at 11:06 PM Michael Han wrote: > > > Hi Alex, thanks for clarification! > > > > It makes sense to me that users should use reconfig instead of rolling > > upgrade moving forward. The only concern is

Re: How to add nodes to a Zookeeper 3.5.3-beta ensemble with reconfigEnabled=false

2017-06-23 Thread Michael Han
curity and would prefer to get rid of the flag. But if you must have > it, > > we have to prevent both in memory config updates (most important) and > > config file updates if reconfig is disabled. This sounds like a small > > change in quorumpeer, but perhaps I'm forgettin

Re: How to add nodes to a Zookeeper 3.5.3-beta ensemble with reconfigEnabled=false

2017-06-23 Thread Michael Han
On Fri, Jun 23, 2017 at 6:09 AM, Shawn Heisey wrote: > On 6/22/2017 11:39 PM, Alexander Shraer wrote: > > The described behavior is the intended one - in 3.5 configuration is > > part of the synced state and is updated when the server syncs with the > > leader. The only rolling upgrade I tested w

Re: java.io.EOFException

2017-06-29 Thread Michael Han
On Wed, Jun 28, 2017 at 11:59 PM, Mike Richardson wrote: > Unsubscribe > > > Unsubscribe does not work like this. To unsubscribe, please click the Unsubscribe from List <%75%73%65%72%2D%75%6E%73%75%62%73%63%72%69%62%65%40%7A%6F%6F%6B%65%65%70%65%72%2E%61%70%61%63%68%65%2E%6F%72%67> link from http

Re: What is the release cadence?

2017-07-17 Thread Michael Han
Most recently we do a stable release approximately every six months. It's a good time to start planning next 3.4 release, which will include many important bug fixes. I'll start a discussion on dev list regarding that topic later. On Mon, Jul 17, 2017 at 3:22 PM, Ben Sherman wrote: > What's the

Re: Using ClientCnxnSocketNetty over ClientCnxnSocketNIO in 3.5

2017-07-20 Thread Michael Han
>> Is any plan to move to ClientCnxnSocketNetty but default ? The plan was to replace NIO engine. See ZOOKEEPER-733. For some features (like client-server SSL) it is a requirement to switch to Netty. Netty socket implementation is less mature comparing to NIO (there are bugs reported overtime and

Re: ZooKeeper Time Synchronization

2017-07-21 Thread Michael Han
mtime etc is exposed to user to provide basic stats info; ZK itself does not use these times. These times will just be recorded as they are and carried over and does not impact anything in case leader election etc happens. On Fri, Jul 21, 2017 at 11:30 AM, Amr wrote: > Hi Abe, > > Thanks a lot f

Re: ZooKeeper Time Synchronization

2017-07-21 Thread Michael Han
One clarification on "System Time" here - ZK uses two type of time/clock * The wall-clock time, which is recorded as part of zNode stats such as mtime and is exposed to users. * The monotonic clock which ZK uses in various uses (e.g. failure detection) to measure intervals. Note in 3.4 ZK still us

Re: Using ClientCnxnSocketNetty over ClientCnxnSocketNIO in 3.5

2017-07-21 Thread Michael Han
feature. On Thu, Jul 20, 2017 at 1:18 PM, Enrico Olivelli wrote: > Michael, > Thank you for your quick response > > Il gio 20 lug 2017, 19:15 Michael Han ha scritto: > > > >> Is any plan to move to ClientCnxnSocketNetty but default ? > > > > The plan

Re: Upgrade of Zookeeper and Kafka

2017-08-16 Thread Michael Han
I think you are in the wrong thread. What Patrick replied is this: http://zookeeper-user.578899.n2.nabble.com/Upgrade-of-Zookeeper-and-Kafka-td7583242.html, and what you asked is: http://zookeeper-user.578899.n2.nabble.com/Error-connecting-to-ZooKeeper-server-td7583243.html On Wed, Aug 16, 2017 at

Re: How to prevent others from accessing our zookeeper service?

2017-08-21 Thread Michael Han
no current way to keep anonymous users > from connecting at all. > > There have been numerous proposals to use SASL to solve this problem and > there is an open PR by Michael Han > (https://github.com/apache/zookeeper/pull/118), but nothing of the sort > has been committed yet. > &g

Re: Zookeeper 3.5.3-beta reconfigure command

2017-10-13 Thread Michael Han
Please note that the link to the trunk doc https://zookeeper.apache.org/doc/trunk/zookeeperReconfig.html is very out of date - please use the documents packaged within the release. In 3.5.3 beta we disabled the reconfig by default, to use it you need enable the feature first (see the doc in the re

Re: Zookeeper 3.5.3 reconfig blocked by ACL

2017-10-17 Thread Michael Han
>> The way this is set up it seems only a superuser enabled cluster can use the reconfig command. You can also configure the ACL associated with the "/config" znode so your chosen users have permission to both read and write the config znode, after they are authenticated (using your favorite authe

Re: A question about cross-version client/server compatibility

2018-05-22 Thread Michael Han
Please check out Backward Compatibility section in https://cwiki.apache.org/confluence/display/ZOOKEEPER/ReleaseManagement. A few other comments inline. On Tue, May 22, 2018 at 2:47 PM, Shawn Heisey wrote: > Somebody on the solr-user mailing list has posed a question about > whether they can us

Re: what's the different between acceptedEpoch and currentEpoch?

2018-06-10 Thread Michael Han
The two variables serve different purposes. acceptedEpoch stores the epoch of the last NEWEPOCH message received and currentEpoch stores the epoch of the last NEWLEADER message received. They were introduced in ZOOKEEPER-335, please check that JIRA if you are interested. I think the ZAB protocol i

Re: Dose client read dirty data in zk release-3.5.4 ?

2018-06-17 Thread Michael Han
Data synchronization is already done if the execution hits the zk.startup (note the previous while loop will only break if learner receives leaders up to date message). On Wed, Jun 13, 2018 at 10:51 PM, yuzhou li wrote: > The main code is at Learner.java syncWithLeader like this: > if (qp.getTyp

[ANNOUNCE] Apache ZooKeeper 3.4.13

2018-07-16 Thread Michael Han
The Apache ZooKeeper team is proud to announce Apache ZooKeeper version 3.4. 13. ZooKeeper is a high-performance coordination service for distributed applications. It exposes common services - such as naming, configuration management, synchronization, and group services - in a simple interface so

Re: Zookeeper consistency

2018-07-17 Thread Michael Han
>> I think that Zookeeper is linearable only if there are only write operation. Yes writes are linearizable because writes are totally ordered globally. For read, a linearizable read needs to read the latest writes in the system at the point in time the read is issued; so by this definition, ZK r

Re: can not know the process name from zk log

2018-09-12 Thread Michael Han
I have a patch that basically did what OP wanted - allows client to pass more detailed information to server for client tracking. It's a useful feature, for debugging and in future, for ZK to support multi-tenancy and enforced quota. I'll try upstream that patch via https://issues.apache.org/jira/b

Re: Digest auth with classic TCP transport

2018-09-27 Thread Michael Han
>> I have not found any evidence that Zookeeper server nor (Java) client supports TLS in version 3.4.13. We support TLS for client-server (and soon server-server) connections on 3.5 releases. There is no plan to back port these features to 3.4 which is the current stable branch, because we only ba

Re: document for zk internals

2018-10-04 Thread Michael Han
>> which mentioned LeaderElection and FastLeaderElection. The document here is a little bit outdated. We deprecated the old LE implementation (LeaderElection) after 3.4.0 release, and the only leader election in use (for both stable 3.4.x and 3.5/6) is now FastLeaderElection. So now we only have a

  1   2   >