Re: Observer doesn't write transactions?
Found the answer to my question. This has been fixed in 3.4.6 and 3.5.0 https://issues.apache.org/jira/browse/ZOOKEEPER-1552 On Mon, Jun 20, 2016 at 4:11 PM, Gokul wrote: > Hi Rakesh, > > I am testing locally. 2 servers(1 leader, 1 follower) and 1 observer > > *Server1* > > # The number of milliseconds of each tick > > tickTime=2000 > > # The number of ticks that the initial > > # synchronization phase can take > > initLimit=10 > > # The number of ticks that can pass between > > # sending a request and getting an acknowledgement > > syncLimit=5 > > # the directory where the snapshot is stored. > > dataDir=/tmp/zookeeper > > # the port at which the clients will connect > > clientPort=2181 > > server.1=0.0.0.0:2888:3888 > > server.2=0.0.0.0:4888:5888 > > server.3=0.0.0.0:6888:7888:observer > > *Server 2* > > # The number of milliseconds of each tick > > tickTime=2000 > > # The number of ticks that the initial > > # synchronization phase can take > > initLimit=10 > > # The number of ticks that can pass between > > # sending a request and getting an acknowledgement > > syncLimit=5 > > # the directory where the snapshot is stored. > > dataDir=/tmp/zookeeper2 > > # the port at which the clients will connect > > clientPort=3181 > > server.1=0.0.0.0:2888:3888 > > server.2=0.0.0.0:4888:5888 > > server.3=0.0.0.0:6888:7888:observer > *Server 3 ( Observer ) conf:* > > # The number of milliseconds of each tick > > tickTime=2000 > > # The number of ticks that the initial > > # synchronization phase can take > > initLimit=10 > > # The number of ticks that can pass between > > # sending a request and getting an acknowledgement > > syncLimit=5 > > # the directory where the snapshot is stored. > > dataDir=/tmp/zookeeper3 > > # the port at which the clients will connect > > clientPort=4181 > > server.1=0.0.0.0:2888:3888 > > server.2=0.0.0.0:4888:5888 > > server.3=0.0.0.0:6888:7888:observer > > peerType=observer > > On Mon, Jun 20, 2016 at 3:59 PM, Rakesh Radhakrishnan < > rakeshr.apa...@gmail.com> wrote: > >> Hey Gokul, >> >> Observer will write the transactions into the log file like other Follower >> servers. Could you share the server side configurations. Also, can you >> compare the Observer configurations with other Follower in your cluster to >> see any differences. >> >> Regards, >> Rakesh >> >> On Mon, Jun 20, 2016 at 3:43 PM, Gokul wrote: >> >> > Hi, >> > >> > I am using ZK version 3.4.5 >> > >> > I was running a 3 ZK servers locally with an Observer and observed that >> > Observer stores each transaction it gets from leader only in in-memory >> > snapshot and doesn't write the transaction to transaction log in disk. >> Is >> > this the expected behaviour or am I missing some config parameter? >> > >> > > > > -- > Thanks and Regards, > Gokul > -- Thanks and Regards, Gokul
read under transaction
hi, I see that there is multi() function to write data under transaction. But it accepts only mutation operations. Is it possible to read under transaction somehow (so data will be consistent)? Thank you!
Re: Observer doesn't write transactions?
Hi Rakesh, I am testing locally. 2 servers(1 leader, 1 follower) and 1 observer *Server1* # The number of milliseconds of each tick tickTime=2000 # The number of ticks that the initial # synchronization phase can take initLimit=10 # The number of ticks that can pass between # sending a request and getting an acknowledgement syncLimit=5 # the directory where the snapshot is stored. dataDir=/tmp/zookeeper # the port at which the clients will connect clientPort=2181 server.1=0.0.0.0:2888:3888 server.2=0.0.0.0:4888:5888 server.3=0.0.0.0:6888:7888:observer *Server 2* # The number of milliseconds of each tick tickTime=2000 # The number of ticks that the initial # synchronization phase can take initLimit=10 # The number of ticks that can pass between # sending a request and getting an acknowledgement syncLimit=5 # the directory where the snapshot is stored. dataDir=/tmp/zookeeper2 # the port at which the clients will connect clientPort=3181 server.1=0.0.0.0:2888:3888 server.2=0.0.0.0:4888:5888 server.3=0.0.0.0:6888:7888:observer *Server 3 ( Observer ) conf:* # The number of milliseconds of each tick tickTime=2000 # The number of ticks that the initial # synchronization phase can take initLimit=10 # The number of ticks that can pass between # sending a request and getting an acknowledgement syncLimit=5 # the directory where the snapshot is stored. dataDir=/tmp/zookeeper3 # the port at which the clients will connect clientPort=4181 server.1=0.0.0.0:2888:3888 server.2=0.0.0.0:4888:5888 server.3=0.0.0.0:6888:7888:observer peerType=observer On Mon, Jun 20, 2016 at 3:59 PM, Rakesh Radhakrishnan < rakeshr.apa...@gmail.com> wrote: > Hey Gokul, > > Observer will write the transactions into the log file like other Follower > servers. Could you share the server side configurations. Also, can you > compare the Observer configurations with other Follower in your cluster to > see any differences. > > Regards, > Rakesh > > On Mon, Jun 20, 2016 at 3:43 PM, Gokul wrote: > > > Hi, > > > > I am using ZK version 3.4.5 > > > > I was running a 3 ZK servers locally with an Observer and observed that > > Observer stores each transaction it gets from leader only in in-memory > > snapshot and doesn't write the transaction to transaction log in disk. Is > > this the expected behaviour or am I missing some config parameter? > > > -- Thanks and Regards, Gokul
Re: Observer doesn't write transactions?
Hey Gokul, Observer will write the transactions into the log file like other Follower servers. Could you share the server side configurations. Also, can you compare the Observer configurations with other Follower in your cluster to see any differences. Regards, Rakesh On Mon, Jun 20, 2016 at 3:43 PM, Gokul wrote: > Hi, > > I am using ZK version 3.4.5 > > I was running a 3 ZK servers locally with an Observer and observed that > Observer stores each transaction it gets from leader only in in-memory > snapshot and doesn't write the transaction to transaction log in disk. Is > this the expected behaviour or am I missing some config parameter? >
Observer doesn't write transactions?
Hi, I am using ZK version 3.4.5 I was running a 3 ZK servers locally with an Observer and observed that Observer stores each transaction it gets from leader only in in-memory snapshot and doesn't write the transaction to transaction log in disk. Is this the expected behaviour or am I missing some config parameter?
Re: SSL between java client and zookeeper?
Thanks for reporting back, Vaibhav. -Flavio > On 17 Jun 2016, at 22:04, Vaibhav Devekar wrote: > > Never mind, I figured that out. Quite silly of me. I did not realize that > CLIENT_JVMFLAGS was meant not just for zkCli but also for java clients! > > I was providing the keystore and trustore values via the java.net.ssl > arguments. Having these separate JVM arguments does make sense. One may > want the SSL to be limited to zookeeper connections only. > > > --- > Vaibhav Devekar > > > > On Fri, Jun 17, 2016 at 1:14 PM, Devekar, Vaibhav < > vaibhav.deve...@staples.com> wrote: > >> I¹m using 3.5.1-alpha. I did forget to update the version for the java >> library. Thank you for pointing that out. However, I still get the same >> error after using the latest. >> Is the zookeeper API supposed to work out of the box? The only thing I did >> was add keystore and trustore values as JVM arguments to tomcat. I also >> configured them in tomcat¹s server.xml >> >> >> -- >> Vaibhav Devekar >> Dotcom-Search | Seattle Dev Lab >> >> >> >> >> On 6/17/16, 1:39 AM, "Flavio Junqueira" wrote: >> >>> Hi there, >>> >>> Which version of the client are you using? This is available only on the >>> 3.5 branch and trunk. >>> >>> -Flavio >>> On 17 Jun 2016, at 00:29, Vaibhav Devekar wrote: Re-sending since I probably wasn't subscribed before. --- Vaibhav Devekar On Thu, Jun 16, 2016 at 4:23 PM, Vaibhav Devekar wrote: > Hi all, > > I'm using zookeeper for dynamic config management among spring apps > hosted > on many servers. I'm trying to employ SSL for communication between > these > java app and zookeeper since these properties can be sensitive > information > such as database passwords. > > Based on this guide - > > >> https://cwiki.apache.org/confluence/display/ZOOKEEPER/ZooKeeper+SSL+User > +Guide, > I was able to test out SSL for zkCli and zookeeper. I was also able to > verify that two java web apps can do 2-way SSL with each other. I'm now > trying to do the same with a java client(spring webapp) and zookeeper. > However, it hasn't worked so far. The zookeeper log says: > > 2016-06-16 14:42:56,379 [myid:] - WARN [New I/O worker > #21:NettyServerCnxnFactory$CnxnChannelHandler@141] - Exception caught > [id: 0x265bca3f, /fe80:0:0:0:0:0:0:1%1:61137 => > /fe80:0:0:0:0:0:0:1%1:2281] > EXCEPTION: org.jboss.netty.handler.ssl.NotSslRecordException: not an > SSL/TLS record: > > 002dea600010 > 00 > org.jboss.netty.handler.ssl.NotSslRecordException: not an SSL/TLS > record: > > 002dea600010 > 00 > > > Any pointers would be great. Does java API for zookeeper even support > SSL? > > Code example: https://github.com/devekar/sslDemo > > Thank you. > > --- > Vaibhav Devekar > > > >>> >> >>