Re: unit test failure
I don't really understand how the unit test system is meant to work. Yes, C tests start ZK server and are tested against it. There are a few that use mocked server, but that's a legacy code I think. Re the problem itself: 1) check ZK server logs at build/tmp/ , maybe log contains some info about why the server fails to start 2) are you absolutely sure you have no zk processes running? I usually do ps -ef | grep zoo and it always helps On Tue, Aug 3, 2010 at 6:45 PM, Martin Waite waite@gmail.com wrote: Hi, A little more information. The file TEST-Zookeeper_simpleSystem-st.txt contains some log data: 2010-08-03 13:00:13,550:11391:zoo_i...@zookeeper_init@727: Initiating client connection, host=127.0.0.1:22181 sessionTimeout=1 watcher=0x8078ed8 sessionId=0 sessionPasswd=null context=0xbfffd73c flags=0 2010-08-03 13:00:14,553:11391:zoo_er...@handle_socket_error_msg@1579: Socket [127.0.0.1:22181] zk retcode=-4, errno=111(Connection refused): server refused to accept the client I don't really understand how the unit test system is meant to work. Does it start a zk server process and then run tests against that ? Or are the underlying libraries being tested without using a zk server ? regards, Martin On 3 August 2010 13:02, Martin Waite waite@gmail.com wrote: Hi Mahadev, Sorry for the delay in replying: I have been away. I have rebuilt my debian lenny machine, and started again. Again, I have the same problem: ~/zookeeper-3.3.1/src/c$ make run-check make zktest-st zktest-mt make[1]: Entering directory `/home/martin/zookeeper-3.3.1/src/c' make[1]: `zktest-st' is up to date. make[1]: `zktest-mt' is up to date. make[1]: Leaving directory `/home/martin/zookeeper-3.3.1/src/c' ./zktest-st ./tests/zkServer.sh: line 52: kill: (9432) - No such process ZooKeeper server startedRunning Zookeeper_operations::testPing : elapsed 1 : OK Zookeeper_operations::testTimeoutCausedByWatches1 : elapsed 0 : OK Zookeeper_operations::testTimeoutCausedByWatches2 : elapsed 0 : OK Zookeeper_operations::testOperationsAndDisconnectConcurrently1 : elapsed 1 : OK Zookeeper_operations::testOperationsAndDisconnectConcurrently2 : elapsed 0 : OK Zookeeper_operations::testConcurrentOperations1 : elapsed 203 : OK Zookeeper_init::testBasic : elapsed 0 : OK Zookeeper_init::testAddressResolution : elapsed 0 : OK Zookeeper_init::testMultipleAddressResolution : elapsed 0 : OK Zookeeper_init::testNullAddressString : elapsed 0 : OK Zookeeper_init::testEmptyAddressString : elapsed 0 : OK Zookeeper_init::testOneSpaceAddressString : elapsed 0 : OK Zookeeper_init::testTwoSpacesAddressString : elapsed 0 : OK Zookeeper_init::testInvalidAddressString1 : elapsed 0 : OK Zookeeper_init::testInvalidAddressString2 : elapsed 1 : OK Zookeeper_init::testNonexistentHost : elapsed 1 : OK Zookeeper_init::testOutOfMemory_init : elapsed 0 : OK Zookeeper_init::testOutOfMemory_getaddrs1 : elapsed 0 : OK Zookeeper_init::testOutOfMemory_getaddrs2 : elapsed 0 : OK Zookeeper_init::testPermuteAddrsList : elapsed 0 : OK Zookeeper_close::testCloseUnconnected : elapsed 0 : OK Zookeeper_close::testCloseUnconnected1 : elapsed 0 : OK Zookeeper_close::testCloseConnected1 : elapsed 0 : OK Zookeeper_close::testCloseFromWatcher1 : elapsed 0 : OK Zookeeper_simpleSystem::testAsyncWatcherAutoResetterminate called after throwing an instance of 'CppUnit::Exception' what(): equality assertion failed - Expected: -101 - Actual : -4 make: *** [run-check] Aborted I have checked for a stale zk process: there are none. Any ideas please ? regards, Martin On 14 July 2010 18:37, Mahadev Konar maha...@yahoo-inc.com wrote: HI Martin, Can you check if you have a stale java process (ZooKeeperServer) running on your machine? That might cause some issues with the tests. Thanks mahadev On 7/14/10 8:03 AM, Martin Waite waite@gmail.com wrote: Hi, I am attempting to build the C client on debian lenny. autoconf, configure, make and make install all appear to work cleanly. I ran: autoreconf -if ./configure make make install make run-check However, the unit tests fail: $ make run-check make zktest-st zktest-mt make[1]: Entering directory `/home/martin/zookeeper-3.3.1/src/c' make[1]: `zktest-st' is up to date. make[1]: `zktest-mt' is up to date. make[1]: Leaving directory `/home/martin/zookeeper-3.3.1/src/c' ./zktest-st ./tests/zkServer.sh: line 52: kill: (17711) - No such process ZooKeeper server startedRunning Zookeeper_operations::testPing : elapsed 1 : OK Zookeeper_operations::testTimeoutCausedByWatches1 : elapsed 0 : OK Zookeeper_operations::testTimeoutCausedByWatches2 : elapsed 0 : OK Zookeeper_operations::testOperationsAndDisconnectConcurrently1 : elapsed 2 : OK
Re: unit test failure
Yes. It seems you didn't build the server actually. In the main directory (from where you ran and compile_jute) run ant. This will invoke ant's default target which will build the server code. After that run either make run-check from src/c, or ant test-core-cppunit from the main dir. On Tue, Aug 3, 2010 at 7:51 PM, Martin Waite waite@gmail.com wrote: Hi Sergey, Thanks for the hints. 1) I cannot find any ZK server logs. I have no tmp directory inside build directory. This sounds bad. 2) I have run ps -ef | grep zoo. There are no zk processes running. I wonder if I have missed some steps. So far I have: 1. built a new debian lenny host 2. sudo apt-get install autoconf libtool libcppunit-dev sun-java6-jdk ant 3. tar zxf zookeeper-3.3.1.tar.gz 4. cd zookeeper-3.3.1 5. ant compile_jute 6. cd src/c 7. autoreconf -if 8. ./configure 9. make run-check Do I have to do something before building the client code to install the ZK server code, or will it use the one in the unpacked tarball ? regards, Martin On 3 August 2010 17:14, Sergey Doroshenko dors...@gmail.com wrote: I don't really understand how the unit test system is meant to work. Yes, C tests start ZK server and are tested against it. There are a few that use mocked server, but that's a legacy code I think. Re the problem itself: 1) check ZK server logs at build/tmp/ , maybe log contains some info about why the server fails to start 2) are you absolutely sure you have no zk processes running? I usually do ps -ef | grep zoo and it always helps On Tue, Aug 3, 2010 at 6:45 PM, Martin Waite waite@gmail.com wrote: Hi, A little more information. The file TEST-Zookeeper_simpleSystem-st.txt contains some log data: 2010-08-03 13:00:13,550:11391:zoo_i...@zookeeper_init@727: Initiating client connection, host=127.0.0.1:22181 sessionTimeout=1 watcher=0x8078ed8 sessionId=0 sessionPasswd=null context=0xbfffd73c flags=0 2010-08-03 13:00:14,553:11391:zoo_er...@handle_socket_error_msg@1579: Socket [127.0.0.1:22181] zk retcode=-4, errno=111(Connection refused): server refused to accept the client I don't really understand how the unit test system is meant to work. Does it start a zk server process and then run tests against that ? Or are the underlying libraries being tested without using a zk server ? regards, Martin On 3 August 2010 13:02, Martin Waite waite@gmail.com wrote: Hi Mahadev, Sorry for the delay in replying: I have been away. I have rebuilt my debian lenny machine, and started again. Again, I have the same problem: ~/zookeeper-3.3.1/src/c$ make run-check make zktest-st zktest-mt make[1]: Entering directory `/home/martin/zookeeper-3.3.1/src/c' make[1]: `zktest-st' is up to date. make[1]: `zktest-mt' is up to date. make[1]: Leaving directory `/home/martin/zookeeper-3.3.1/src/c' ./zktest-st ./tests/zkServer.sh: line 52: kill: (9432) - No such process ZooKeeper server startedRunning Zookeeper_operations::testPing : elapsed 1 : OK Zookeeper_operations::testTimeoutCausedByWatches1 : elapsed 0 : OK Zookeeper_operations::testTimeoutCausedByWatches2 : elapsed 0 : OK Zookeeper_operations::testOperationsAndDisconnectConcurrently1 : elapsed 1 : OK Zookeeper_operations::testOperationsAndDisconnectConcurrently2 : elapsed 0 : OK Zookeeper_operations::testConcurrentOperations1 : elapsed 203 : OK Zookeeper_init::testBasic : elapsed 0 : OK Zookeeper_init::testAddressResolution : elapsed 0 : OK Zookeeper_init::testMultipleAddressResolution : elapsed 0 : OK Zookeeper_init::testNullAddressString : elapsed 0 : OK Zookeeper_init::testEmptyAddressString : elapsed 0 : OK Zookeeper_init::testOneSpaceAddressString : elapsed 0 : OK Zookeeper_init::testTwoSpacesAddressString : elapsed 0 : OK Zookeeper_init::testInvalidAddressString1 : elapsed 0 : OK Zookeeper_init::testInvalidAddressString2 : elapsed 1 : OK Zookeeper_init::testNonexistentHost : elapsed 1 : OK Zookeeper_init::testOutOfMemory_init : elapsed 0 : OK Zookeeper_init::testOutOfMemory_getaddrs1 : elapsed 0 : OK Zookeeper_init::testOutOfMemory_getaddrs2 : elapsed 0 : OK Zookeeper_init::testPermuteAddrsList : elapsed 0 : OK Zookeeper_close::testCloseUnconnected : elapsed 0 : OK Zookeeper_close::testCloseUnconnected1 : elapsed 0 : OK Zookeeper_close::testCloseConnected1 : elapsed 0 : OK Zookeeper_close::testCloseFromWatcher1 : elapsed 0 : OK Zookeeper_simpleSystem::testAsyncWatcherAutoResetterminate called after throwing an instance of 'CppUnit::Exception' what(): equality assertion failed - Expected: -101 - Actual : -4 make: *** [run-check] Aborted I have checked for a stale zk process: there are none
Re: total # nodes
You may want to use 4-letter-word commands: http://hadoop.apache.org/zookeeper/docs/current/zookeeperAdmin.html#sc_zkCommands srvr command dumps node count along with other information. Also, there's a patch integrated to trunk, at https://issues.apache.org/jira/browse/ZOOKEEPER-744, which introduces mntr command that also dumps a lot of useful data, in particular # of nodes and approx data size. On Sat, Jul 24, 2010 at 5:31 PM, Maarten Koopmans maar...@vrijheid.netwrote: Hi, Relating to the previous question: is there a quick way to get the total # nodes in a Zookeeper cluster (so I can determine utilization)? Best, Maarten -- Regards, Sergey http://dorserg.com
Re: building client tools
Andrei is right. Also, libcppunit-dev might be neeeded too. sudo apt-get install libcppunit-1.12-1 libcppunit-dev (I'm assuming 1.12 is the latest version) should do the trick On Tue, Jul 13, 2010 at 8:39 PM, Andrei Savu savu.and...@gmail.com wrote: Hi, In this case I think you have to install libcppunit (should work using apt-get). I believe that should be enough but I don't really remember what else I've installed the first time I compiled the c client. Let me know what else was needed. I would like to submit a patch to update the README file in order to avoid this problem in the future. Thanks. On Tue, Jul 13, 2010 at 8:09 PM, Martin Waite waite@gmail.com wrote: Hi, I am trying to build the c client on debian lenny for zookeeper 3.3.1. autoreconf -if configure.ac:33: warning: macro `AM_PATH_CPPUNIT' not found in library configure.ac:33: warning: macro `AM_PATH_CPPUNIT' not found in library configure.ac:33: error: possibly undefined macro: AM_PATH_CPPUNIT If this token and others are legitimate, please use m4_pattern_allow. See the Autoconf documentation. autoreconf: /usr/bin/autoconf failed with exit status: 1 I probably need to install some required tools. Is there a list of what tools are needed to build this please ? regards, Martin -- Andrei Savu - http://andreisavu.ro/ -- Regards, Sergey
Re: [GSoC 2010] Zookeeper Read-Only Mode
I created a wiki page that outlines how I'm thinking to implement read-only mode: http://wiki.apache.org/hadoop/ZooKeeper/GSoCReadOnlyMode This feature can change both client library and server side, and before implementing it, it would be great to hear some feedback from the community. I'd like to ask ZK developers what do they think about current approach, and ask ZK users to also share their thoughts, use cases where read-only mode would be beneficial and how current approach fits to them and so on. P.S. For zookeeper-user@ subscribers who didn't previously see this email: I'm Sergey Doroshenko, accepted GSoC-2010 applicant, and I'll be implementing read-only mode for Zookeeper. Any feedback is greatly appreciated and would be really helpful. On Mon, Apr 19, 2010 at 5:51 PM, Vishal K vishalm...@gmail.com wrote: Hi Sergey, This is a very useful feature. We would be happy to have it on our cluster. One small suggestion - It will be nice if you could document things along the way while going through the ZK code or testing ZK behavior. Since it will cover one of the core logic of ZK it will helpful to other contributors as well. Thanks. Regards, -Vishal On Fri, Apr 16, 2010 at 6:43 PM, Sergey Doroshenko dors...@gmail.com wrote: Hi, I'm Sergey Doroshenko, GSoC applicant, and I've submitted application for enabling read-only mode in Zookeeper. I worked with Zookeeper during my internship this winter, and liked it much. Now I'm very eager to contribute to it. Task for enabling read-only mode in ZK ( https://issues.apache.org/jira/browse/ZOOKEEPER-704) looks interesting and, as we discussed with Henry, has quite practical importance. Please check my proposal here: http://docs.google.com/View?id=dghqvqdd_51ffvhcsdb , and let me know if you have some thoughts or suggestions about it. Thanks! -- Regards, Sergey -- Regards, Sergey