[ 
https://issues.apache.org/jira/browse/ZOOKEEPER-1477?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13490579#comment-13490579
 ] 

Helen Williamson commented on ZOOKEEPER-1477:
---------------------------------------------

I'm also experiencing a similar problem using the zkCli shell script. I've 
started up 5 zookeeper servers using QuorumPeerMain from the zookeeper jar.

With Java 1.6.0_37 I get the following output:

{code}
MC00635:bin helen.williamson$ ./zkCli.sh
Connecting to localhost:2181
2012-11-05 10:50:35,648 [myid:] - INFO  [main:Environment@100] - Client 
environment:zookeeper.version=3.4.4-1386507, built on 09/17/2012 08:33 GMT
2012-11-05 10:50:35,651 [myid:] - INFO  [main:Environment@100] - Client 
environment:host.name=dhcp-192-168-101-135.tea.mindcandy.com
2012-11-05 10:50:35,651 [myid:] - INFO  [main:Environment@100] - Client 
environment:java.version=1.6.0_37
2012-11-05 10:50:35,651 [myid:] - INFO  [main:Environment@100] - Client 
environment:java.vendor=Apple Inc.
2012-11-05 10:50:35,652 [myid:] - INFO  [main:Environment@100] - Client 
environment:java.home=/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home
2012-11-05 10:50:35,652 [myid:] - INFO  [main:Environment@100] - Client 
environment:java.class.path=/Users/helen.williamson/workspace/bartender/target/zookeeper/bin/../build/classes:/Users/helen.williamson/workspace/bartender/target/zookeeper/bin/../build/lib/*.jar:/Users/helen.williamson/workspace/bartender/target/zookeeper/bin/../lib/slf4j-log4j12-1.6.1.jar:/Users/helen.williamson/workspace/bartender/target/zookeeper/bin/../lib/slf4j-api-1.6.1.jar:/Users/helen.williamson/workspace/bartender/target/zookeeper/bin/../lib/netty-3.2.2.Final.jar:/Users/helen.williamson/workspace/bartender/target/zookeeper/bin/../lib/log4j-1.2.15.jar:/Users/helen.williamson/workspace/bartender/target/zookeeper/bin/../lib/jline-0.9.94.jar:/Users/helen.williamson/workspace/bartender/target/zookeeper/bin/../zookeeper-3.4.4.jar:/Users/helen.williamson/workspace/bartender/target/zookeeper/bin/../src/java/lib/*.jar:/Users/helen.williamson/workspace/bartender/target/zookeeper/bin/../conf:
2012-11-05 10:50:35,652 [myid:] - INFO  [main:Environment@100] - Client 
environment:java.library.path=.:/Library/Java/Extensions:/System/Library/Java/Extensions:/usr/lib/java
2012-11-05 10:50:35,653 [myid:] - INFO  [main:Environment@100] - Client 
environment:java.io.tmpdir=/var/folders/4l/yzr37v6s3zz8hfsggnjmzbg00000gp/T/
2012-11-05 10:50:35,653 [myid:] - INFO  [main:Environment@100] - Client 
environment:java.compiler=<NA>
2012-11-05 10:50:35,653 [myid:] - INFO  [main:Environment@100] - Client 
environment:os.name=Mac OS X
2012-11-05 10:50:35,654 [myid:] - INFO  [main:Environment@100] - Client 
environment:os.arch=x86_64
2012-11-05 10:50:35,654 [myid:] - INFO  [main:Environment@100] - Client 
environment:os.version=10.7.5
2012-11-05 10:50:35,654 [myid:] - INFO  [main:Environment@100] - Client 
environment:user.name=helen.williamson
2012-11-05 10:50:35,655 [myid:] - INFO  [main:Environment@100] - Client 
environment:user.home=/Users/helen.williamson
2012-11-05 10:50:35,655 [myid:] - INFO  [main:Environment@100] - Client 
environment:user.dir=/Users/helen.williamson/workspace/bartender/target/zookeeper-3.4.4/bin
2012-11-05 10:50:35,656 [myid:] - INFO  [main:ZooKeeper@433] - Initiating 
client connection, connectString=localhost:2181 sessionTimeout=30000 
watcher=org.apache.zookeeper.ZooKeeperMain$MyWatcher@6b4da8f4
Welcome to ZooKeeper!
2012-11-05 10:50:35,687 [myid:] - INFO  
[main-SendThread(localhost:2181):ClientCnxn$SendThread@966] - Opening socket 
connection to server localhost/127.0.0.1:2181. Will not attempt to authenticate 
using SASL (Unable to locate a login configuration)
JLine support is enabled
2012-11-05 10:50:35,694 [myid:] - INFO  
[main-SendThread(localhost:2181):ClientCnxn$SendThread@849] - Socket connection 
established to localhost/127.0.0.1:2181, initiating session
2012-11-05 10:50:35,715 [myid:] - INFO  
[main-SendThread(localhost:2181):ClientCnxn$SendThread@1207] - Session 
establishment complete on server localhost/127.0.0.1:2181, sessionid = 
0x13ad009f0770002, negotiated timeout = 30000

WATCHER::

WatchedEvent state:SyncConnected type:None path:null
[zk: localhost:2181(CONNECTED) 0] ls /
[zookeeper]
{code}

With Java 1.7.0_09 I get:

{code}
MC00635:bin helen.williamson$ ./zkCli.sh
Connecting to localhost:2181
2012-11-05 10:45:44,634 [myid:] - INFO  [main:Environment@100] - Client 
environment:zookeeper.version=3.4.4-1386507, built on 09/17/2012 08:33 GMT
2012-11-05 10:45:44,674 [myid:] - INFO  [main:Environment@100] - Client 
environment:host.name=<NA>
2012-11-05 10:45:44,674 [myid:] - INFO  [main:Environment@100] - Client 
environment:java.version=1.7.0_09
2012-11-05 10:45:44,675 [myid:] - INFO  [main:Environment@100] - Client 
environment:java.vendor=Oracle Corporation
2012-11-05 10:45:44,676 [myid:] - INFO  [main:Environment@100] - Client 
environment:java.home=/Library/Java/JavaVirtualMachines/jdk1.7.0_09.jdk/Contents/Home/jre
2012-11-05 10:45:44,677 [myid:] - INFO  [main:Environment@100] - Client 
environment:java.class.path=/Users/helen.williamson/workspace/bartender/target/zookeeper/bin/../build/classes:/Users/helen.williamson/workspace/bartender/target/zookeeper/bin/../build/lib/*.jar:/Users/helen.williamson/workspace/bartender/target/zookeeper/bin/../lib/slf4j-log4j12-1.6.1.jar:/Users/helen.williamson/workspace/bartender/target/zookeeper/bin/../lib/slf4j-api-1.6.1.jar:/Users/helen.williamson/workspace/bartender/target/zookeeper/bin/../lib/netty-3.2.2.Final.jar:/Users/helen.williamson/workspace/bartender/target/zookeeper/bin/../lib/log4j-1.2.15.jar:/Users/helen.williamson/workspace/bartender/target/zookeeper/bin/../lib/jline-0.9.94.jar:/Users/helen.williamson/workspace/bartender/target/zookeeper/bin/../zookeeper-3.4.4.jar:/Users/helen.williamson/workspace/bartender/target/zookeeper/bin/../src/java/lib/*.jar:/Users/helen.williamson/workspace/bartender/target/zookeeper/bin/../conf:
2012-11-05 10:45:44,678 [myid:] - INFO  [main:Environment@100] - Client 
environment:java.library.path=/Users/helen.williamson/Library/Java/Extensions:/Library/Java/Extensions:/Network/Library/Java/Extensions:/System/Library/Java/Extensions:/usr/lib/java:.
2012-11-05 10:45:44,678 [myid:] - INFO  [main:Environment@100] - Client 
environment:java.io.tmpdir=/var/folders/4l/yzr37v6s3zz8hfsggnjmzbg00000gp/T/
2012-11-05 10:45:44,679 [myid:] - INFO  [main:Environment@100] - Client 
environment:java.compiler=<NA>
2012-11-05 10:45:44,679 [myid:] - INFO  [main:Environment@100] - Client 
environment:os.name=Mac OS X
2012-11-05 10:45:44,680 [myid:] - INFO  [main:Environment@100] - Client 
environment:os.arch=x86_64
2012-11-05 10:45:44,680 [myid:] - INFO  [main:Environment@100] - Client 
environment:os.version=10.7.5
2012-11-05 10:45:44,681 [myid:] - INFO  [main:Environment@100] - Client 
environment:user.name=helen.williamson
2012-11-05 10:45:44,682 [myid:] - INFO  [main:Environment@100] - Client 
environment:user.home=/Users/helen.williamson
2012-11-05 10:45:44,682 [myid:] - INFO  [main:Environment@100] - Client 
environment:user.dir=/Users/helen.williamson/workspace/bartender/target/zookeeper-3.4.4/bin
2012-11-05 10:45:44,684 [myid:] - INFO  [main:ZooKeeper@433] - Initiating 
client connection, connectString=localhost:2181 sessionTimeout=30000 
watcher=org.apache.zookeeper.ZooKeeperMain$MyWatcher@6ad5d980
Welcome to ZooKeeper!
2012-11-05 10:45:44,863 [myid:] - INFO  
[main-SendThread(localhost:2181):ClientCnxn$SendThread@966] - Opening socket 
connection to server localhost/127.0.0.1:2181. Will not attempt to authenticate 
using SASL (unknown error)
JLine support is enabled
2012-11-05 10:45:44,973 [myid:] - INFO  
[main-SendThread(localhost:2181):ClientCnxn$SendThread@849] - Socket connection 
established to localhost/127.0.0.1:2181, initiating session
2012-11-05 10:45:45,011 [myid:] - INFO  
[main-SendThread(localhost:2181):ClientCnxn$SendThread@1207] - Session 
establishment complete on server localhost/127.0.0.1:2181, sessionid = 
0x13ad009f0770001, negotiated timeout = 30000

WATCHER::

WatchedEvent state:SyncConnected type:None path:null
[zk: localhost:2181(CONNECTED) 0] 
[zk: localhost:2181(CONNECTED) 0] ls /
2012-11-05 10:46:05,004 [myid:] - INFO  
[main-SendThread(localhost:2181):ClientCnxn$SendThread@1083] - Client session 
timed out, have not heard from server in 20001ms for sessionid 
0x13ad009f0770001, closing socket connection and attempting reconnect

WATCHER::

WatchedEvent state:Disconnected type:None path:null
Exception in thread "main" 
org.apache.zookeeper.KeeperException$ConnectionLossException: KeeperErrorCode = 
ConnectionLoss for /
        at org.apache.zookeeper.KeeperException.create(KeeperException.java:99)
        at org.apache.zookeeper.KeeperException.create(KeeperException.java:51)
        at org.apache.zookeeper.ZooKeeper.getChildren(ZooKeeper.java:1463)
        at org.apache.zookeeper.ZooKeeper.getChildren(ZooKeeper.java:1491)
        at 
org.apache.zookeeper.ZooKeeperMain.processZKCmd(ZooKeeperMain.java:725)
        at org.apache.zookeeper.ZooKeeperMain.processCmd(ZooKeeperMain.java:593)
        at 
org.apache.zookeeper.ZooKeeperMain.executeLine(ZooKeeperMain.java:365)
        at org.apache.zookeeper.ZooKeeperMain.run(ZooKeeperMain.java:323)
        at org.apache.zookeeper.ZooKeeperMain.main(ZooKeeperMain.java:282)
{code}

This can be reproduced by switching JAVA_HOME between 1.6 and 1.7.
                
> Test failures with Java 7 on Mac OS X
> -------------------------------------
>
>                 Key: ZOOKEEPER-1477
>                 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-1477
>             Project: ZooKeeper
>          Issue Type: Bug
>          Components: server, tests
>    Affects Versions: 3.4.3
>         Environment: Mac OS X Lion (10.7.4)
> Java version:
> java version "1.7.0_04"
> Java(TM) SE Runtime Environment (build 1.7.0_04-b21)
> Java HotSpot(TM) 64-Bit Server VM (build 23.0-b21, mixed mode)
>            Reporter: Diwaker Gupta
>             Fix For: 3.4.6
>
>         Attachments: with-ZK-1550.txt
>
>
> I downloaded ZK 3.4.3 sources and ran {{ant test}}. Many of the tests failed, 
> including ZooKeeperTest. A common symptom was spurious 
> {{ConnectionLossException}}:
> {code}
> 2012-06-01 12:01:23,420 [myid:] - INFO  
> [main:JUnit4ZKTestRunner$LoggedInvokeMethod@54] - TEST METHOD FAILED 
> testDeleteRecursiveAsync
> org.apache.zookeeper.KeeperException$ConnectionLossException: KeeperErrorCode 
> = ConnectionLoss for /
>         at 
> org.apache.zookeeper.KeeperException.create(KeeperException.java:99)
>         at 
> org.apache.zookeeper.KeeperException.create(KeeperException.java:51)
>         at org.apache.zookeeper.ZooKeeper.setData(ZooKeeper.java:1246)
>         at 
> org.apache.zookeeper.ZooKeeperTest.testDeleteRecursiveAsync(ZooKeeperTest.java:77)
>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> ... (snipped)
> {code}
> As background, I was actually investigating some non-deterministic failures 
> when using Netflix's Curator with Java 7 (see 
> https://github.com/Netflix/curator/issues/79). After a while, I figured I 
> should establish a clean ZK baseline first and realized it is actually a ZK 
> issue, not a Curator issue.
> We are trying to migrate to Java 7 but this is a blocking issue for us right 
> now.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to