ZooKeeper-trunk-WinVS2008 - Build # 2348 - Still Failing

2016-12-03 Thread Apache Jenkins Server
See https://builds.apache.org/job/ZooKeeper-trunk-WinVS2008/2348/

###
## LAST 60 LINES OF THE CONSOLE 
###
[...truncated 78 lines...]

ivy-retrieve:
[ivy:retrieve] :: Apache Ivy 2.4.0 - 20141213170938 :: 
http://ant.apache.org/ivy/ ::
[ivy:retrieve] :: loading settings :: file = 
f:\jenkins\jenkins-slave\workspace\ZooKeeper-trunk-WinVS2008\ivysettings.xml
[ivy:retrieve] :: resolving dependencies :: 
org.apache.zookeeper#zookeeper;3.6.0-SNAPSHOT
[ivy:retrieve]  confs: [default]
[ivy:retrieve]  found jline#jline;2.11 in maven2
[ivy:retrieve]  found org.eclipse.jetty#jetty-server;9.2.18.v20160721 in maven2
[ivy:retrieve]  found javax.servlet#javax.servlet-api;3.1.0 in maven2
[ivy:retrieve]  found org.eclipse.jetty#jetty-http;9.2.18.v20160721 in maven2
[ivy:retrieve]  found org.eclipse.jetty#jetty-util;9.2.18.v20160721 in maven2
[ivy:retrieve]  found org.eclipse.jetty#jetty-io;9.2.18.v20160721 in maven2
[ivy:retrieve]  found org.eclipse.jetty#jetty-servlet;9.2.18.v20160721 in maven2
[ivy:retrieve]  found org.eclipse.jetty#jetty-security;9.2.18.v20160721 in 
maven2
[ivy:retrieve]  found org.codehaus.jackson#jackson-mapper-asl;1.9.11 in maven2
[ivy:retrieve]  found org.codehaus.jackson#jackson-core-asl;1.9.11 in maven2
[ivy:retrieve]  found org.slf4j#slf4j-api;1.7.5 in maven2
[ivy:retrieve]  found org.slf4j#slf4j-log4j12;1.7.5 in maven2
[ivy:retrieve]  found commons-cli#commons-cli;1.2 in maven2
[ivy:retrieve]  found log4j#log4j;1.2.17 in maven2
[ivy:retrieve]  found io.netty#netty;3.10.5.Final in maven2
[ivy:retrieve]  found net.java.dev.javacc#javacc;5.0 in maven2
[ivy:retrieve] :: resolution report :: resolve 406ms :: artifacts dl 47ms
-
|  |modules||   artifacts   |
|   conf   | number| search|dwnlded|evicted|| number|dwnlded|
-
|  default |   16  |   0   |   0   |   0   ||   16  |   0   |
-
[ivy:retrieve] :: retrieving :: org.apache.zookeeper#zookeeper
[ivy:retrieve]  confs: [default]
[ivy:retrieve]  16 artifacts copied, 0 already retrieved (4635kB/31ms)

generate_jute_parser:
[mkdir] Created dir: 
f:\jenkins\jenkins-slave\workspace\ZooKeeper-trunk-WinVS2008\build\jute_compiler\org\apache\jute\compiler\generated
[ivy:artifactproperty] DEPRECATED: 'ivy.conf.file' is deprecated, use 
'ivy.settings.file' instead
[ivy:artifactproperty] :: loading settings :: file = 
f:\jenkins\jenkins-slave\workspace\ZooKeeper-trunk-WinVS2008\ivysettings.xml
 [move] Moving 1 file to 
f:\jenkins\jenkins-slave\workspace\ZooKeeper-trunk-WinVS2008\build\lib
   [javacc] Java Compiler Compiler Version 5.0 (Parser Generator)
   [javacc] (type "javacc" with no arguments for help)
   [javacc] Reading from file 
f:\jenkins\jenkins-slave\workspace\ZooKeeper-trunk-WinVS2008\src\java\main\org\apache\jute\compiler\generated\rcc.jj
 . . .
   [javacc] File "TokenMgrError.java" does not exist.  Will create one.
   [javacc] File "ParseException.java" does not exist.  Will create one.
   [javacc] File "Token.java" does not exist.  Will create one.
   [javacc] File "SimpleCharStream.java" does not exist.  Will create one.
   [javacc] Parser generated successfully.

jute:

BUILD FAILED
f:\jenkins\jenkins-slave\workspace\ZooKeeper-trunk-WinVS2008\build.xml:273: 
Unable to find a javac compiler;
com.sun.tools.javac.Main is not on the classpath.
Perhaps JAVA_HOME does not point to the JDK.
It is currently set to "C:\Program Files\Java\jre1.8.0_92"

Total time: 3 seconds
Build step 'Invoke Ant' marked build as failure
Email was triggered for: Failure - Any
Sending email for trigger: Failure - Any



###
## FAILED TESTS (if any) 
##
No tests ran.

ZooKeeper-trunk - Build # 3181 - Still Failing

2016-12-03 Thread Apache Jenkins Server
See https://builds.apache.org/job/ZooKeeper-trunk/3181/

###
## LAST 60 LINES OF THE CONSOLE 
###
[...truncated 428928 lines...]
[junit] at 
sun.nio.ch.SocketChannelImpl.finishConnect(SocketChannelImpl.java:744)
[junit] at 
org.apache.zookeeper.ClientCnxnSocketNIO.doTransport(ClientCnxnSocketNIO.java:357)
[junit] at 
org.apache.zookeeper.ClientCnxn$SendThread.run(ClientCnxn.java:1214)
[junit] 2016-12-03 23:27:13,511 [myid:] - INFO  [ProcessThread(sid:0 
cport:16852)::PrepRequestProcessor@618] - Processed session termination for 
sessionid: 0x1026f95502c
[junit] 2016-12-03 23:27:13,512 [myid:] - INFO  
[SyncThread:0:MBeanRegistry@128] - Unregister MBean 
[org.apache.ZooKeeperService:name0=StandaloneServer_port16852,name1=Connections,name2=127.0.0.1,name3=0x1026f95502c]
[junit] 2016-12-03 23:27:13,512 [myid:] - INFO  
[main-EventThread:ClientCnxn$EventThread@513] - EventThread shut down for 
session: 0x1026f95502c
[junit] 2016-12-03 23:27:13,512 [myid:] - INFO  [main:ZooKeeper@1313] - 
Session: 0x1026f95502c closed
[junit] 2016-12-03 23:27:13,512 [myid:] - INFO  
[main:JUnit4ZKTestRunner$LoggedInvokeMethod@82] - Memory used 163632
[junit] 2016-12-03 23:27:13,512 [myid:] - INFO  
[main:JUnit4ZKTestRunner$LoggedInvokeMethod@87] - Number of threads 1643
[junit] 2016-12-03 23:27:13,513 [myid:] - INFO  
[main:JUnit4ZKTestRunner$LoggedInvokeMethod@102] - FINISHED TEST METHOD 
testWatcherAutoResetWithLocal
[junit] 2016-12-03 23:27:13,513 [myid:] - INFO  [main:ClientBase@543] - 
tearDown starting
[junit] 2016-12-03 23:27:13,513 [myid:] - INFO  [main:ClientBase@513] - 
STOPPING server
[junit] 2016-12-03 23:27:13,513 [myid:] - INFO  
[main:NettyServerCnxnFactory@464] - shutdown called 0.0.0.0/0.0.0.0:16852
[junit] 2016-12-03 23:27:13,516 [myid:] - INFO  [main:ZooKeeperServer@534] 
- shutting down
[junit] 2016-12-03 23:27:13,516 [myid:] - ERROR [main:ZooKeeperServer@506] 
- ZKShutdownHandler is not registered, so ZooKeeper server won't take any 
action on ERROR or SHUTDOWN server state changes
[junit] 2016-12-03 23:27:13,516 [myid:] - INFO  
[main:SessionTrackerImpl@232] - Shutting down
[junit] 2016-12-03 23:27:13,517 [myid:] - INFO  
[main:PrepRequestProcessor@1009] - Shutting down
[junit] 2016-12-03 23:27:13,517 [myid:] - INFO  
[main:SyncRequestProcessor@191] - Shutting down
[junit] 2016-12-03 23:27:13,517 [myid:] - INFO  [ProcessThread(sid:0 
cport:16852)::PrepRequestProcessor@157] - PrepRequestProcessor exited loop!
[junit] 2016-12-03 23:27:13,517 [myid:] - INFO  
[SyncThread:0:SyncRequestProcessor@169] - SyncRequestProcessor exited!
[junit] 2016-12-03 23:27:13,517 [myid:] - INFO  
[main:FinalRequestProcessor@481] - shutdown of request processor complete
[junit] 2016-12-03 23:27:13,519 [myid:] - INFO  [main:MBeanRegistry@128] - 
Unregister MBean 
[org.apache.ZooKeeperService:name0=StandaloneServer_port16852,name1=InMemoryDataTree]
[junit] 2016-12-03 23:27:13,520 [myid:] - INFO  [main:MBeanRegistry@128] - 
Unregister MBean [org.apache.ZooKeeperService:name0=StandaloneServer_port16852]
[junit] 2016-12-03 23:27:13,520 [myid:] - INFO  
[main:FourLetterWordMain@85] - connecting to 127.0.0.1 16852
[junit] 2016-12-03 23:27:13,520 [myid:] - INFO  [main:JMXEnv@146] - 
ensureOnly:[]
[junit] 2016-12-03 23:27:13,525 [myid:] - INFO  [main:ClientBase@568] - 
fdcount after test is: 4827 at start it was 4823
[junit] 2016-12-03 23:27:13,525 [myid:] - INFO  [main:ClientBase@570] - 
sleeping for 20 secs
[junit] 2016-12-03 23:27:13,525 [myid:] - INFO  [main:ZKTestCase$1@65] - 
SUCCEEDED testWatcherAutoResetWithLocal
[junit] 2016-12-03 23:27:13,526 [myid:] - INFO  [main:ZKTestCase$1@60] - 
FINISHED testWatcherAutoResetWithLocal
[junit] Tests run: 101, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 
507.993 sec, Thread: 3, Class: org.apache.zookeeper.test.NioNettySuiteTest
[junit] 2016-12-03 23:27:13,832 [myid:127.0.0.1:16732] - INFO  
[main-SendThread(127.0.0.1:16732):ClientCnxn$SendThread@1113] - Opening socket 
connection to server 127.0.0.1/127.0.0.1:16732. Will not attempt to 
authenticate using SASL (unknown error)
[junit] 2016-12-03 23:27:13,833 [myid:127.0.0.1:16732] - WARN  
[main-SendThread(127.0.0.1:16732):ClientCnxn$SendThread@1235] - Session 
0x2026f920e59 for server 127.0.0.1/127.0.0.1:16732, unexpected error, 
closing socket connection and attempting reconnect
[junit] java.net.ConnectException: Connection refused
[junit] at sun.nio.ch.SocketChannelImpl.checkConnect(Native Method)
[junit] at 
sun.nio.ch.SocketChannelImpl.finishConnect(SocketChannelImpl.java:744)
[junit] at 
org.apache.zookeeper.ClientCnxnSocketNIO.doTransport(ClientCnxnSocketNIO.java:357)
[junit] at 
org.apache.zookeeper.ClientCnxn$Se

[jira] [Commented] (ZOOKEEPER-2080) ReconfigRecoveryTest fails intermittently

2016-12-03 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on ZOOKEEPER-2080:
---

Github user lvfangmin commented on a diff in the pull request:

https://github.com/apache/zookeeper/pull/92#discussion_r90764675
  
--- Diff: src/java/main/org/apache/zookeeper/server/quorum/QuorumPeer.java 
---
@@ -1390,24 +1406,29 @@ public QuorumVerifier configFromString(String s) 
throws IOException, ConfigExcep
 }
 
 /**
- * Return QuorumVerifier object for the last committed configuration
+ * Return QuorumVerifier object for the last committed configuration.
  */
-
-public synchronized QuorumVerifier getQuorumVerifier(){
-return quorumVerifier;
-
+public QuorumVerifier getQuorumVerifier(){
+synchronized (qvLock) {
+return quorumVerifier;
+}
 }
 
-public synchronized QuorumVerifier getLastSeenQuorumVerifier(){
-return lastSeenQuorumVerifier;
+/**
+ * Return QuorumVerifier object for the last proposed configuration.
+ */
+public QuorumVerifier getLastSeenQuorumVerifier(){
+synchronized (qvLock) {
+return lastSeenQuorumVerifier;
+}
 }
 
-public synchronized void connectNewPeers(){
-   if (qcm!=null && getQuorumVerifier()!=null && 
getLastSeenQuorumVerifier()!=null) {
-   Map committedView = 
getQuorumVerifier().getAllMembers();
-   for (Entry e: 
getLastSeenQuorumVerifier().getAllMembers().entrySet()){
+private void connectNewPeers(){
--- End diff --

Hi @hanm, I've followed the long discussion on the Jira, thanks for digging 
deeper into the problem. LGTM, only a small suggestion: it's error-prone to 
assume that in the future this method won't be called by other non-synchronized 
methods, we'd better to add the synchronize(qvLock) here too.


> ReconfigRecoveryTest fails intermittently
> -
>
> Key: ZOOKEEPER-2080
> URL: https://issues.apache.org/jira/browse/ZOOKEEPER-2080
> Project: ZooKeeper
>  Issue Type: Sub-task
>Reporter: Ted Yu
>Assignee: Michael Han
> Fix For: 3.5.3, 3.6.0
>
> Attachments: ZOOKEEPER-2080.patch, ZOOKEEPER-2080.patch, 
> ZOOKEEPER-2080.patch, ZOOKEEPER-2080.patch, ZOOKEEPER-2080.patch, 
> ZOOKEEPER-2080.patch, jacoco-ZOOKEEPER-2080.unzip-grows-to-70MB.7z, 
> repro-20150816.log, threaddump.log
>
>
> I got the following test failure on MacBook with trunk code:
> {code}
> Testcase: testCurrentObserverIsParticipantInNewConfig took 93.628 sec
>   FAILED
> waiting for server 2 being up
> junit.framework.AssertionFailedError: waiting for server 2 being up
>   at 
> org.apache.zookeeper.server.quorum.ReconfigRecoveryTest.testCurrentObserverIsParticipantInNewConfig(ReconfigRecoveryTest.java:529)
>   at 
> org.apache.zookeeper.JUnit4ZKTestRunner$LoggedInvokeMethod.evaluate(JUnit4ZKTestRunner.java:52)
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[GitHub] zookeeper pull request #92: ZOOKEEPER-2080: Fix deadlock in dynamic reconfig...

2016-12-03 Thread lvfangmin
Github user lvfangmin commented on a diff in the pull request:

https://github.com/apache/zookeeper/pull/92#discussion_r90764675
  
--- Diff: src/java/main/org/apache/zookeeper/server/quorum/QuorumPeer.java 
---
@@ -1390,24 +1406,29 @@ public QuorumVerifier configFromString(String s) 
throws IOException, ConfigExcep
 }
 
 /**
- * Return QuorumVerifier object for the last committed configuration
+ * Return QuorumVerifier object for the last committed configuration.
  */
-
-public synchronized QuorumVerifier getQuorumVerifier(){
-return quorumVerifier;
-
+public QuorumVerifier getQuorumVerifier(){
+synchronized (qvLock) {
+return quorumVerifier;
+}
 }
 
-public synchronized QuorumVerifier getLastSeenQuorumVerifier(){
-return lastSeenQuorumVerifier;
+/**
+ * Return QuorumVerifier object for the last proposed configuration.
+ */
+public QuorumVerifier getLastSeenQuorumVerifier(){
+synchronized (qvLock) {
+return lastSeenQuorumVerifier;
+}
 }
 
-public synchronized void connectNewPeers(){
-   if (qcm!=null && getQuorumVerifier()!=null && 
getLastSeenQuorumVerifier()!=null) {
-   Map committedView = 
getQuorumVerifier().getAllMembers();
-   for (Entry e: 
getLastSeenQuorumVerifier().getAllMembers().entrySet()){
+private void connectNewPeers(){
--- End diff --

Hi @hanm, I've followed the long discussion on the Jira, thanks for digging 
deeper into the problem. LGTM, only a small suggestion: it's error-prone to 
assume that in the future this method won't be called by other non-synchronized 
methods, we'd better to add the synchronize(qvLock) here too.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


ZooKeeper-trunk-openjdk7 - Build # 1265 - Still Failing

2016-12-03 Thread Apache Jenkins Server
See https://builds.apache.org/job/ZooKeeper-trunk-openjdk7/1265/

###
## LAST 60 LINES OF THE CONSOLE 
###
Started by timer
[EnvInject] - Loading node environment variables.
Building remotely on H17 (ubuntu) in workspace 
/home/jenkins/jenkins-slave/workspace/ZooKeeper-trunk-openjdk7
 > git rev-parse --is-inside-work-tree # timeout=10
Fetching changes from the remote Git repository
 > git config remote.origin.url git://git.apache.org/zookeeper.git # timeout=10
Cleaning workspace
 > git rev-parse --verify HEAD # timeout=10
Resetting working tree
 > git reset --hard # timeout=10
 > git clean -fdx # timeout=10
Fetching upstream changes from git://git.apache.org/zookeeper.git
 > git --version # timeout=10
 > git -c core.askpass=true fetch --tags --progress 
 > git://git.apache.org/zookeeper.git +refs/heads/*:refs/remotes/origin/*
 > git rev-parse refs/remotes/origin/master^{commit} # timeout=10
 > git rev-parse refs/remotes/origin/origin/master^{commit} # timeout=10
Checking out Revision 73d6bf5353586e49740f77291d1fd98b07f916cc 
(refs/remotes/origin/master)
 > git config core.sparsecheckout # timeout=10
 > git checkout -f 73d6bf5353586e49740f77291d1fd98b07f916cc
 > git rev-list 73d6bf5353586e49740f77291d1fd98b07f916cc # timeout=10
No emails were triggered.
[ZooKeeper-trunk-openjdk7] $ /home/jenkins/tools/ant/latest/bin/ant 
-Dtest.output=yes -Dtest.junit.threads=8 -Dtest.junit.output.format=xml 
-Djavac.target=1.7 clean test-core-java
Error: JAVA_HOME is not defined correctly.
  We cannot execute /usr/lib/jvm/java-7-openjdk-amd64//bin/java
Build step 'Invoke Ant' marked build as failure
Recording test results
ERROR: Step ?Publish JUnit test result report? failed: No test report files 
were found. Configuration error?
Email was triggered for: Failure - Any
Sending email for trigger: Failure - Any



###
## FAILED TESTS (if any) 
##
No tests ran.

Re: about zookeeper ebook

2016-12-03 Thread Michael Han
>> the communication protocol of zookeeper

Would be good to be more specific on what you are looking for... If you
mean the wire protocol (i.e. packet layout), ZooKeeper use jute [1]. If you
mean the quorum protocol then [2][3]

[1] https://github.com/apache/zookeeper/blob/master/src/zookeeper.jute
[2] https://zookeeper.apache.org/doc/trunk/zookeeperInternals.html
[3] https://cwiki.apache.org/confluence/display/ZOOKEEPER/Zab+in+words

On Fri, Dec 2, 2016 at 11:04 PM, 罗飞龙 <360777...@qq.com> wrote:

> hi, I would like to know the communication protocol of zookeeper, where
> can i find the article about it ,can you send me the official documents or
> a link?




-- 
Cheers
Michael.


[jira] [Updated] (ZOOKEEPER-2251) Add Client side packet response timeout to avoid infinite wait.

2016-12-03 Thread Michael Han (JIRA)

 [ 
https://issues.apache.org/jira/browse/ZOOKEEPER-2251?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Michael Han updated ZOOKEEPER-2251:
---
Fix Version/s: 3.4.10

> Add Client side packet response timeout to avoid infinite wait.
> ---
>
> Key: ZOOKEEPER-2251
> URL: https://issues.apache.org/jira/browse/ZOOKEEPER-2251
> Project: ZooKeeper
>  Issue Type: Bug
>  Components: java client
>Affects Versions: 3.4.9, 3.5.2
>Reporter: nijel
>Assignee: Arshad Mohammad
>Priority: Critical
>  Labels: fault
> Fix For: 3.4.10, 3.5.3, 3.6.0
>
> Attachments: ZOOKEEPER-2251-01.patch, ZOOKEEPER-2251-02.patch, 
> ZOOKEEPER-2251-03.patch, ZOOKEEPER-2251-04.patch
>
>
> I came across one issue related to Client side packet response timeout In my 
> cluster many packet drops happened for some time.
> One observation is the zookeeper client got hanged. As per the thread dump it 
> is waiting for the response/ACK for the operation performed (synchronous API 
> used here).
> I am using 
> zookeeper.serverCnxnFactory=org.apache.zookeeper.server.NIOServerCnxnFactory
> Since only few packets missed there is no DISCONNECTED event occurred.
> Need add a "response time out" for the operations or packets.
> *Comments from [~rakeshr]*
> My observation about the problem:-
> * Can use tools like 'Wireshark' to simulate the artificial packet loss.
> * Assume there is only one packet in the 'outgoingQueue' and unfortunately 
> the server response packet lost. Now, client will enter into infinite 
> waiting. 
> https://github.com/apache/zookeeper/blob/trunk/src/java/main/org/apache/zookeeper/ClientCnxn.java#L1515
> * Probably we can discuss more about this problem and possible solutions(add 
> packet ACK timeout or another better approach) in the jira.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (ZOOKEEPER-2549) As NettyServerCnxn.sendResponse() allows all the exception to bubble up it can stop main ZK requests processing thread

2016-12-03 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on ZOOKEEPER-2549:
---

Github user hanm commented on a diff in the pull request:

https://github.com/apache/zookeeper/pull/99#discussion_r90762715
  
--- Diff: src/java/main/org/apache/zookeeper/server/NettyServerCnxn.java ---
@@ -165,31 +163,35 @@ public void process(WatchedEvent event) {
 @Override
 public void sendResponse(ReplyHeader h, Record r, String tag)
 throws IOException {
-if (!channel.isOpen()) {
-return;
-}
-ByteArrayOutputStream baos = new ByteArrayOutputStream();
-// Make space for length
-BinaryOutputArchive bos = BinaryOutputArchive.getArchive(baos);
 try {
-baos.write(fourBytes);
-bos.writeRecord(h, "header");
-if (r != null) {
-bos.writeRecord(r, tag);
+if (!channel.isOpen()) {
+return;
 }
-baos.close();
-} catch (IOException e) {
-LOG.error("Error serializing response");
-}
-byte b[] = baos.toByteArray();
-ByteBuffer bb = ByteBuffer.wrap(b);
-bb.putInt(b.length - 4).rewind();
-sendBuffer(bb);
-if (h.getXid() > 0) {
-// zks cannot be null otherwise we would not have gotten here!
-if 
(!zkServer.shouldThrottle(outstandingCount.decrementAndGet())) {
-enableRecv();
+ByteArrayOutputStream baos = new ByteArrayOutputStream();
+// Make space for length
+BinaryOutputArchive bos = BinaryOutputArchive.getArchive(baos);
+try {
+baos.write(fourBytes);
+bos.writeRecord(h, "header");
+if (r != null) {
+bos.writeRecord(r, tag);
+}
+baos.close();
+} catch (IOException e) {
--- End diff --

Agree on re-throw the exception here. We could just remove the try - catch 
block here given there is a new try - catch block added in this PR that wraps 
the entire `sendResponse.` 
We can start triaging other places where the exceptions are swallowed but 
should re-throw after this PR merging in.


> As NettyServerCnxn.sendResponse() allows all the exception to bubble up it 
> can stop main ZK requests processing thread
> --
>
> Key: ZOOKEEPER-2549
> URL: https://issues.apache.org/jira/browse/ZOOKEEPER-2549
> Project: ZooKeeper
>  Issue Type: Bug
>  Components: server
>Affects Versions: 3.5.1
>Reporter: Yuliya Feldman
>Assignee: Yuliya Feldman
> Attachments: ZOOKEEPER-2549-2.patch, ZOOKEEPER-2549-3.patch, 
> ZOOKEEPER-2549-3.patch, ZOOKEEPER-2549-4.patch, ZOOKEEPER-2549.patch, 
> ZOOKEEPER-2549.patch, zookeeper-2549-1.patch
>
>
> As NettyServerCnxn.sendResponse() allows all the exception to bubble up it 
> can stop main ZK requests processing thread and make Zookeeper server look 
> like it is hanging, while it just can not process any request anymore.
> Idea is to catch all the exceptions in NettyServerCnxn.sendResponse() , 
> convert them to IOException and allow it propagating up



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (ZOOKEEPER-2549) As NettyServerCnxn.sendResponse() allows all the exception to bubble up it can stop main ZK requests processing thread

2016-12-03 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on ZOOKEEPER-2549:
---

Github user hanm commented on a diff in the pull request:

https://github.com/apache/zookeeper/pull/99#discussion_r90762620
  
--- Diff: src/java/main/org/apache/zookeeper/server/NettyServerCnxn.java ---
@@ -71,7 +71,7 @@
 NettyServerCnxnFactory factory;
 boolean initialized;
 
-NettyServerCnxn(Channel channel, ZooKeeperServer zks, 
NettyServerCnxnFactory factory) {
+public NettyServerCnxn(Channel channel, ZooKeeperServer zks, 
NettyServerCnxnFactory factory) {
--- End diff --

It is not obvious to me why the access specifier of `NettyServerCnxn` 
should be changed public here.


> As NettyServerCnxn.sendResponse() allows all the exception to bubble up it 
> can stop main ZK requests processing thread
> --
>
> Key: ZOOKEEPER-2549
> URL: https://issues.apache.org/jira/browse/ZOOKEEPER-2549
> Project: ZooKeeper
>  Issue Type: Bug
>  Components: server
>Affects Versions: 3.5.1
>Reporter: Yuliya Feldman
>Assignee: Yuliya Feldman
> Attachments: ZOOKEEPER-2549-2.patch, ZOOKEEPER-2549-3.patch, 
> ZOOKEEPER-2549-3.patch, ZOOKEEPER-2549-4.patch, ZOOKEEPER-2549.patch, 
> ZOOKEEPER-2549.patch, zookeeper-2549-1.patch
>
>
> As NettyServerCnxn.sendResponse() allows all the exception to bubble up it 
> can stop main ZK requests processing thread and make Zookeeper server look 
> like it is hanging, while it just can not process any request anymore.
> Idea is to catch all the exceptions in NettyServerCnxn.sendResponse() , 
> convert them to IOException and allow it propagating up



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[GitHub] zookeeper pull request #99: ZOOKEEPER-2549 Add exception handling to sendRes...

2016-12-03 Thread hanm
Github user hanm commented on a diff in the pull request:

https://github.com/apache/zookeeper/pull/99#discussion_r90762715
  
--- Diff: src/java/main/org/apache/zookeeper/server/NettyServerCnxn.java ---
@@ -165,31 +163,35 @@ public void process(WatchedEvent event) {
 @Override
 public void sendResponse(ReplyHeader h, Record r, String tag)
 throws IOException {
-if (!channel.isOpen()) {
-return;
-}
-ByteArrayOutputStream baos = new ByteArrayOutputStream();
-// Make space for length
-BinaryOutputArchive bos = BinaryOutputArchive.getArchive(baos);
 try {
-baos.write(fourBytes);
-bos.writeRecord(h, "header");
-if (r != null) {
-bos.writeRecord(r, tag);
+if (!channel.isOpen()) {
+return;
 }
-baos.close();
-} catch (IOException e) {
-LOG.error("Error serializing response");
-}
-byte b[] = baos.toByteArray();
-ByteBuffer bb = ByteBuffer.wrap(b);
-bb.putInt(b.length - 4).rewind();
-sendBuffer(bb);
-if (h.getXid() > 0) {
-// zks cannot be null otherwise we would not have gotten here!
-if 
(!zkServer.shouldThrottle(outstandingCount.decrementAndGet())) {
-enableRecv();
+ByteArrayOutputStream baos = new ByteArrayOutputStream();
+// Make space for length
+BinaryOutputArchive bos = BinaryOutputArchive.getArchive(baos);
+try {
+baos.write(fourBytes);
+bos.writeRecord(h, "header");
+if (r != null) {
+bos.writeRecord(r, tag);
+}
+baos.close();
+} catch (IOException e) {
--- End diff --

Agree on re-throw the exception here. We could just remove the try - catch 
block here given there is a new try - catch block added in this PR that wraps 
the entire `sendResponse.` 
We can start triaging other places where the exceptions are swallowed but 
should re-throw after this PR merging in.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[jira] [Commented] (ZOOKEEPER-2549) As NettyServerCnxn.sendResponse() allows all the exception to bubble up it can stop main ZK requests processing thread

2016-12-03 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on ZOOKEEPER-2549:
---

Github user hanm commented on a diff in the pull request:

https://github.com/apache/zookeeper/pull/99#discussion_r90763391
  
--- Diff: src/java/main/org/apache/zookeeper/server/NIOServerCnxn.java ---
@@ -716,7 +716,12 @@ public void process(WatchedEvent event) {
 // Convert WatchedEvent to a type that can be sent over the wire
 WatcherEvent e = event.getWrapper();
 
-sendResponse(h, e, "notification");
+try {
+sendResponse(h, e, "notification");
+} catch (IOException ex) {
+LOG.debug("Problem sending to " + getRemoteSocketAddress(), 
ex);
+close();
--- End diff --

>> It was not closing (I think) before as exception was swallowed since 
sendResponse in NIOServerCnxn was not throwing IOException

Yes, I think the connection was not closing before in cases of exception 
thrown from `NIOServerCnxn.sendResponse` which swallows everything. The change 
in this PR changes the behavior by closing the connection in case of exceptions 
occur in sendResponse. I am leaning towards the old behavior of NOT closing the 
connection, because the connection looks pretty innocent - in fact 
`NIOServerCnxn.sendResponse` does not involve any socket IO I believe, it just 
queuing stuff to be send over sockets. So if something goes wrong, we just do 
our best effort by logging what's wrong - rather than trying mess up with 
sockets which seems out of responsibilities of `NIOServerCnxn.sendResponse`. 
Similarly since `NIOServerCnxn.sendResponse` does not directly involve sockets, 
there should not be any leaks in case sendResponse screw up.


> As NettyServerCnxn.sendResponse() allows all the exception to bubble up it 
> can stop main ZK requests processing thread
> --
>
> Key: ZOOKEEPER-2549
> URL: https://issues.apache.org/jira/browse/ZOOKEEPER-2549
> Project: ZooKeeper
>  Issue Type: Bug
>  Components: server
>Affects Versions: 3.5.1
>Reporter: Yuliya Feldman
>Assignee: Yuliya Feldman
> Attachments: ZOOKEEPER-2549-2.patch, ZOOKEEPER-2549-3.patch, 
> ZOOKEEPER-2549-3.patch, ZOOKEEPER-2549-4.patch, ZOOKEEPER-2549.patch, 
> ZOOKEEPER-2549.patch, zookeeper-2549-1.patch
>
>
> As NettyServerCnxn.sendResponse() allows all the exception to bubble up it 
> can stop main ZK requests processing thread and make Zookeeper server look 
> like it is hanging, while it just can not process any request anymore.
> Idea is to catch all the exceptions in NettyServerCnxn.sendResponse() , 
> convert them to IOException and allow it propagating up



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[GitHub] zookeeper pull request #99: ZOOKEEPER-2549 Add exception handling to sendRes...

2016-12-03 Thread hanm
Github user hanm commented on a diff in the pull request:

https://github.com/apache/zookeeper/pull/99#discussion_r90763391
  
--- Diff: src/java/main/org/apache/zookeeper/server/NIOServerCnxn.java ---
@@ -716,7 +716,12 @@ public void process(WatchedEvent event) {
 // Convert WatchedEvent to a type that can be sent over the wire
 WatcherEvent e = event.getWrapper();
 
-sendResponse(h, e, "notification");
+try {
+sendResponse(h, e, "notification");
+} catch (IOException ex) {
+LOG.debug("Problem sending to " + getRemoteSocketAddress(), 
ex);
+close();
--- End diff --

>> It was not closing (I think) before as exception was swallowed since 
sendResponse in NIOServerCnxn was not throwing IOException

Yes, I think the connection was not closing before in cases of exception 
thrown from `NIOServerCnxn.sendResponse` which swallows everything. The change 
in this PR changes the behavior by closing the connection in case of exceptions 
occur in sendResponse. I am leaning towards the old behavior of NOT closing the 
connection, because the connection looks pretty innocent - in fact 
`NIOServerCnxn.sendResponse` does not involve any socket IO I believe, it just 
queuing stuff to be send over sockets. So if something goes wrong, we just do 
our best effort by logging what's wrong - rather than trying mess up with 
sockets which seems out of responsibilities of `NIOServerCnxn.sendResponse`. 
Similarly since `NIOServerCnxn.sendResponse` does not directly involve sockets, 
there should not be any leaks in case sendResponse screw up.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] zookeeper pull request #99: ZOOKEEPER-2549 Add exception handling to sendRes...

2016-12-03 Thread hanm
Github user hanm commented on a diff in the pull request:

https://github.com/apache/zookeeper/pull/99#discussion_r90762620
  
--- Diff: src/java/main/org/apache/zookeeper/server/NettyServerCnxn.java ---
@@ -71,7 +71,7 @@
 NettyServerCnxnFactory factory;
 boolean initialized;
 
-NettyServerCnxn(Channel channel, ZooKeeperServer zks, 
NettyServerCnxnFactory factory) {
+public NettyServerCnxn(Channel channel, ZooKeeperServer zks, 
NettyServerCnxnFactory factory) {
--- End diff --

It is not obvious to me why the access specifier of `NettyServerCnxn` 
should be changed public here.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


ZooKeeper-trunk-openjdk7 - Build # 1264 - Still Failing

2016-12-03 Thread Apache Jenkins Server
See https://builds.apache.org/job/ZooKeeper-trunk-openjdk7/1264/

###
## LAST 60 LINES OF THE CONSOLE 
###
Started by an SCM change
[EnvInject] - Loading node environment variables.
Building remotely on H17 (ubuntu) in workspace 
/home/jenkins/jenkins-slave/workspace/ZooKeeper-trunk-openjdk7
 > git rev-parse --is-inside-work-tree # timeout=10
Fetching changes from the remote Git repository
 > git config remote.origin.url git://git.apache.org/zookeeper.git # timeout=10
Cleaning workspace
 > git rev-parse --verify HEAD # timeout=10
Resetting working tree
 > git reset --hard # timeout=10
 > git clean -fdx # timeout=10
Fetching upstream changes from git://git.apache.org/zookeeper.git
 > git --version # timeout=10
 > git -c core.askpass=true fetch --tags --progress 
 > git://git.apache.org/zookeeper.git +refs/heads/*:refs/remotes/origin/*
 > git rev-parse refs/remotes/origin/master^{commit} # timeout=10
 > git rev-parse refs/remotes/origin/origin/master^{commit} # timeout=10
Checking out Revision 73d6bf5353586e49740f77291d1fd98b07f916cc 
(refs/remotes/origin/master)
 > git config core.sparsecheckout # timeout=10
 > git checkout -f 73d6bf5353586e49740f77291d1fd98b07f916cc
 > git rev-list 73d6bf5353586e49740f77291d1fd98b07f916cc # timeout=10
No emails were triggered.
[ZooKeeper-trunk-openjdk7] $ /home/jenkins/tools/ant/latest/bin/ant 
-Dtest.output=yes -Dtest.junit.threads=8 -Dtest.junit.output.format=xml 
-Djavac.target=1.7 clean test-core-java
Error: JAVA_HOME is not defined correctly.
  We cannot execute /usr/lib/jvm/java-7-openjdk-amd64//bin/java
Build step 'Invoke Ant' marked build as failure
Recording test results
ERROR: Step ?Publish JUnit test result report? failed: No test report files 
were found. Configuration error?
Email was triggered for: Failure - Any
Sending email for trigger: Failure - Any



###
## FAILED TESTS (if any) 
##
No tests ran.

ZooKeeper_branch35_openjdk7 - Build # 319 - Still Failing

2016-12-03 Thread Apache Jenkins Server
See https://builds.apache.org/job/ZooKeeper_branch35_openjdk7/319/

###
## LAST 60 LINES OF THE CONSOLE 
###
Started by an SCM change
[EnvInject] - Loading node environment variables.
Building remotely on H16 (ubuntu) in workspace 
/home/jenkins/jenkins-slave/workspace/ZooKeeper_branch35_openjdk7
 > git rev-parse --is-inside-work-tree # timeout=10
Fetching changes from the remote Git repository
 > git config remote.origin.url git://git.apache.org/zookeeper.git # timeout=10
Fetching upstream changes from git://git.apache.org/zookeeper.git
 > git --version # timeout=10
 > git -c core.askpass=true fetch --tags --progress 
 > git://git.apache.org/zookeeper.git +refs/heads/*:refs/remotes/origin/*
 > git rev-parse refs/remotes/origin/branch-3.5^{commit} # timeout=10
 > git rev-parse refs/remotes/origin/origin/branch-3.5^{commit} # timeout=10
Checking out Revision 3119a194ac0738b00a4e22095449ea4c4dbb8f31 
(refs/remotes/origin/branch-3.5)
 > git config core.sparsecheckout # timeout=10
 > git checkout -f 3119a194ac0738b00a4e22095449ea4c4dbb8f31
 > git rev-list 8f2a869c2efa91a9687c43360abd28da1ba1314e # timeout=10
No emails were triggered.
[ZooKeeper_branch35_openjdk7] $ /home/jenkins/tools/ant/latest/bin/ant 
-Dtest.output=yes -Dtest.junit.threads=8 -Dtest.junit.output.format=xml 
-Djavac.target=1.7 clean test-core-java
Error: JAVA_HOME is not defined correctly.
  We cannot execute /usr/lib/jvm/java-7-openjdk-amd64//bin/java
Build step 'Invoke Ant' marked build as failure
Recording test results
ERROR: Step ?Publish JUnit test result report? failed: No test report files 
were found. Configuration error?
Email was triggered for: Failure - Any
Sending email for trigger: Failure - Any



###
## FAILED TESTS (if any) 
##
No tests ran.

ZooKeeper-trunk-openjdk7 - Build # 1263 - Still Failing

2016-12-03 Thread Apache Jenkins Server
See https://builds.apache.org/job/ZooKeeper-trunk-openjdk7/1263/

###
## LAST 60 LINES OF THE CONSOLE 
###
Started by an SCM change
[EnvInject] - Loading node environment variables.
Building remotely on H17 (ubuntu) in workspace 
/home/jenkins/jenkins-slave/workspace/ZooKeeper-trunk-openjdk7
 > git rev-parse --is-inside-work-tree # timeout=10
Fetching changes from the remote Git repository
 > git config remote.origin.url git://git.apache.org/zookeeper.git # timeout=10
Cleaning workspace
 > git rev-parse --verify HEAD # timeout=10
Resetting working tree
 > git reset --hard # timeout=10
 > git clean -fdx # timeout=10
Fetching upstream changes from git://git.apache.org/zookeeper.git
 > git --version # timeout=10
 > git -c core.askpass=true fetch --tags --progress 
 > git://git.apache.org/zookeeper.git +refs/heads/*:refs/remotes/origin/*
 > git rev-parse refs/remotes/origin/master^{commit} # timeout=10
 > git rev-parse refs/remotes/origin/origin/master^{commit} # timeout=10
Checking out Revision 73d6bf5353586e49740f77291d1fd98b07f916cc 
(refs/remotes/origin/master)
 > git config core.sparsecheckout # timeout=10
 > git checkout -f 73d6bf5353586e49740f77291d1fd98b07f916cc
 > git rev-list d72f27279a13986ee0c011e1e5b34edf3a310da9 # timeout=10
No emails were triggered.
[ZooKeeper-trunk-openjdk7] $ /home/jenkins/tools/ant/latest/bin/ant 
-Dtest.output=yes -Dtest.junit.threads=8 -Dtest.junit.output.format=xml 
-Djavac.target=1.7 clean test-core-java
Error: JAVA_HOME is not defined correctly.
  We cannot execute /usr/lib/jvm/java-7-openjdk-amd64//bin/java
Build step 'Invoke Ant' marked build as failure
Recording test results
ERROR: Step ?Publish JUnit test result report? failed: No test report files 
were found. Configuration error?
Email was triggered for: Failure - Any
Sending email for trigger: Failure - Any



###
## FAILED TESTS (if any) 
##
No tests ran.

ZooKeeper-trunk-jdk8 - Build # 844 - Failure

2016-12-03 Thread Apache Jenkins Server
See https://builds.apache.org/job/ZooKeeper-trunk-jdk8/844/

###
## LAST 60 LINES OF THE CONSOLE 
###
[...truncated 459122 lines...]
[junit] at 
org.apache.zookeeper.server.NettyServerCnxnFactory$CnxnChannelHandler.processMessage(NettyServerCnxnFactory.java:244)
[junit] at 
org.apache.zookeeper.server.NettyServerCnxnFactory$CnxnChannelHandler.messageReceived(NettyServerCnxnFactory.java:166)
[junit] at 
org.jboss.netty.channel.SimpleChannelHandler.handleUpstream(SimpleChannelHandler.java:88)
[junit] at 
org.jboss.netty.channel.DefaultChannelPipeline.sendUpstream(DefaultChannelPipeline.java:564)
[junit] at 
org.jboss.netty.channel.DefaultChannelPipeline.sendUpstream(DefaultChannelPipeline.java:559)
[junit] at 
org.jboss.netty.channel.Channels.fireMessageReceived(Channels.java:268)
[junit] at 
org.jboss.netty.channel.Channels.fireMessageReceived(Channels.java:255)
[junit] at 
org.jboss.netty.channel.socket.nio.NioWorker.read(NioWorker.java:88)
[junit] at 
org.jboss.netty.channel.socket.nio.AbstractNioWorker.process(AbstractNioWorker.java:108)
[junit] at 
org.jboss.netty.channel.socket.nio.AbstractNioSelector.run(AbstractNioSelector.java:337)
[junit] at 
org.jboss.netty.channel.socket.nio.AbstractNioWorker.run(AbstractNioWorker.java:89)
[junit] at 
org.jboss.netty.channel.socket.nio.NioWorker.run(NioWorker.java:178)
[junit] at 
org.jboss.netty.util.ThreadRenamingRunnable.run(ThreadRenamingRunnable.java:108)
[junit] at 
org.jboss.netty.util.internal.DeadLockProofWorker$1.run(DeadLockProofWorker.java:42)
[junit] at 
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
[junit] at 
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
[junit] at java.lang.Thread.run(Thread.java:745)
[junit] 2016-12-03 18:37:12,777 [myid:127.0.0.1:24832] - INFO  
[main-SendThread(127.0.0.1:24832):ClientCnxn$SendThread@1231] - Unable to read 
additional data from server sessionid 0x30159a872bc, likely server has 
closed socket, closing socket connection and attempting reconnect
[junit] 2016-12-03 18:37:13,231 [myid:127.0.0.1:24814] - INFO  
[main-SendThread(127.0.0.1:24814):ClientCnxn$SendThread@1113] - Opening socket 
connection to server 127.0.0.1/127.0.0.1:24814. Will not attempt to 
authenticate using SASL (unknown error)
[junit] 2016-12-03 18:37:13,232 [myid:127.0.0.1:24814] - WARN  
[main-SendThread(127.0.0.1:24814):ClientCnxn$SendThread@1235] - Session 
0x30159a845b6 for server 127.0.0.1/127.0.0.1:24814, unexpected error, 
closing socket connection and attempting reconnect
[junit] java.net.ConnectException: Connection refused
[junit] at sun.nio.ch.SocketChannelImpl.checkConnect(Native Method)
[junit] at 
sun.nio.ch.SocketChannelImpl.finishConnect(SocketChannelImpl.java:717)
[junit] at 
org.apache.zookeeper.ClientCnxnSocketNIO.doTransport(ClientCnxnSocketNIO.java:357)
[junit] at 
org.apache.zookeeper.ClientCnxn$SendThread.run(ClientCnxn.java:1214)
[junit] 2016-12-03 18:37:13,375 [myid:127.0.0.1:24811] - INFO  
[main-SendThread(127.0.0.1:24811):ClientCnxn$SendThread@1113] - Opening socket 
connection to server 127.0.0.1/127.0.0.1:24811. Will not attempt to 
authenticate using SASL (unknown error)
[junit] 2016-12-03 18:37:13,375 [myid:127.0.0.1:24811] - WARN  
[main-SendThread(127.0.0.1:24811):ClientCnxn$SendThread@1235] - Session 
0x20159a84506 for server 127.0.0.1/127.0.0.1:24811, unexpected error, 
closing socket connection and attempting reconnect
[junit] java.net.ConnectException: Connection refused
[junit] at sun.nio.ch.SocketChannelImpl.checkConnect(Native Method)
[junit] at 
sun.nio.ch.SocketChannelImpl.finishConnect(SocketChannelImpl.java:717)
[junit] at 
org.apache.zookeeper.ClientCnxnSocketNIO.doTransport(ClientCnxnSocketNIO.java:357)
[junit] at 
org.apache.zookeeper.ClientCnxn$SendThread.run(ClientCnxn.java:1214)
[junit] 2016-12-03 18:37:13,503 [myid:127.0.0.1:24808] - INFO  
[main-SendThread(127.0.0.1:24808):ClientCnxn$SendThread@1113] - Opening socket 
connection to server 127.0.0.1/127.0.0.1:24808. Will not attempt to 
authenticate using SASL (unknown error)
[junit] 2016-12-03 18:37:13,503 [myid:127.0.0.1:24808] - WARN  
[main-SendThread(127.0.0.1:24808):ClientCnxn$SendThread@1235] - Session 
0x10159a84506 for server 127.0.0.1/127.0.0.1:24808, unexpected error, 
closing socket connection and attempting reconnect
[junit] java.net.ConnectException: Connection refused
[junit] at sun.nio.ch.SocketChannelImpl.checkConnect(Native Method)
[junit] at 
sun.nio.ch.SocketChannelImpl.finishConnect(SocketChannelImpl.java:717)
[junit] at 
org.apache.zookeeper.ClientCnxnSocket

ZooKeeper-trunk-solaris - Build # 1409 - Still Failing

2016-12-03 Thread Apache Jenkins Server
See https://builds.apache.org/job/ZooKeeper-trunk-solaris/1409/

###
## LAST 60 LINES OF THE CONSOLE 
###
[...truncated 46228 lines...]
[junit] java.net.ConnectException: Connection refused
[junit] at sun.nio.ch.Net.connect0(Native Method)
[junit] at sun.nio.ch.Net.connect(Net.java:465)
[junit] at sun.nio.ch.Net.connect(Net.java:457)
[junit] at 
sun.nio.ch.SocketChannelImpl.connect(SocketChannelImpl.java:670)
[junit] at 
org.apache.zookeeper.ClientCnxnSocketNIO.registerAndConnect(ClientCnxnSocketNIO.java:275)
[junit] at 
org.apache.zookeeper.ClientCnxnSocketNIO.connect(ClientCnxnSocketNIO.java:285)
[junit] at 
org.apache.zookeeper.ClientCnxn$SendThread.startConnect(ClientCnxn.java:1098)
[junit] at 
org.apache.zookeeper.ClientCnxn$SendThread.run(ClientCnxn.java:1133)
[junit] 2016-12-03 18:11:38,481 [myid:127.0.0.1:11243] - INFO  
[main-SendThread(127.0.0.1:11243):ClientCnxn$SendThread@1113] - Opening socket 
connection to server 127.0.0.1/127.0.0.1:11243. Will not attempt to 
authenticate using SASL (unknown error)
[junit] 2016-12-03 18:11:38,481 [myid:127.0.0.1:11243] - ERROR 
[main-SendThread(127.0.0.1:11243):ClientCnxnSocketNIO@287] - Unable to open 
socket to 127.0.0.1/127.0.0.1:11243
[junit] 2016-12-03 18:11:38,481 [myid:127.0.0.1:11243] - WARN  
[main-SendThread(127.0.0.1:11243):ClientCnxn$SendThread@1235] - Session 
0x2542db11fb for server null, unexpected error, closing socket connection 
and attempting reconnect
[junit] java.net.ConnectException: Connection refused
[junit] at sun.nio.ch.Net.connect0(Native Method)
[junit] at sun.nio.ch.Net.connect(Net.java:465)
[junit] at sun.nio.ch.Net.connect(Net.java:457)
[junit] at 
sun.nio.ch.SocketChannelImpl.connect(SocketChannelImpl.java:670)
[junit] at 
org.apache.zookeeper.ClientCnxnSocketNIO.registerAndConnect(ClientCnxnSocketNIO.java:275)
[junit] at 
org.apache.zookeeper.ClientCnxnSocketNIO.connect(ClientCnxnSocketNIO.java:285)
[junit] at 
org.apache.zookeeper.ClientCnxn$SendThread.startConnect(ClientCnxn.java:1098)
[junit] at 
org.apache.zookeeper.ClientCnxn$SendThread.run(ClientCnxn.java:1133)
[junit] Tests run: 10, Failures: 0, Errors: 0, Time elapsed: 153.273 sec
[junit] 2016-12-03 18:11:38,641 [myid:1] - INFO  
[WorkerSender[myid=1]:FastLeaderElection$Messenger$WorkerSender@470] - 
WorkerSender is down
[junit] 2016-12-03 18:11:38,641 [myid:1] - INFO  
[WorkerReceiver[myid=1]:FastLeaderElection$Messenger$WorkerReceiver@440] - 
WorkerReceiver is down
[junit] Running org.apache.zookeeper.server.quorum.QuorumPeerTest
[junit] 2016-12-03 18:12:16,887 [myid:] - INFO  [main:PortAssignment@157] - 
Single test process using ports from 11221 - 32767.
[junit] 2016-12-03 18:12:17,089 [myid:] - INFO  [main:PortAssignment@85] - 
Assigned port 11222 from range 11221 - 32767.
[junit] 2016-12-03 18:12:17,447 [myid:] - INFO  [main:PortAssignment@85] - 
Assigned port 11223 from range 11221 - 32767.
[junit] 2016-12-03 18:12:17,447 [myid:] - INFO  [main:PortAssignment@85] - 
Assigned port 11224 from range 11221 - 32767.
[junit] 2016-12-03 18:12:19,545 [myid:] - INFO  
[main:NIOServerCnxnFactory@673] - Configuring NIO connection handler with 10s 
sessionless connection timeout, 2 selector thread(s), 16 worker threads, and 64 
kB direct buffers.
[junit] 2016-12-03 18:12:19,715 [myid:] - INFO  
[main:NIOServerCnxnFactory@686] - binding to port localhost/127.0.0.1:11222
[junit] 2016-12-03 18:12:21,020 [myid:] - INFO  [main:Log@186] - Logging 
initialized @25504ms
[junit] 2016-12-03 18:12:22,696 [myid:] - WARN  [main:ContextHandler@1339] 
- o.e.j.s.ServletContextHandler@12a9118{/,null,null} contextPath ends with /*
[junit] 2016-12-03 18:12:22,696 [myid:] - WARN  [main:ContextHandler@1350] 
- Empty contextPath
[junit] 2016-12-03 18:12:23,412 [myid:] - WARN  [main:ContextHandler@1339] 
- o.e.j.s.ServletContextHandler@146fac0{/,null,null} contextPath ends with /*
[junit] 2016-12-03 18:12:23,412 [myid:] - WARN  [main:ContextHandler@1350] 
- Empty contextPath
[junit] 2016-12-03 18:12:23,432 [myid:] - INFO  [main:PortAssignment@85] - 
Assigned port 11225 from range 11221 - 32767.
[junit] 2016-12-03 18:12:23,432 [myid:] - INFO  [main:PortAssignment@85] - 
Assigned port 11226 from range 11221 - 32767.
[junit] 2016-12-03 18:12:23,432 [myid:] - INFO  [main:PortAssignment@85] - 
Assigned port 11227 from range 11221 - 32767.
[junit] 2016-12-03 18:12:23,433 [myid:] - INFO  
[main:NIOServerCnxnFactory@673] - Configuring NIO connection handler with 10s 
sessionless connection timeout, 2 selector thread(s), 16 worker threads, and 64 
kB direct buffers.
[junit] 2016-12-03 18:12:23,433 [myid:] - INFO  
[main:NIOServerCnxnFactory@686] - bin

ZooKeeper-trunk - Build # 3180 - Still Failing

2016-12-03 Thread Apache Jenkins Server
See https://builds.apache.org/job/ZooKeeper-trunk/3180/

###
## LAST 60 LINES OF THE CONSOLE 
###
[...truncated 452413 lines...]
[junit] at 
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
[junit] at 
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
[junit] at java.lang.Thread.run(Thread.java:745)
[junit] 2016-12-03 17:32:09,403 [myid:] - INFO  [New I/O boss 
#:ClientCnxnSocketNetty@208] - channel is told closing
[junit] 2016-12-03 17:32:09,403 [myid:127.0.0.1:14039] - INFO  
[main-SendThread(127.0.0.1:14039):ClientCnxn$SendThread@1231] - channel for 
sessionid 0x201562be706 is lost, closing socket connection and attempting 
reconnect
[junit] 2016-12-03 17:32:09,699 [myid:127.0.0.1:14036] - INFO  
[main-SendThread(127.0.0.1:14036):ClientCnxn$SendThread@1113] - Opening socket 
connection to server 127.0.0.1/127.0.0.1:14036. Will not attempt to 
authenticate using SASL (unknown error)
[junit] 2016-12-03 17:32:09,700 [myid:] - INFO  [New I/O boss 
#9966:ClientCnxnSocketNetty$1@127] - future isn't success, cause: {}
[junit] java.net.ConnectException: Connection refused: 
127.0.0.1/127.0.0.1:14036
[junit] at sun.nio.ch.SocketChannelImpl.checkConnect(Native Method)
[junit] at 
sun.nio.ch.SocketChannelImpl.finishConnect(SocketChannelImpl.java:744)
[junit] at 
org.jboss.netty.channel.socket.nio.NioClientBoss.connect(NioClientBoss.java:152)
[junit] at 
org.jboss.netty.channel.socket.nio.NioClientBoss.processSelectedKeys(NioClientBoss.java:105)
[junit] at 
org.jboss.netty.channel.socket.nio.NioClientBoss.process(NioClientBoss.java:79)
[junit] at 
org.jboss.netty.channel.socket.nio.AbstractNioSelector.run(AbstractNioSelector.java:337)
[junit] at 
org.jboss.netty.channel.socket.nio.NioClientBoss.run(NioClientBoss.java:42)
[junit] at 
org.jboss.netty.util.ThreadRenamingRunnable.run(ThreadRenamingRunnable.java:108)
[junit] at 
org.jboss.netty.util.internal.DeadLockProofWorker$1.run(DeadLockProofWorker.java:42)
[junit] at 
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
[junit] at 
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
[junit] at java.lang.Thread.run(Thread.java:745)
[junit] 2016-12-03 17:32:09,700 [myid:] - WARN  [New I/O boss 
#9966:ClientCnxnSocketNetty$ZKClientHandler@439] - Exception caught: [id: 
0x1b845a3b] EXCEPTION: java.net.ConnectException: Connection refused: 
127.0.0.1/127.0.0.1:14036
[junit] java.net.ConnectException: Connection refused: 
127.0.0.1/127.0.0.1:14036
[junit] at sun.nio.ch.SocketChannelImpl.checkConnect(Native Method)
[junit] at 
sun.nio.ch.SocketChannelImpl.finishConnect(SocketChannelImpl.java:744)
[junit] at 
org.jboss.netty.channel.socket.nio.NioClientBoss.connect(NioClientBoss.java:152)
[junit] at 
org.jboss.netty.channel.socket.nio.NioClientBoss.processSelectedKeys(NioClientBoss.java:105)
[junit] at 
org.jboss.netty.channel.socket.nio.NioClientBoss.process(NioClientBoss.java:79)
[junit] at 
org.jboss.netty.channel.socket.nio.AbstractNioSelector.run(AbstractNioSelector.java:337)
[junit] at 
org.jboss.netty.channel.socket.nio.NioClientBoss.run(NioClientBoss.java:42)
[junit] at 
org.jboss.netty.util.ThreadRenamingRunnable.run(ThreadRenamingRunnable.java:108)
[junit] at 
org.jboss.netty.util.internal.DeadLockProofWorker$1.run(DeadLockProofWorker.java:42)
[junit] at 
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
[junit] at 
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
[junit] at java.lang.Thread.run(Thread.java:745)
[junit] 2016-12-03 17:32:09,701 [myid:] - INFO  [New I/O boss 
#9966:ClientCnxnSocketNetty@208] - channel is told closing
[junit] 2016-12-03 17:32:09,701 [myid:127.0.0.1:14036] - INFO  
[main-SendThread(127.0.0.1:14036):ClientCnxn$SendThread@1231] - channel for 
sessionid 0x101562be74b is lost, closing socket connection and attempting 
reconnect

BUILD FAILED
/home/jenkins/jenkins-slave/workspace/ZooKeeper-trunk/build.xml:1324: The 
following error occurred while executing this line:
/home/jenkins/jenkins-slave/workspace/ZooKeeper-trunk/build.xml:1209: Tests 
failed!

Total time: 14 minutes 50 seconds
Build step 'Execute shell' marked build as failure
[FINDBUGS] Skipping publisher since build result is FAILURE
[WARNINGS] Skipping publisher since build result is FAILURE
Archiving artifacts
Setting JDK_1_7_LATEST__HOME=/home/jenkins/tools/java/latest1.7
Recording fingerprints
Setting JDK_1_7_LATEST__HOME=/home/jenkins/tools/java/latest1.7
Updating ZOOKEEPER-2627
Recording test results
Setting JDK_1

[jira] [Commented] (ZOOKEEPER-2627) Remove ZRWSERVERFOUND from C client and replace handle_error with something more semantically explicit for r/w server reconnect.

2016-12-03 Thread Hudson (JIRA)

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

Hudson commented on ZOOKEEPER-2627:
---

FAILURE: Integrated in Jenkins build ZooKeeper-trunk #3180 (See 
[https://builds.apache.org/job/ZooKeeper-trunk/3180/])
ZOOKEEPER-2627: Remove ZRWSERVERFOUND from C client. (rgs: rev 
73d6bf5353586e49740f77291d1fd98b07f916cc)
* (edit) src/c/src/zookeeper.c
* (edit) src/c/include/zookeeper.h
* (edit) src/c/src/zk_adaptor.h


> Remove ZRWSERVERFOUND from C client and replace handle_error with something 
> more semantically explicit for r/w server reconnect.
> 
>
> Key: ZOOKEEPER-2627
> URL: https://issues.apache.org/jira/browse/ZOOKEEPER-2627
> Project: ZooKeeper
>  Issue Type: Bug
>  Components: c client
>Affects Versions: 3.5.2
>Reporter: Michael Han
>Assignee: Michael Han
> Fix For: 3.5.3
>
> Attachments: ZOOKEEPER-2627.patch, ZOOKEEPER-2627.patch
>
>
> While working on ZOOKEEPER-2014, I noticed a discrepancy between Java and C 
> client regarding the error codes definition. There is a 
> {noformat}ZRWSERVERFOUND = -122{noformat} definition in C client which is not 
> present in Java client's KeeperException.Code definitions. 
> This discrepancy was introduced by ZOOKEEPER-827, where the C client logic 
> was simulating the Java client's logic when doing a read/write server search 
> while client is in read only mode. Once client finds a valid read/write 
> server, client will try to disconnect and reconnect with this read/write 
> server, as we always prefer r/w server in ro mode. The way Java client is 
> doing this disconnect/reconnect process is by throwing a 
> RWServerFoundException (instead of a KeeperException) to set the client in 
> disconnected state, then wait for client reconnect with r/w server address 
> set before throwing the exception. C client did similar but instead of having 
> an explicitly disconnect / clean up routine, the client was relying on 
> handle_error to do the job where ZRWSERVERFOUND was introduced.
> I propose we remove ZRWSERVERFOUND error code from C client and use an 
> explicit routine instead of handle_error when we do r/w server search in C 
> client for two reasons:
> * ZRWSERVERFOUND is not something ZK client users would need to know. It's a 
> pure implementation detail that's used to alter the connection state of the 
> client, and ZK client users have no desire nor need to handle such errors, as 
> R/W server scanning and connect is handled transparently by ZK client library.
> * To maintain consistency between Java and C client regarding error codes 
> definition. Without removing this from C client, we would need to replace 
> RWServerFoundException in Java client with a new KeeperException, and again 
> with the reason mentioned above, we don't need a KeeperException for this 
> because such implementation detail does not have to be exposed to end users 
> (unless, we provided alternative for users to opt-out automate R/W server 
> switching when in read only mode which we don't.).



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[GitHub] zookeeper issue #99: ZOOKEEPER-2549 Add exception handling to sendResponse

2016-12-03 Thread rgs1
Github user rgs1 commented on the issue:

https://github.com/apache/zookeeper/pull/99
  
@fpj, @hanm could you take a look? I am +1, but another look would be nice.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[jira] [Commented] (ZOOKEEPER-2549) As NettyServerCnxn.sendResponse() allows all the exception to bubble up it can stop main ZK requests processing thread

2016-12-03 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on ZOOKEEPER-2549:
---

Github user rgs1 commented on the issue:

https://github.com/apache/zookeeper/pull/99
  
@fpj, @hanm could you take a look? I am +1, but another look would be nice.


> As NettyServerCnxn.sendResponse() allows all the exception to bubble up it 
> can stop main ZK requests processing thread
> --
>
> Key: ZOOKEEPER-2549
> URL: https://issues.apache.org/jira/browse/ZOOKEEPER-2549
> Project: ZooKeeper
>  Issue Type: Bug
>  Components: server
>Affects Versions: 3.5.1
>Reporter: Yuliya Feldman
>Assignee: Yuliya Feldman
> Attachments: ZOOKEEPER-2549-2.patch, ZOOKEEPER-2549-3.patch, 
> ZOOKEEPER-2549-3.patch, ZOOKEEPER-2549-4.patch, ZOOKEEPER-2549.patch, 
> ZOOKEEPER-2549.patch, zookeeper-2549-1.patch
>
>
> As NettyServerCnxn.sendResponse() allows all the exception to bubble up it 
> can stop main ZK requests processing thread and make Zookeeper server look 
> like it is hanging, while it just can not process any request anymore.
> Idea is to catch all the exceptions in NettyServerCnxn.sendResponse() , 
> convert them to IOException and allow it propagating up



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


ZooKeeper-trunk-WinVS2008 - Build # 2347 - Still Failing

2016-12-03 Thread Apache Jenkins Server
See https://builds.apache.org/job/ZooKeeper-trunk-WinVS2008/2347/

###
## LAST 60 LINES OF THE CONSOLE 
###
[...truncated 78 lines...]

ivy-retrieve:
[ivy:retrieve] :: Apache Ivy 2.4.0 - 20141213170938 :: 
http://ant.apache.org/ivy/ ::
[ivy:retrieve] :: loading settings :: file = 
f:\jenkins\jenkins-slave\workspace\ZooKeeper-trunk-WinVS2008\ivysettings.xml
[ivy:retrieve] :: resolving dependencies :: 
org.apache.zookeeper#zookeeper;3.6.0-SNAPSHOT
[ivy:retrieve]  confs: [default]
[ivy:retrieve]  found jline#jline;2.11 in maven2
[ivy:retrieve]  found org.eclipse.jetty#jetty-server;9.2.18.v20160721 in maven2
[ivy:retrieve]  found javax.servlet#javax.servlet-api;3.1.0 in maven2
[ivy:retrieve]  found org.eclipse.jetty#jetty-http;9.2.18.v20160721 in maven2
[ivy:retrieve]  found org.eclipse.jetty#jetty-util;9.2.18.v20160721 in maven2
[ivy:retrieve]  found org.eclipse.jetty#jetty-io;9.2.18.v20160721 in maven2
[ivy:retrieve]  found org.eclipse.jetty#jetty-servlet;9.2.18.v20160721 in maven2
[ivy:retrieve]  found org.eclipse.jetty#jetty-security;9.2.18.v20160721 in 
maven2
[ivy:retrieve]  found org.codehaus.jackson#jackson-mapper-asl;1.9.11 in maven2
[ivy:retrieve]  found org.codehaus.jackson#jackson-core-asl;1.9.11 in maven2
[ivy:retrieve]  found org.slf4j#slf4j-api;1.7.5 in maven2
[ivy:retrieve]  found org.slf4j#slf4j-log4j12;1.7.5 in maven2
[ivy:retrieve]  found commons-cli#commons-cli;1.2 in maven2
[ivy:retrieve]  found log4j#log4j;1.2.17 in maven2
[ivy:retrieve]  found io.netty#netty;3.10.5.Final in maven2
[ivy:retrieve]  found net.java.dev.javacc#javacc;5.0 in maven2
[ivy:retrieve] :: resolution report :: resolve 414ms :: artifacts dl 162ms
-
|  |modules||   artifacts   |
|   conf   | number| search|dwnlded|evicted|| number|dwnlded|
-
|  default |   16  |   0   |   0   |   0   ||   16  |   0   |
-
[ivy:retrieve] :: retrieving :: org.apache.zookeeper#zookeeper
[ivy:retrieve]  confs: [default]
[ivy:retrieve]  16 artifacts copied, 0 already retrieved (4635kB/41ms)

generate_jute_parser:
[mkdir] Created dir: 
f:\jenkins\jenkins-slave\workspace\ZooKeeper-trunk-WinVS2008\build\jute_compiler\org\apache\jute\compiler\generated
[ivy:artifactproperty] DEPRECATED: 'ivy.conf.file' is deprecated, use 
'ivy.settings.file' instead
[ivy:artifactproperty] :: loading settings :: file = 
f:\jenkins\jenkins-slave\workspace\ZooKeeper-trunk-WinVS2008\ivysettings.xml
 [move] Moving 1 file to 
f:\jenkins\jenkins-slave\workspace\ZooKeeper-trunk-WinVS2008\build\lib
   [javacc] Java Compiler Compiler Version 5.0 (Parser Generator)
   [javacc] (type "javacc" with no arguments for help)
   [javacc] Reading from file 
f:\jenkins\jenkins-slave\workspace\ZooKeeper-trunk-WinVS2008\src\java\main\org\apache\jute\compiler\generated\rcc.jj
 . . .
   [javacc] File "TokenMgrError.java" does not exist.  Will create one.
   [javacc] File "ParseException.java" does not exist.  Will create one.
   [javacc] File "Token.java" does not exist.  Will create one.
   [javacc] File "SimpleCharStream.java" does not exist.  Will create one.
   [javacc] Parser generated successfully.

jute:

BUILD FAILED
f:\jenkins\jenkins-slave\workspace\ZooKeeper-trunk-WinVS2008\build.xml:273: 
Unable to find a javac compiler;
com.sun.tools.javac.Main is not on the classpath.
Perhaps JAVA_HOME does not point to the JDK.
It is currently set to "C:\Program Files\Java\jre1.8.0_92"

Total time: 3 seconds
Build step 'Invoke Ant' marked build as failure
Email was triggered for: Failure - Any
Sending email for trigger: Failure - Any



###
## FAILED TESTS (if any) 
##
No tests ran.

[jira] [Commented] (ZOOKEEPER-2325) Data inconsistency if all snapshots empty or missing

2016-12-03 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on ZOOKEEPER-2325:
---

Github user rgs1 commented on a diff in the pull request:

https://github.com/apache/zookeeper/pull/117#discussion_r90761121
  
--- Diff: 
src/java/test/org/apache/zookeeper/test/EmptiedSnapshotRecoveryTest.java ---
@@ -0,0 +1,134 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.zookeeper.test;
+
+import java.io.IOException;
+import java.io.File;
+import java.io.PrintWriter;
+import java.util.List;
+import java.util.LinkedList;
+
+import org.apache.log4j.Logger;
+import org.apache.zookeeper.CreateMode;
+import org.apache.zookeeper.PortAssignment;
+import org.apache.zookeeper.WatchedEvent;
+import org.apache.zookeeper.Watcher;
+import org.apache.zookeeper.ZKTestCase;
+import org.apache.zookeeper.ZooKeeper;
+import org.apache.zookeeper.ZooDefs.Ids;
+import org.apache.zookeeper.server.quorum.Leader.Proposal;
+import org.apache.zookeeper.server.ServerCnxnFactory;
+import org.apache.zookeeper.server.SyncRequestProcessor;
+import org.apache.zookeeper.server.ZooKeeperServer;
+import org.apache.zookeeper.server.persistence.FileTxnSnapLog;
+import org.junit.Assert;
+import org.junit.Test;
+
+/** If snapshots are corrupted to the empty file or deleted, Zookeeper 
should 
+ *  not proceed to read its transactiong log files
+ *  Test that zxid == -1 in the presence of emptied/deleted snapshots
+ */
+public class EmptiedSnapshotRecoveryTest extends ZKTestCase implements  
Watcher {
+private static final Logger LOG = 
Logger.getLogger(RestoreCommittedLogTest.class);
+private static String HOSTPORT = "127.0.0.1:" + 
PortAssignment.unique();
+private static final int CONNECTION_TIMEOUT = 3000;
+private static final int N_TRANSACTIONS = 150;
+private static final int SNAP_COUNT = 100;
+
+public void runTest(boolean leaveEmptyFile) throws Exception {
--- End diff --

@breed do you want to take @hanm's suggestion or should I merge this and we 
get that in another pass?


> Data inconsistency if all snapshots empty or missing
> 
>
> Key: ZOOKEEPER-2325
> URL: https://issues.apache.org/jira/browse/ZOOKEEPER-2325
> Project: ZooKeeper
>  Issue Type: Bug
>  Components: server
>Affects Versions: 3.4.6
>Reporter: Andrew Grasso
>Assignee: Andrew Grasso
>Priority: Critical
> Attachments: ZOOKEEPER-2325-test.patch, ZOOKEEPER-2325.001.patch, 
> zk.patch
>
>   Original Estimate: 1h
>  Remaining Estimate: 1h
>
> When loading state from snapshots on startup, FileTxnSnapLog.java ignores the 
> result of FileSnap.deserialize, which is -1L if no valid snapshots are found. 
> Recovery proceeds with dt.lastProcessed == 0, its initial value.
> The result is that Zookeeper will process the transaction logs and then begin 
> serving requests with a different state than the rest of the ensemble.
> To reproduce:
> In a healthy zookeeper cluster of size >= 3, shut down one node.
> Either delete all snapshots for this node or change all to be empty files.
> Restart the node.
> We believe this can happen organically if a node runs out of disk space.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[GitHub] zookeeper pull request #117: ZOOKEEPER-2325: Data inconsistency if all snaps...

2016-12-03 Thread rgs1
Github user rgs1 commented on a diff in the pull request:

https://github.com/apache/zookeeper/pull/117#discussion_r90761121
  
--- Diff: 
src/java/test/org/apache/zookeeper/test/EmptiedSnapshotRecoveryTest.java ---
@@ -0,0 +1,134 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.zookeeper.test;
+
+import java.io.IOException;
+import java.io.File;
+import java.io.PrintWriter;
+import java.util.List;
+import java.util.LinkedList;
+
+import org.apache.log4j.Logger;
+import org.apache.zookeeper.CreateMode;
+import org.apache.zookeeper.PortAssignment;
+import org.apache.zookeeper.WatchedEvent;
+import org.apache.zookeeper.Watcher;
+import org.apache.zookeeper.ZKTestCase;
+import org.apache.zookeeper.ZooKeeper;
+import org.apache.zookeeper.ZooDefs.Ids;
+import org.apache.zookeeper.server.quorum.Leader.Proposal;
+import org.apache.zookeeper.server.ServerCnxnFactory;
+import org.apache.zookeeper.server.SyncRequestProcessor;
+import org.apache.zookeeper.server.ZooKeeperServer;
+import org.apache.zookeeper.server.persistence.FileTxnSnapLog;
+import org.junit.Assert;
+import org.junit.Test;
+
+/** If snapshots are corrupted to the empty file or deleted, Zookeeper 
should 
+ *  not proceed to read its transactiong log files
+ *  Test that zxid == -1 in the presence of emptied/deleted snapshots
+ */
+public class EmptiedSnapshotRecoveryTest extends ZKTestCase implements  
Watcher {
+private static final Logger LOG = 
Logger.getLogger(RestoreCommittedLogTest.class);
+private static String HOSTPORT = "127.0.0.1:" + 
PortAssignment.unique();
+private static final int CONNECTION_TIMEOUT = 3000;
+private static final int N_TRANSACTIONS = 150;
+private static final int SNAP_COUNT = 100;
+
+public void runTest(boolean leaveEmptyFile) throws Exception {
--- End diff --

@breed do you want to take @hanm's suggestion or should I merge this and we 
get that in another pass?


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


Failed: ZOOKEEPER- PreCommit Build #97

2016-12-03 Thread Apache Jenkins Server
Build: https://builds.apache.org/job/PreCommit-ZOOKEEPER-github-pr-build/97/

###
## LAST 60 LINES OF THE CONSOLE 
###
[...truncated 30 lines...]
at hudson.remoting.Request$2.run(Request.java:332)
at 
hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:68)
at java.util.concurrent.FutureTask.run(FutureTask.java:262)
at 
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at 
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:745)
at ..remote call to H7(Native Method)
at hudson.remoting.Channel.attachCallSiteStackTrace(Channel.java:1416)
at hudson.remoting.UserResponse.retrieve(UserRequest.java:253)
at hudson.remoting.Channel.call(Channel.java:781)
at 
hudson.remoting.RemoteInvocationHandler.invoke(RemoteInvocationHandler.java:249)
at com.sun.proxy.$Proxy151.checkoutBranch(Unknown Source)
at 
org.jenkinsci.plugins.gitclient.RemoteGitImpl.checkoutBranch(RemoteGitImpl.java:327)
at 
com.cloudbees.jenkins.plugins.git.vmerge.BuildChooserImpl.getCandidateRevisions(BuildChooserImpl.java:78)
at hudson.plugins.git.GitSCM.determineRevisionToBuild(GitSCM.java:984)
at hudson.plugins.git.GitSCM.checkout(GitSCM.java:1087)
at hudson.scm.SCM.checkout(SCM.java:485)
at hudson.model.AbstractProject.checkout(AbstractProject.java:1269)
at 
hudson.model.AbstractBuild$AbstractBuildExecution.defaultCheckout(AbstractBuild.java:604)
at jenkins.scm.SCMCheckoutStrategy.checkout(SCMCheckoutStrategy.java:86)
at 
hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:529)
at hudson.model.Run.execute(Run.java:1741)
at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
at hudson.model.ResourceController.execute(ResourceController.java:98)
at hudson.model.Executor.run(Executor.java:410)
Caused by: hudson.plugins.git.GitException: Command "git checkout -f 
origin/trunk" returned status code 1:
stdout: 
stderr: error: pathspec 'origin/trunk' did not match any file(s) known to git.

at 
org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:1723)
at 
org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:1699)
at 
org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:1695)
at 
org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommand(CliGitAPIImpl.java:1317)
at 
org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommand(CliGitAPIImpl.java:1329)
at 
org.jenkinsci.plugins.gitclient.CliGitAPIImpl$9.execute(CliGitAPIImpl.java:1979)
at 
org.jenkinsci.plugins.gitclient.AbstractGitAPIImpl.checkoutBranch(AbstractGitAPIImpl.java:82)
at 
org.jenkinsci.plugins.gitclient.CliGitAPIImpl.checkoutBranch(CliGitAPIImpl.java:63)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at 
hudson.remoting.RemoteInvocationHandler$RPCRequest.perform(RemoteInvocationHandler.java:884)
at 
hudson.remoting.RemoteInvocationHandler$RPCRequest.call(RemoteInvocationHandler.java:859)
at 
hudson.remoting.RemoteInvocationHandler$RPCRequest.call(RemoteInvocationHandler.java:818)
at hudson.remoting.UserRequest.perform(UserRequest.java:153)
at hudson.remoting.UserRequest.perform(UserRequest.java:50)
at hudson.remoting.Request$2.run(Request.java:332)
at 
hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:68)
at java.util.concurrent.FutureTask.run(FutureTask.java:262)
at 
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at 
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:745)
Archiving artifacts
Recording test results
ERROR: Step ?Publish JUnit test result report? failed: No test report files 
were found. Configuration error?
[description-setter] Could not determine description.
Putting comment on the pull request
Email was triggered for: Failure - Any
Sending email for trigger: Failure - Any



###
## FAILED TESTS (if any) 
##
No tests ran.

[GitHub] zookeeper pull request #100: ZOOKEEPER-2627:Remove ZRWSERVERFOUND from C cli...

2016-12-03 Thread asfgit
Github user asfgit closed the pull request at:

https://github.com/apache/zookeeper/pull/100


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[jira] [Commented] (ZOOKEEPER-2627) Remove ZRWSERVERFOUND from C client and replace handle_error with something more semantically explicit for r/w server reconnect.

2016-12-03 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on ZOOKEEPER-2627:
---

Github user asfgit closed the pull request at:

https://github.com/apache/zookeeper/pull/100


> Remove ZRWSERVERFOUND from C client and replace handle_error with something 
> more semantically explicit for r/w server reconnect.
> 
>
> Key: ZOOKEEPER-2627
> URL: https://issues.apache.org/jira/browse/ZOOKEEPER-2627
> Project: ZooKeeper
>  Issue Type: Bug
>  Components: c client
>Affects Versions: 3.5.2
>Reporter: Michael Han
>Assignee: Michael Han
> Fix For: 3.5.3
>
> Attachments: ZOOKEEPER-2627.patch, ZOOKEEPER-2627.patch
>
>
> While working on ZOOKEEPER-2014, I noticed a discrepancy between Java and C 
> client regarding the error codes definition. There is a 
> {noformat}ZRWSERVERFOUND = -122{noformat} definition in C client which is not 
> present in Java client's KeeperException.Code definitions. 
> This discrepancy was introduced by ZOOKEEPER-827, where the C client logic 
> was simulating the Java client's logic when doing a read/write server search 
> while client is in read only mode. Once client finds a valid read/write 
> server, client will try to disconnect and reconnect with this read/write 
> server, as we always prefer r/w server in ro mode. The way Java client is 
> doing this disconnect/reconnect process is by throwing a 
> RWServerFoundException (instead of a KeeperException) to set the client in 
> disconnected state, then wait for client reconnect with r/w server address 
> set before throwing the exception. C client did similar but instead of having 
> an explicitly disconnect / clean up routine, the client was relying on 
> handle_error to do the job where ZRWSERVERFOUND was introduced.
> I propose we remove ZRWSERVERFOUND error code from C client and use an 
> explicit routine instead of handle_error when we do r/w server search in C 
> client for two reasons:
> * ZRWSERVERFOUND is not something ZK client users would need to know. It's a 
> pure implementation detail that's used to alter the connection state of the 
> client, and ZK client users have no desire nor need to handle such errors, as 
> R/W server scanning and connect is handled transparently by ZK client library.
> * To maintain consistency between Java and C client regarding error codes 
> definition. Without removing this from C client, we would need to replace 
> RWServerFoundException in Java client with a new KeeperException, and again 
> with the reason mentioned above, we don't need a KeeperException for this 
> because such implementation detail does not have to be exposed to end users 
> (unless, we provided alternative for users to opt-out automate R/W server 
> switching when in read only mode which we don't.).



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


about zookeeper ebook

2016-12-03 Thread ??????
hi, I would like to know the communication protocol of zookeeper, where can i 
find the article about it ,can you send me the official documents or a link?

ZooKeeper_branch34_openjdk7 - Build # 1294 - Failure

2016-12-03 Thread Apache Jenkins Server
See https://builds.apache.org/job/ZooKeeper_branch34_openjdk7/1294/

###
## LAST 60 LINES OF THE CONSOLE 
###
Started by timer
[EnvInject] - Loading node environment variables.
Building remotely on H13 (ubuntu) in workspace 
/home/jenkins/jenkins-slave/workspace/ZooKeeper_branch34_openjdk7
 > git rev-parse --is-inside-work-tree # timeout=10
Fetching changes from the remote Git repository
 > git config remote.origin.url git://git.apache.org/zookeeper.git # timeout=10
Cleaning workspace
 > git rev-parse --verify HEAD # timeout=10
Resetting working tree
 > git reset --hard # timeout=10
 > git clean -fdx # timeout=10
Fetching upstream changes from git://git.apache.org/zookeeper.git
 > git --version # timeout=10
 > git -c core.askpass=true fetch --tags --progress 
 > git://git.apache.org/zookeeper.git +refs/heads/*:refs/remotes/origin/*
 > git rev-parse refs/remotes/origin/branch-3.4^{commit} # timeout=10
 > git rev-parse refs/remotes/origin/origin/branch-3.4^{commit} # timeout=10
Checking out Revision 967c3a71bd8eaf1ac29b2702173115976874bd8e 
(refs/remotes/origin/branch-3.4)
 > git config core.sparsecheckout # timeout=10
 > git checkout -f 967c3a71bd8eaf1ac29b2702173115976874bd8e
 > git rev-list 967c3a71bd8eaf1ac29b2702173115976874bd8e # timeout=10
No emails were triggered.
[ZooKeeper_branch34_openjdk7] $ /home/jenkins/tools/ant/latest/bin/ant 
-Dtest.output=yes -Dtest.junit.threads=8 -Dtest.junit.output.format=xml 
-Djavac.target=1.7 clean test-core-java
Error: JAVA_HOME is not defined correctly.
  We cannot execute /usr/lib/jvm/java-7-openjdk-amd64//bin/java
Build step 'Invoke Ant' marked build as failure
Recording test results
ERROR: Step ?Publish JUnit test result report? failed: No test report files 
were found. Configuration error?
Email was triggered for: Failure - Any
Sending email for trigger: Failure - Any



###
## FAILED TESTS (if any) 
##
No tests ran.

ZooKeeper_branch35_jdk8 - Build # 321 - Still Failing

2016-12-03 Thread Apache Jenkins Server
See https://builds.apache.org/job/ZooKeeper_branch35_jdk8/321/

###
## LAST 60 LINES OF THE CONSOLE 
###
[...truncated 450443 lines...]
[junit] 2016-12-03 13:54:26,474 [myid:] - INFO  [New I/O worker 
#1811:ZooKeeperServer@713] - Established session 0x1020ac88193 with 
negotiated timeout 6000 for client /127.0.0.1:33054
[junit] 2016-12-03 13:54:26,474 [myid:127.0.0.1:14159] - INFO  
[main-SendThread(127.0.0.1:14159):ClientCnxn$SendThread@1381] - Session 
establishment complete on server 127.0.0.1/127.0.0.1:14159, sessionid = 
0x1020ac88193, negotiated timeout = 6000
[junit] 2016-12-03 13:54:26,476 [myid:] - INFO  
[SyncThread:0:FileTxnLog@204] - Creating new log file: log.7
[junit] 2016-12-03 13:54:26,932 [myid:127.0.0.1:13915] - INFO  
[main-SendThread(127.0.0.1:13915):ClientCnxn$SendThread@1113] - Opening socket 
connection to server 127.0.0.1/127.0.0.1:13915. Will not attempt to 
authenticate using SASL (unknown error)
[junit] 2016-12-03 13:54:26,933 [myid:127.0.0.1:13915] - WARN  
[main-SendThread(127.0.0.1:13915):ClientCnxn$SendThread@1235] - Session 
0x1020ac1e23d for server 127.0.0.1/127.0.0.1:13915, unexpected error, 
closing socket connection and attempting reconnect
[junit] java.net.ConnectException: Connection refused
[junit] at sun.nio.ch.SocketChannelImpl.checkConnect(Native Method)
[junit] at 
sun.nio.ch.SocketChannelImpl.finishConnect(SocketChannelImpl.java:717)
[junit] at 
org.apache.zookeeper.ClientCnxnSocketNIO.doTransport(ClientCnxnSocketNIO.java:357)
[junit] at 
org.apache.zookeeper.ClientCnxn$SendThread.run(ClientCnxn.java:1214)
[junit] 2016-12-03 13:54:27,250 [myid:127.0.0.1:14039] - INFO  
[main-SendThread(127.0.0.1:14039):ClientCnxn$SendThread@1113] - Opening socket 
connection to server 127.0.0.1/127.0.0.1:14039. Will not attempt to 
authenticate using SASL (unknown error)
[junit] 2016-12-03 13:54:27,250 [myid:127.0.0.1:14039] - WARN  
[main-SendThread(127.0.0.1:14039):ClientCnxn$SendThread@1235] - Session 
0x2020ac594d3 for server 127.0.0.1/127.0.0.1:14039, unexpected error, 
closing socket connection and attempting reconnect
[junit] java.net.ConnectException: Connection refused
[junit] at sun.nio.ch.SocketChannelImpl.checkConnect(Native Method)
[junit] at 
sun.nio.ch.SocketChannelImpl.finishConnect(SocketChannelImpl.java:717)
[junit] at 
org.apache.zookeeper.ClientCnxnSocketNIO.doTransport(ClientCnxnSocketNIO.java:357)
[junit] at 
org.apache.zookeeper.ClientCnxn$SendThread.run(ClientCnxn.java:1214)
[junit] 2016-12-03 13:54:27,483 [myid:] - INFO  [ProcessThread(sid:0 
cport:14159)::PrepRequestProcessor@656] - Processed session termination for 
sessionid: 0x1020ac88193
[junit] 2016-12-03 13:54:27,485 [myid:] - INFO  [main:ZooKeeper@1311] - 
Session: 0x1020ac88193 closed
[junit] 2016-12-03 13:54:27,485 [myid:] - INFO  
[SyncThread:0:MBeanRegistry@128] - Unregister MBean 
[org.apache.ZooKeeperService:name0=StandaloneServer_port14159,name1=Connections,name2=127.0.0.1,name3=0x1020ac88193]
[junit] 2016-12-03 13:54:27,485 [myid:] - INFO  
[main:JUnit4ZKTestRunner$LoggedInvokeMethod@82] - Memory used 102891
[junit] 2016-12-03 13:54:27,485 [myid:] - INFO  
[main:JUnit4ZKTestRunner$LoggedInvokeMethod@87] - Number of threads 469
[junit] 2016-12-03 13:54:27,486 [myid:] - INFO  
[main:JUnit4ZKTestRunner$LoggedInvokeMethod@102] - FINISHED TEST METHOD 
testWatcherAutoResetWithLocal
[junit] 2016-12-03 13:54:27,485 [myid:] - INFO  
[main-EventThread:ClientCnxn$EventThread@513] - EventThread shut down for 
session: 0x1020ac88193
[junit] 2016-12-03 13:54:27,486 [myid:] - INFO  [main:ClientBase@543] - 
tearDown starting
[junit] 2016-12-03 13:54:27,486 [myid:] - INFO  [main:ClientBase@513] - 
STOPPING server
[junit] 2016-12-03 13:54:27,486 [myid:] - INFO  
[main:NettyServerCnxnFactory@464] - shutdown called 0.0.0.0/0.0.0.0:14159
[junit] 2016-12-03 13:54:27,487 [myid:] - INFO  [main:ZooKeeperServer@533] 
- shutting down
[junit] 2016-12-03 13:54:27,487 [myid:] - ERROR [main:ZooKeeperServer@505] 
- ZKShutdownHandler is not registered, so ZooKeeper server won't take any 
action on ERROR or SHUTDOWN server state changes
[junit] 2016-12-03 13:54:27,487 [myid:] - INFO  
[main:SessionTrackerImpl@232] - Shutting down
[junit] 2016-12-03 13:54:27,487 [myid:] - INFO  
[main:PrepRequestProcessor@974] - Shutting down
[junit] 2016-12-03 13:54:27,488 [myid:] - INFO  
[main:SyncRequestProcessor@191] - Shutting down
[junit] 2016-12-03 13:54:27,488 [myid:] - INFO  [ProcessThread(sid:0 
cport:14159)::PrepRequestProcessor@154] - PrepRequestProcessor exited loop!
[junit] 2016-12-03 13:54:27,488 [myid:] - INFO  
[SyncThread:0:SyncRequestProcessor@169] - SyncRequestProcessor exited!
[junit] 2016-12-

ZooKeeper_branch34_solaris - Build # 1376 - Still Failing

2016-12-03 Thread Apache Jenkins Server
See https://builds.apache.org/job/ZooKeeper_branch34_solaris/1376/

###
## LAST 60 LINES OF THE CONSOLE 
###
[...truncated 167429 lines...]
[junit] 2016-12-03 13:53:54,016 [myid:] - INFO  [main:ZooKeeperServer@497] 
- shutting down
[junit] 2016-12-03 13:53:54,016 [myid:] - ERROR [main:ZooKeeperServer@472] 
- ZKShutdownHandler is not registered, so ZooKeeper server won't take any 
action on ERROR or SHUTDOWN server state changes
[junit] 2016-12-03 13:53:54,016 [myid:] - INFO  
[main:SessionTrackerImpl@225] - Shutting down
[junit] 2016-12-03 13:53:54,016 [myid:] - INFO  
[main:PrepRequestProcessor@765] - Shutting down
[junit] 2016-12-03 13:53:54,017 [myid:] - INFO  
[main:SyncRequestProcessor@208] - Shutting down
[junit] 2016-12-03 13:53:54,017 [myid:] - INFO  [ProcessThread(sid:0 
cport:11221)::PrepRequestProcessor@143] - PrepRequestProcessor exited loop!
[junit] 2016-12-03 13:53:54,017 [myid:] - INFO  
[SyncThread:0:SyncRequestProcessor@186] - SyncRequestProcessor exited!
[junit] 2016-12-03 13:53:54,017 [myid:] - INFO  
[main:FinalRequestProcessor@402] - shutdown of request processor complete
[junit] 2016-12-03 13:53:54,017 [myid:] - INFO  
[main:FourLetterWordMain@62] - connecting to 127.0.0.1 11221
[junit] 2016-12-03 13:53:54,018 [myid:] - INFO  [main:JMXEnv@146] - 
ensureOnly:[]
[junit] 2016-12-03 13:53:54,018 [myid:] - INFO  [main:ClientBase@445] - 
STARTING server
[junit] 2016-12-03 13:53:54,019 [myid:] - INFO  [main:ClientBase@366] - 
CREATING server instance 127.0.0.1:11221
[junit] 2016-12-03 13:53:54,019 [myid:] - INFO  
[main:NIOServerCnxnFactory@89] - binding to port 0.0.0.0/0.0.0.0:11221
[junit] 2016-12-03 13:53:54,019 [myid:] - INFO  [main:ClientBase@341] - 
STARTING server instance 127.0.0.1:11221
[junit] 2016-12-03 13:53:54,020 [myid:] - INFO  [main:ZooKeeperServer@173] 
- Created server with tickTime 3000 minSessionTimeout 6000 maxSessionTimeout 
6 datadir 
/zonestorage/hudson_solaris/home/hudson/hudson-slave/workspace/ZooKeeper_branch34_solaris/build/test/tmp/test4200955910440084833.junit.dir/version-2
 snapdir 
/zonestorage/hudson_solaris/home/hudson/hudson-slave/workspace/ZooKeeper_branch34_solaris/build/test/tmp/test4200955910440084833.junit.dir/version-2
[junit] 2016-12-03 13:53:54,022 [myid:] - ERROR [main:ZooKeeperServer@472] 
- ZKShutdownHandler is not registered, so ZooKeeper server won't take any 
action on ERROR or SHUTDOWN server state changes
[junit] 2016-12-03 13:53:54,022 [myid:] - INFO  
[main:FourLetterWordMain@62] - connecting to 127.0.0.1 11221
[junit] 2016-12-03 13:53:54,023 [myid:] - INFO  
[NIOServerCxn.Factory:0.0.0.0/0.0.0.0:11221:NIOServerCnxnFactory@192] - 
Accepted socket connection from /127.0.0.1:55632
[junit] 2016-12-03 13:53:54,023 [myid:] - INFO  
[NIOServerCxn.Factory:0.0.0.0/0.0.0.0:11221:NIOServerCnxn@827] - Processing 
stat command from /127.0.0.1:55632
[junit] 2016-12-03 13:53:54,023 [myid:] - INFO  
[Thread-5:NIOServerCnxn$StatCommand@663] - Stat command output
[junit] 2016-12-03 13:53:54,023 [myid:] - INFO  
[Thread-5:NIOServerCnxn@1008] - Closed socket connection for client 
/127.0.0.1:55632 (no session established for client)
[junit] 2016-12-03 13:53:54,023 [myid:] - INFO  [main:JMXEnv@229] - 
ensureParent:[InMemoryDataTree, StandaloneServer_port]
[junit] 2016-12-03 13:53:54,024 [myid:] - INFO  [main:JMXEnv@246] - 
expect:InMemoryDataTree
[junit] 2016-12-03 13:53:54,025 [myid:] - INFO  [main:JMXEnv@250] - 
found:InMemoryDataTree 
org.apache.ZooKeeperService:name0=StandaloneServer_port11221,name1=InMemoryDataTree
[junit] 2016-12-03 13:53:54,025 [myid:] - INFO  [main:JMXEnv@246] - 
expect:StandaloneServer_port
[junit] 2016-12-03 13:53:54,025 [myid:] - INFO  [main:JMXEnv@250] - 
found:StandaloneServer_port 
org.apache.ZooKeeperService:name0=StandaloneServer_port11221
[junit] 2016-12-03 13:53:54,025 [myid:] - INFO  
[main:JUnit4ZKTestRunner$LoggedInvokeMethod@58] - Memory used 8869
[junit] 2016-12-03 13:53:54,025 [myid:] - INFO  
[main:JUnit4ZKTestRunner$LoggedInvokeMethod@63] - Number of threads 20
[junit] 2016-12-03 13:53:54,026 [myid:] - INFO  
[main:JUnit4ZKTestRunner$LoggedInvokeMethod@78] - FINISHED TEST METHOD testQuota
[junit] 2016-12-03 13:53:54,026 [myid:] - INFO  [main:ClientBase@522] - 
tearDown starting
[junit] 2016-12-03 13:53:54,111 [myid:] - INFO  [main:ZooKeeper@684] - 
Session: 0x158c4f6689b closed
[junit] 2016-12-03 13:53:54,111 [myid:] - INFO  
[main-EventThread:ClientCnxn$EventThread@519] - EventThread shut down for 
session: 0x158c4f6689b
[junit] 2016-12-03 13:53:54,112 [myid:] - INFO  [main:ClientBase@492] - 
STOPPING server
[junit] 2016-12-03 13:53:54,112 [myid:] - INFO  [main:ZooKeeperServer@497] 
- shutting down
[junit] 2016-12-03 13:53:54,112 [myid:] - E

ZooKeeper_branch35_openjdk7 - Build # 318 - Failure

2016-12-03 Thread Apache Jenkins Server
See https://builds.apache.org/job/ZooKeeper_branch35_openjdk7/318/

###
## LAST 60 LINES OF THE CONSOLE 
###
Started by timer
[EnvInject] - Loading node environment variables.
Building remotely on H16 (ubuntu) in workspace 
/home/jenkins/jenkins-slave/workspace/ZooKeeper_branch35_openjdk7
 > git rev-parse --is-inside-work-tree # timeout=10
Fetching changes from the remote Git repository
 > git config remote.origin.url git://git.apache.org/zookeeper.git # timeout=10
Fetching upstream changes from git://git.apache.org/zookeeper.git
 > git --version # timeout=10
 > git -c core.askpass=true fetch --tags --progress 
 > git://git.apache.org/zookeeper.git +refs/heads/*:refs/remotes/origin/*
 > git rev-parse refs/remotes/origin/branch-3.5^{commit} # timeout=10
 > git rev-parse refs/remotes/origin/origin/branch-3.5^{commit} # timeout=10
Checking out Revision 8f2a869c2efa91a9687c43360abd28da1ba1314e 
(refs/remotes/origin/branch-3.5)
 > git config core.sparsecheckout # timeout=10
 > git checkout -f 8f2a869c2efa91a9687c43360abd28da1ba1314e
 > git rev-list 8f2a869c2efa91a9687c43360abd28da1ba1314e # timeout=10
No emails were triggered.
[ZooKeeper_branch35_openjdk7] $ /home/jenkins/tools/ant/latest/bin/ant 
-Dtest.output=yes -Dtest.junit.threads=8 -Dtest.junit.output.format=xml 
-Djavac.target=1.7 clean test-core-java
Error: JAVA_HOME is not defined correctly.
  We cannot execute /usr/lib/jvm/java-7-openjdk-amd64//bin/java
Build step 'Invoke Ant' marked build as failure
Recording test results
ERROR: Step ?Publish JUnit test result report? failed: No test report files 
were found. Configuration error?
Email was triggered for: Failure - Any
Sending email for trigger: Failure - Any



###
## FAILED TESTS (if any) 
##
No tests ran.

ZooKeeper_branch35_jdk7 - Build # 753 - Still Failing

2016-12-03 Thread Apache Jenkins Server
See https://builds.apache.org/job/ZooKeeper_branch35_jdk7/753/

###
## LAST 60 LINES OF THE CONSOLE 
###
[...truncated 437361 lines...]
[junit] at 
java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:200)
[junit] at 
java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:182)
[junit] at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392)
[junit] at java.net.Socket.connect(Socket.java:579)
[junit] at 
org.apache.zookeeper.server.quorum.QuorumCnxManager.connectOne(QuorumCnxManager.java:441)
[junit] at 
org.apache.zookeeper.server.quorum.QuorumCnxManager.connectOne(QuorumCnxManager.java:482)
[junit] at 
org.apache.zookeeper.server.quorum.QuorumCnxManager.toSend(QuorumCnxManager.java:419)
[junit] at 
org.apache.zookeeper.server.quorum.FastLeaderElection$Messenger$WorkerSender.process(FastLeaderElection.java:486)
[junit] at 
org.apache.zookeeper.server.quorum.FastLeaderElection$Messenger$WorkerSender.run(FastLeaderElection.java:465)
[junit] at java.lang.Thread.run(Thread.java:745)
[junit] 2016-12-03 09:00:00,227 [myid:] - INFO  
[QuorumPeer[myid=4](plain=/127.0.0.1:24702)(secure=disabled):FastLeaderElection@928]
 - Notification time out: 6
[junit] 2016-12-03 09:00:00,225 [myid:] - WARN  
[WorkerSender[myid=5]:QuorumCnxManager@455] - Cannot open channel to 1 at 
election address /127.0.0.1:24694
[junit] java.net.ConnectException: Connection refused
[junit] at java.net.PlainSocketImpl.socketConnect(Native Method)
[junit] at 
java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:339)
[junit] at 
java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:200)
[junit] at 
java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:182)
[junit] at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392)
[junit] at java.net.Socket.connect(Socket.java:579)
[junit] at 
org.apache.zookeeper.server.quorum.QuorumCnxManager.connectOne(QuorumCnxManager.java:441)
[junit] at 
org.apache.zookeeper.server.quorum.QuorumCnxManager.connectOne(QuorumCnxManager.java:482)
[junit] at 
org.apache.zookeeper.server.quorum.QuorumCnxManager.toSend(QuorumCnxManager.java:419)
[junit] at 
org.apache.zookeeper.server.quorum.FastLeaderElection$Messenger$WorkerSender.process(FastLeaderElection.java:486)
[junit] at 
org.apache.zookeeper.server.quorum.FastLeaderElection$Messenger$WorkerSender.run(FastLeaderElection.java:465)
[junit] at java.lang.Thread.run(Thread.java:745)
[junit] 2016-12-03 09:00:00,227 [myid:] - WARN  
[WorkerSender[myid=5]:QuorumCnxManager@455] - Cannot open channel to 2 at 
election address /127.0.0.1:24695
[junit] java.net.ConnectException: Connection refused
[junit] at java.net.PlainSocketImpl.socketConnect(Native Method)
[junit] at 
java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:339)
[junit] at 
java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:200)
[junit] at 
java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:182)
[junit] at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392)
[junit] at java.net.Socket.connect(Socket.java:579)
[junit] at 
org.apache.zookeeper.server.quorum.QuorumCnxManager.connectOne(QuorumCnxManager.java:441)
[junit] at 
org.apache.zookeeper.server.quorum.QuorumCnxManager.connectOne(QuorumCnxManager.java:482)
[junit] at 
org.apache.zookeeper.server.quorum.QuorumCnxManager.toSend(QuorumCnxManager.java:419)
[junit] at 
org.apache.zookeeper.server.quorum.FastLeaderElection$Messenger$WorkerSender.process(FastLeaderElection.java:486)
[junit] at 
org.apache.zookeeper.server.quorum.FastLeaderElection$Messenger$WorkerSender.run(FastLeaderElection.java:465)
[junit] at java.lang.Thread.run(Thread.java:745)
[junit] 2016-12-03 09:00:00,233 [myid:] - INFO  
[WorkerReceiver[myid=5]:FastLeaderElection@688] - Notification: 2 (message 
format version), 5 (n.leader), 0x1006d (n.zxid), 0x2 (n.round), LOOKING 
(n.state), 5 (n.sid), 0x1 (n.peerEPoch), LOOKING (my state)1 (n.config 
version)
[junit] 2016-12-03 09:00:00,234 [myid:] - INFO  
[WorkerReceiver[myid=3]:FastLeaderElection@688] - Notification: 2 (message 
format version), 5 (n.leader), 0x1006d (n.zxid), 0x2 (n.round), LOOKING 
(n.state), 5 (n.sid), 0x1 (n.peerEPoch), LEADING (my state)1 (n.config 
version)
[junit] 2016-12-03 09:00:00,235 [myid:] - INFO  
[WorkerReceiver[myid=5]:FastLeaderElection@688] - Notification: 2 (message 
format version), 3 (n.leader), 0x0 (n.zxid), 0x (n.round), 
LEADING (n.state), 3 (n.sid), 0x1 (n.p

ZooKeeper-trunk-solaris - Build # 1408 - Still Failing

2016-12-03 Thread Apache Jenkins Server
See https://builds.apache.org/job/ZooKeeper-trunk-solaris/1408/

###
## LAST 60 LINES OF THE CONSOLE 
###
[...truncated 509159 lines...]
[junit] 2016-12-03 08:35:07,257 [myid:] - INFO  [main:ClientBase@386] - 
CREATING server instance 127.0.0.1:11222
[junit] 2016-12-03 08:35:07,257 [myid:] - INFO  
[main:NIOServerCnxnFactory@673] - Configuring NIO connection handler with 10s 
sessionless connection timeout, 2 selector thread(s), 16 worker threads, and 64 
kB direct buffers.
[junit] 2016-12-03 08:35:07,258 [myid:] - INFO  
[main:NIOServerCnxnFactory@686] - binding to port 0.0.0.0/0.0.0.0:11222
[junit] 2016-12-03 08:35:07,258 [myid:] - INFO  [main:ClientBase@361] - 
STARTING server instance 127.0.0.1:11222
[junit] 2016-12-03 08:35:07,259 [myid:] - INFO  [main:ZooKeeperServer@894] 
- minSessionTimeout set to 6000
[junit] 2016-12-03 08:35:07,259 [myid:] - INFO  [main:ZooKeeperServer@903] 
- maxSessionTimeout set to 6
[junit] 2016-12-03 08:35:07,259 [myid:] - INFO  [main:ZooKeeperServer@160] 
- Created server with tickTime 3000 minSessionTimeout 6000 maxSessionTimeout 
6 datadir 
/zonestorage/hudson_solaris/home/hudson/hudson-slave/workspace/ZooKeeper-trunk-solaris/build/test/tmp/test866350967634787.junit.dir/version-2
 snapdir 
/zonestorage/hudson_solaris/home/hudson/hudson-slave/workspace/ZooKeeper-trunk-solaris/build/test/tmp/test866350967634787.junit.dir/version-2
[junit] 2016-12-03 08:35:07,260 [myid:] - INFO  [main:FileSnap@83] - 
Reading snapshot 
/zonestorage/hudson_solaris/home/hudson/hudson-slave/workspace/ZooKeeper-trunk-solaris/build/test/tmp/test866350967634787.junit.dir/version-2/snapshot.b
[junit] 2016-12-03 08:35:07,262 [myid:] - INFO  [main:FileTxnSnapLog@306] - 
Snapshotting: 0xb to 
/zonestorage/hudson_solaris/home/hudson/hudson-slave/workspace/ZooKeeper-trunk-solaris/build/test/tmp/test866350967634787.junit.dir/version-2/snapshot.b
[junit] 2016-12-03 08:35:07,263 [myid:] - ERROR [main:ZooKeeperServer@506] 
- ZKShutdownHandler is not registered, so ZooKeeper server won't take any 
action on ERROR or SHUTDOWN server state changes
[junit] 2016-12-03 08:35:07,263 [myid:] - INFO  
[main:FourLetterWordMain@85] - connecting to 127.0.0.1 11222
[junit] 2016-12-03 08:35:07,264 [myid:] - INFO  
[NIOServerCxnFactory.AcceptThread:0.0.0.0/0.0.0.0:11222:NIOServerCnxnFactory$AcceptThread@296]
 - Accepted socket connection from /127.0.0.1:48397
[junit] 2016-12-03 08:35:07,264 [myid:] - INFO  
[NIOWorkerThread-1:NIOServerCnxn@485] - Processing stat command from 
/127.0.0.1:48397
[junit] 2016-12-03 08:35:07,264 [myid:] - INFO  
[NIOWorkerThread-1:StatCommand@49] - Stat command output
[junit] 2016-12-03 08:35:07,265 [myid:] - INFO  
[NIOWorkerThread-1:NIOServerCnxn@607] - Closed socket connection for client 
/127.0.0.1:48397 (no session established for client)
[junit] 2016-12-03 08:35:07,265 [myid:] - INFO  [main:JMXEnv@228] - 
ensureParent:[InMemoryDataTree, StandaloneServer_port]
[junit] 2016-12-03 08:35:07,266 [myid:] - INFO  [main:JMXEnv@245] - 
expect:InMemoryDataTree
[junit] 2016-12-03 08:35:07,266 [myid:] - INFO  [main:JMXEnv@249] - 
found:InMemoryDataTree 
org.apache.ZooKeeperService:name0=StandaloneServer_port11222,name1=InMemoryDataTree
[junit] 2016-12-03 08:35:07,266 [myid:] - INFO  [main:JMXEnv@245] - 
expect:StandaloneServer_port
[junit] 2016-12-03 08:35:07,267 [myid:] - INFO  [main:JMXEnv@249] - 
found:StandaloneServer_port 
org.apache.ZooKeeperService:name0=StandaloneServer_port11222
[junit] 2016-12-03 08:35:07,267 [myid:] - INFO  
[main:JUnit4ZKTestRunner$LoggedInvokeMethod@82] - Memory used 17814
[junit] 2016-12-03 08:35:07,267 [myid:] - INFO  
[main:JUnit4ZKTestRunner$LoggedInvokeMethod@87] - Number of threads 24
[junit] 2016-12-03 08:35:07,267 [myid:] - INFO  
[main:JUnit4ZKTestRunner$LoggedInvokeMethod@102] - FINISHED TEST METHOD 
testQuota
[junit] 2016-12-03 08:35:07,267 [myid:] - INFO  [main:ClientBase@543] - 
tearDown starting
[junit] 2016-12-03 08:35:07,342 [myid:] - INFO  [main:ZooKeeper@1313] - 
Session: 0x12540ccaaa5 closed
[junit] 2016-12-03 08:35:07,342 [myid:] - INFO  
[main-EventThread:ClientCnxn$EventThread@513] - EventThread shut down for 
session: 0x12540ccaaa5
[junit] 2016-12-03 08:35:07,342 [myid:] - INFO  [main:ClientBase@513] - 
STOPPING server
[junit] 2016-12-03 08:35:07,342 [myid:] - INFO  
[ConnnectionExpirer:NIOServerCnxnFactory$ConnectionExpirerThread@583] - 
ConnnectionExpirerThread interrupted
[junit] 2016-12-03 08:35:07,342 [myid:] - INFO  
[NIOServerCxnFactory.AcceptThread:0.0.0.0/0.0.0.0:11222:NIOServerCnxnFactory$AcceptThread@219]
 - accept thread exitted run method
[junit] 2016-12-03 08:35:07,342 [myid:] - INFO  
[NIOServerCxnFactory.SelectorThread-1:NIOServerCnxnFactory$SelectorThread@4