hadoop-zookeeper-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Martin Waite <waite....@gmail.com>
Subject Re: unit test failure
Date Wed, 04 Aug 2010 08:31:37 GMT
Hi Sergey,

I had a feeling that I was missing something important.  Thanks.

On running Ant, I tripped over the firewall trying to download Ivy.  Ant
needed to know about our internet proxy:

export ANT_OPTS="-Dhttp.proxyHost=proxy -Dhttp.proxyPort=8080"

The build reported a few errors, but seems to have completed:

vm-026-lenny-mw$ ant
Buildfile: build.xml

init:

ivy-download:
      [get] Getting:
http://repo2.maven.org/maven2/org/apache/ivy/ivy/2.1.0/ivy-2.1.0.jar
      [get] To: /home/martin/zookeeper-3.3.1/src/java/lib/ivy-2.1.0.jar

ivy-taskdef:

ivy-init:

ivy-retrieve:
[ivy:retrieve] :: Ivy 2.1.0 - 20090925235825 :: http://ant.apache.org/ivy/::
[ivy:retrieve] :: loading settings :: file =
/home/martin/zookeeper-3.3.1/ivysettings.xml
[ivy:retrieve] :: resolving dependencies ::
org.apache.zookeeper#zookeeper;3.3.2-dev
[ivy:retrieve]  confs: [default]
[ivy:retrieve]  found log4j#log4j;1.2.15 in maven2
[ivy:retrieve]  found jline#jline;0.9.94 in maven2
[ivy:retrieve] downloading
http://repo1.maven.org/maven2/log4j/log4j/1.2.15/log4j-1.2.15.jar ...
[ivy:retrieve] ........................................
[ivy:retrieve] ....
[ivy:retrieve] ........
[ivy:retrieve] ..................................
[ivy:retrieve] ..................................
[ivy:retrieve] .....................................
[ivy:retrieve] .................................
[ivy:retrieve] .............................................
[ivy:retrieve] ................................. (382kB)
[ivy:retrieve] .. (0kB)
[ivy:retrieve]  [SUCCESSFUL ] log4j#log4j;1.2.15!log4j.jar (15533ms)
[ivy:retrieve] downloading
http://repo1.maven.org/maven2/jline/jline/0.9.94/jline-0.9.94.jar ...
[ivy:retrieve] ...........................
[ivy:retrieve] .....
[ivy:retrieve] ......... (85kB)
[ivy:retrieve] .. (0kB)
[ivy:retrieve]  [SUCCESSFUL ] jline#jline;0.9.94!jline.jar (8232ms)
[ivy:retrieve] :: resolution report :: resolve 11530ms :: artifacts dl
23769ms

---------------------------------------------------------------------
        |                  |            modules            ||   artifacts
|
        |       conf       | number| search|dwnlded|evicted||
number|dwnlded|

---------------------------------------------------------------------
        |      default     |   2   |   2   |   2   |   0   ||   2   |   2
|

---------------------------------------------------------------------
[ivy:retrieve] :: retrieving :: org.apache.zookeeper#zookeeper
[ivy:retrieve]  confs: [default]
[ivy:retrieve]  2 artifacts copied, 0 already retrieved (467kB/24ms)

clover.setup:

clover.info:

clover:

jute:

compile_jute_uptodate:

compile_jute:

ver-gen:
    [javac] Compiling 1 source file to
/home/martin/zookeeper-3.3.1/build/classes

svn-revision:
    [mkdir] Created dir: /home/martin/zookeeper-3.3.1/.revision
     [exec] /home/martin/zookeeper-3.3.1/src/lastRevision.sh: line 19: svn:
command not found

version-info:
     [java] All version-related parameters must be valid integers!
     [java] Exception in thread "main" java.lang.NumberFormatException: For
input string: "2-dev"
     [java]     at
java.lang.NumberFormatException.forInputString(NumberFormatException.java:48)
     [java]     at java.lang.Integer.parseInt(Integer.java:458)
     [java]     at java.lang.Integer.parseInt(Integer.java:499)
     [java]     at
org.apache.zookeeper.version.util.VerGen.main(VerGen.java:131)
     [java] Java Result: 1

build-generated:
    [javac] Compiling 46 source files to
/home/martin/zookeeper-3.3.1/build/classes

compile:
    [javac] Compiling 113 source files to
/home/martin/zookeeper-3.3.1/build/classes

jar:
      [jar] Building jar:
/home/martin/zookeeper-3.3.1/build/zookeeper-3.3.2-dev.jar

BUILD SUCCESSFUL
Total time: 59 seconds

What I do not understand now is why the process has built 3.3.2-dev within
the 3.3.1 source bundle.  Did the build download a new version ?

regards,
Martin



On 3 August 2010 18:18, Sergey Doroshenko <dorserg@gmail.com> wrote:

> 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.134@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 <dorserg@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.134@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_INFO@zookeeper_init@727:
> Initiating
> > > > client
> > > > connection, host=127.0.0.1:22181 sessionTimeout=10000
> > watcher=0x8078ed8
> > > > sessionId=0 sessionPasswd=<null> context=0xbfffd73c flags=0
> > > > 2010-08-03 13:00:14,553:11391:ZOO_ERROR@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.134@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 <mahadev@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.134@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
> > > > >> > Zookeeper_operations::testOperationsAndDisconnectConcurrently2
:
> > > > elapsed
> > > > >> 0 :
> > > > >> > OK
> > > > >> > Zookeeper_operations::testConcurrentOperations1 : elapsed
206 :
> 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 2 :
OK
> > > > >> > Zookeeper_init::testNonexistentHost : elapsed 108 : 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
> > > > >> >
> > > > >> > This appears to come from tests/TestClient.cc - but beyond
that,
> > it
> > > is
> > > > >> hard
> > > > >> > to identify which equality assertion failed.
> > > > >> >
> > > > >> > Help !
> > > > >> >
> > > > >> > regards,
> > > > >> > Martin
> > > > >>
> > > > >>
> > > > >
> > > >
> > >
> > >
> > >
> > > --
> > > Regards, Sergey
> > >
> >
>
>
>
> --
> Regards, Sergey
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message