[jira] [Commented] (ZOOKEEPER-2691) recreateSocketAddresses may recreate the unreachable IP address

2017-05-11 Thread ASF GitHub Bot (JIRA)

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

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

Github user hanm commented on the issue:

https://github.com/apache/zookeeper/pull/173
  
I'll review later, but a quick answer to your question on how to update 
doc: no don't modify the html directly. Instead only modify the source of the 
docs. The sources are in folder src/docs/src/documentation/content/xdocs . In 
addition it would be good to verify your doc change locally by compiling the 
doc source with apache forrest (https://forrest.apache.org/). But please don't 
include the compiled documents (the html and pdf files) as part of the patch - 
you only need to change the source of the documents. You can check commit 
history of src/docs/src/documentation/content/xdocs and learn by example, 
should be pretty straightforward..



> recreateSocketAddresses may recreate the unreachable IP address
> ---
>
> Key: ZOOKEEPER-2691
> URL: https://issues.apache.org/jira/browse/ZOOKEEPER-2691
> Project: ZooKeeper
>  Issue Type: Bug
>Affects Versions: 3.4.8, 3.4.9, 3.4.10, 3.5.0, 3.5.1, 3.5.2
> Environment: Centos6.5
> Java8
> ZooKeeper3.4.8
>Reporter: JiangJiafu
>Priority: Minor
>
> The QuorumPeer$QuorumServer.recreateSocketAddress()  is used to resolved the 
> hostname to a new IP address(InetAddress) when any exception happens to the 
> socket. It will be very useful when a hostname can be resolved to more than 
> one IP address.
> But the problem is Java API InetAddress.getByName(String hostname) will 
> always return the first IP address when the hostname can be resolved to more 
> than one IP address, and the first IP address may be unreachable forever. For 
> example, if a machine has two network interfaces: eth0, eth1, say eth0 has 
> ip1, eth1 has ip2, the relationship between hostname and the IP addresses is 
> set in /etc/hosts. When I "close" the eth0 by command "ifdown eth0", the 
> InetAddress.getByName(String hostname)  will still return ip1, which is 
> unreachable forever.
> So I think it will be better to check the IP address by 
> InetAddress.isReachable(long) and choose the reachable IP address. 
> I have modified the ZooKeeper source code, and test the new code in my own 
> environment, and it can work very well when I turn down some network 
> interfaces using "ifdown" command.
> The original code is:
> {code:title=QuorumPeer.java|borderStyle=solid}
> public void recreateSocketAddresses() {
> InetAddress address = null;
> try {
> address = InetAddress.getByName(this.hostname);
> LOG.info("Resolved hostname: {} to address: {}", 
> this.hostname, address);
> this.addr = new InetSocketAddress(address, this.port);
> if (this.electionPort > 0){
> this.electionAddr = new InetSocketAddress(address, 
> this.electionPort);
> }
> } catch (UnknownHostException ex) {
> LOG.warn("Failed to resolve address: {}", this.hostname, ex);
> // Have we succeeded in the past?
> if (this.addr != null) {
> // Yes, previously the lookup succeeded. Leave things as 
> they are
> return;
> }
> // The hostname has never resolved. Create our 
> InetSocketAddress(es) as unresolved
> this.addr = InetSocketAddress.createUnresolved(this.hostname, 
> this.port);
> if (this.electionPort > 0){
> this.electionAddr = 
> InetSocketAddress.createUnresolved(this.hostname,
>
> this.electionPort);
> }
> }
> }
> {code}
> After my modification:
> {code:title=QuorumPeer.java|borderStyle=solid}
> public void recreateSocketAddresses() {
> InetAddress address = null;
> try {
> address = getReachableAddress(this.hostname);
> LOG.info("Resolved hostname: {} to address: {}", 
> this.hostname, address);
> this.addr = new InetSocketAddress(address, this.port);
> if (this.electionPort > 0){
> this.electionAddr = new InetSocketAddress(address, 
> this.electionPort);
> }
> } catch (UnknownHostException ex) {
> LOG.warn("Failed to resolve address: {}", this.hostname, ex);
> // Have we succeeded in the past?
> if (this.addr != null) {
> // Yes, previously the lookup succeeded. Leave things as 
> they are
>

[GitHub] zookeeper issue #173: ZOOKEEPER-2691: recreateSocketAddresses may recreate t...

2017-05-11 Thread hanm
Github user hanm commented on the issue:

https://github.com/apache/zookeeper/pull/173
  
I'll review later, but a quick answer to your question on how to update 
doc: no don't modify the html directly. Instead only modify the source of the 
docs. The sources are in folder src/docs/src/documentation/content/xdocs . In 
addition it would be good to verify your doc change locally by compiling the 
doc source with apache forrest (https://forrest.apache.org/). But please don't 
include the compiled documents (the html and pdf files) as part of the patch - 
you only need to change the source of the documents. You can check commit 
history of src/docs/src/documentation/content/xdocs and learn by example, 
should be pretty straightforward..



---
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-2691) recreateSocketAddresses may recreate the unreachable IP address

2017-05-11 Thread Hadoop QA (JIRA)

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

Hadoop QA commented on ZOOKEEPER-2691:
--

-1 overall.  GitHub Pull Request  Build
  

+1 @author.  The patch does not contain any @author tags.

+0 tests included.  The patch appears to be a documentation patch that 
doesn't require tests.

-1 javadoc.  The javadoc tool appears to have generated 1 warning messages.

+1 javac.  The applied patch does not increase the total number of javac 
compiler warnings.

-1 findbugs.  The patch appears to introduce 90 new Findbugs (version 
3.0.1) warnings.

+1 release audit.  The applied patch does not increase the total number of 
release audit warnings.

-1 core tests.  The patch failed core unit tests.

+1 contrib tests.  The patch passed contrib unit tests.

Test results: 
https://builds.apache.org/job/PreCommit-ZOOKEEPER-github-pr-build/678//testReport/
Findbugs warnings: 
https://builds.apache.org/job/PreCommit-ZOOKEEPER-github-pr-build/678//artifact/trunk/build/test/findbugs/newPatchFindbugsWarnings.html
Console output: 
https://builds.apache.org/job/PreCommit-ZOOKEEPER-github-pr-build/678//console

This message is automatically generated.

> recreateSocketAddresses may recreate the unreachable IP address
> ---
>
> Key: ZOOKEEPER-2691
> URL: https://issues.apache.org/jira/browse/ZOOKEEPER-2691
> Project: ZooKeeper
>  Issue Type: Bug
>Affects Versions: 3.4.8, 3.4.9, 3.4.10, 3.5.0, 3.5.1, 3.5.2
> Environment: Centos6.5
> Java8
> ZooKeeper3.4.8
>Reporter: JiangJiafu
>Priority: Minor
>
> The QuorumPeer$QuorumServer.recreateSocketAddress()  is used to resolved the 
> hostname to a new IP address(InetAddress) when any exception happens to the 
> socket. It will be very useful when a hostname can be resolved to more than 
> one IP address.
> But the problem is Java API InetAddress.getByName(String hostname) will 
> always return the first IP address when the hostname can be resolved to more 
> than one IP address, and the first IP address may be unreachable forever. For 
> example, if a machine has two network interfaces: eth0, eth1, say eth0 has 
> ip1, eth1 has ip2, the relationship between hostname and the IP addresses is 
> set in /etc/hosts. When I "close" the eth0 by command "ifdown eth0", the 
> InetAddress.getByName(String hostname)  will still return ip1, which is 
> unreachable forever.
> So I think it will be better to check the IP address by 
> InetAddress.isReachable(long) and choose the reachable IP address. 
> I have modified the ZooKeeper source code, and test the new code in my own 
> environment, and it can work very well when I turn down some network 
> interfaces using "ifdown" command.
> The original code is:
> {code:title=QuorumPeer.java|borderStyle=solid}
> public void recreateSocketAddresses() {
> InetAddress address = null;
> try {
> address = InetAddress.getByName(this.hostname);
> LOG.info("Resolved hostname: {} to address: {}", 
> this.hostname, address);
> this.addr = new InetSocketAddress(address, this.port);
> if (this.electionPort > 0){
> this.electionAddr = new InetSocketAddress(address, 
> this.electionPort);
> }
> } catch (UnknownHostException ex) {
> LOG.warn("Failed to resolve address: {}", this.hostname, ex);
> // Have we succeeded in the past?
> if (this.addr != null) {
> // Yes, previously the lookup succeeded. Leave things as 
> they are
> return;
> }
> // The hostname has never resolved. Create our 
> InetSocketAddress(es) as unresolved
> this.addr = InetSocketAddress.createUnresolved(this.hostname, 
> this.port);
> if (this.electionPort > 0){
> this.electionAddr = 
> InetSocketAddress.createUnresolved(this.hostname,
>
> this.electionPort);
> }
> }
> }
> {code}
> After my modification:
> {code:title=QuorumPeer.java|borderStyle=solid}
> public void recreateSocketAddresses() {
> InetAddress address = null;
> try {
> address = getReachableAddress(this.hostname);
> LOG.info("Resolved hostname: {} to address: {}", 
> this.hostname, address);
> this.addr = new InetSocketAddress(address, this.port);
> if (this.electionPort > 0){
> this.electionAddr = new InetSocketAddress(address, 
> this.electionPort);
> }

Failed: ZOOKEEPER- PreCommit Build #678

2017-05-11 Thread Apache Jenkins Server
Build: https://builds.apache.org/job/PreCommit-ZOOKEEPER-github-pr-build/678/

###
## LAST 60 LINES OF THE CONSOLE 
###
[...truncated 34.44 MB...]
 [exec] +0 tests included.  The patch appears to be a documentation 
patch that doesn't require tests.
 [exec] 
 [exec] -1 javadoc.  The javadoc tool appears to have generated 1 
warning messages.
 [exec] 
 [exec] +1 javac.  The applied patch does not increase the total number 
of javac compiler warnings.
 [exec] 
 [exec] -1 findbugs.  The patch appears to introduce 90 new Findbugs 
(version 3.0.1) warnings.
 [exec] 
 [exec] +1 release audit.  The applied patch does not increase the 
total number of release audit warnings.
 [exec] 
 [exec] -1 core tests.  The patch failed core unit tests.
 [exec] 
 [exec] +1 contrib tests.  The patch passed contrib unit tests.
 [exec] 
 [exec] Test results: 
https://builds.apache.org/job/PreCommit-ZOOKEEPER-github-pr-build/678//testReport/
 [exec] Findbugs warnings: 
https://builds.apache.org/job/PreCommit-ZOOKEEPER-github-pr-build/678//artifact/trunk/build/test/findbugs/newPatchFindbugsWarnings.html
 [exec] Console output: 
https://builds.apache.org/job/PreCommit-ZOOKEEPER-github-pr-build/678//console
 [exec] 
 [exec] This message is automatically generated.
 [exec] 
 [exec] 
 [exec] 
==
 [exec] 
==
 [exec] Adding comment to Jira.
 [exec] 
==
 [exec] 
==
 [exec] 
 [exec] 
 [exec] Comment added.
 [exec] 40b4284d5de282cd35887bc3e2b452a1a79e6f94 logged out
 [exec] 
 [exec] 
 [exec] 
==
 [exec] 
==
 [exec] Finished build.
 [exec] 
==
 [exec] 
==
 [exec] 
 [exec] 
 [exec] mv: 
'/home/jenkins/jenkins-slave/workspace/PreCommit-ZOOKEEPER-github-pr-build/patchprocess'
 and 
'/home/jenkins/jenkins-slave/workspace/PreCommit-ZOOKEEPER-github-pr-build/patchprocess'
 are the same file

BUILD FAILED
/home/jenkins/jenkins-slave/workspace/PreCommit-ZOOKEEPER-github-pr-build/build.xml:1703:
 exec returned: 3

Total time: 49 minutes 51 seconds
Build step 'Execute shell' marked build as failure
Archiving artifacts
Setting JDK_1_7_LATEST__HOME=/home/jenkins/tools/java/latest1.7
Recording test results
Setting JDK_1_7_LATEST__HOME=/home/jenkins/tools/java/latest1.7
Setting JDK_1_7_LATEST__HOME=/home/jenkins/tools/java/latest1.7
[description-setter] Description set: ZOOKEEPER-2691
Putting comment on the pull request
Setting JDK_1_7_LATEST__HOME=/home/jenkins/tools/java/latest1.7
Email was triggered for: Failure - Any
Sending email for trigger: Failure - Any
Setting JDK_1_7_LATEST__HOME=/home/jenkins/tools/java/latest1.7
Setting JDK_1_7_LATEST__HOME=/home/jenkins/tools/java/latest1.7
Setting JDK_1_7_LATEST__HOME=/home/jenkins/tools/java/latest1.7



###
## FAILED TESTS (if any) 
##
2 tests failed.
FAILED:  
org.apache.zookeeper.test.FollowerTest.testNoLogBeforeLeaderEstablishment

Error Message:
Forked Java VM exited abnormally. Please note the time in the report does not 
reflect the time until the VM exit.

Stack Trace:
junit.framework.AssertionFailedError: Forked Java VM exited abnormally. Please 
note the time in the report does not reflect the time until the VM exit.


FAILED:  org.apache.zookeeper.test.LETest.testLE

Error Message:
Threads didn't join

Stack Trace:
junit.framework.AssertionFailedError: Threads didn't join
at org.apache.zookeeper.test.LETest.testLE(LETest.java:120)
at 
org.apache.zookeeper.JUnit4ZKTestRunner$LoggedInvokeMethod.evaluate(JUnit4ZKTestRunner.java:55)

[jira] [Commented] (ZOOKEEPER-2691) recreateSocketAddresses may recreate the unreachable IP address

2017-05-11 Thread ASF GitHub Bot (JIRA)

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

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

Github user JiangJiafu commented on the issue:

https://github.com/apache/zookeeper/pull/173
  
@hanm Hi, I have modified the code according to your advices except the 
second one:
"Documentation (see Abe's comment)"



> recreateSocketAddresses may recreate the unreachable IP address
> ---
>
> Key: ZOOKEEPER-2691
> URL: https://issues.apache.org/jira/browse/ZOOKEEPER-2691
> Project: ZooKeeper
>  Issue Type: Bug
>Affects Versions: 3.4.8, 3.4.9, 3.4.10, 3.5.0, 3.5.1, 3.5.2
> Environment: Centos6.5
> Java8
> ZooKeeper3.4.8
>Reporter: JiangJiafu
>Priority: Minor
>
> The QuorumPeer$QuorumServer.recreateSocketAddress()  is used to resolved the 
> hostname to a new IP address(InetAddress) when any exception happens to the 
> socket. It will be very useful when a hostname can be resolved to more than 
> one IP address.
> But the problem is Java API InetAddress.getByName(String hostname) will 
> always return the first IP address when the hostname can be resolved to more 
> than one IP address, and the first IP address may be unreachable forever. For 
> example, if a machine has two network interfaces: eth0, eth1, say eth0 has 
> ip1, eth1 has ip2, the relationship between hostname and the IP addresses is 
> set in /etc/hosts. When I "close" the eth0 by command "ifdown eth0", the 
> InetAddress.getByName(String hostname)  will still return ip1, which is 
> unreachable forever.
> So I think it will be better to check the IP address by 
> InetAddress.isReachable(long) and choose the reachable IP address. 
> I have modified the ZooKeeper source code, and test the new code in my own 
> environment, and it can work very well when I turn down some network 
> interfaces using "ifdown" command.
> The original code is:
> {code:title=QuorumPeer.java|borderStyle=solid}
> public void recreateSocketAddresses() {
> InetAddress address = null;
> try {
> address = InetAddress.getByName(this.hostname);
> LOG.info("Resolved hostname: {} to address: {}", 
> this.hostname, address);
> this.addr = new InetSocketAddress(address, this.port);
> if (this.electionPort > 0){
> this.electionAddr = new InetSocketAddress(address, 
> this.electionPort);
> }
> } catch (UnknownHostException ex) {
> LOG.warn("Failed to resolve address: {}", this.hostname, ex);
> // Have we succeeded in the past?
> if (this.addr != null) {
> // Yes, previously the lookup succeeded. Leave things as 
> they are
> return;
> }
> // The hostname has never resolved. Create our 
> InetSocketAddress(es) as unresolved
> this.addr = InetSocketAddress.createUnresolved(this.hostname, 
> this.port);
> if (this.electionPort > 0){
> this.electionAddr = 
> InetSocketAddress.createUnresolved(this.hostname,
>
> this.electionPort);
> }
> }
> }
> {code}
> After my modification:
> {code:title=QuorumPeer.java|borderStyle=solid}
> public void recreateSocketAddresses() {
> InetAddress address = null;
> try {
> address = getReachableAddress(this.hostname);
> LOG.info("Resolved hostname: {} to address: {}", 
> this.hostname, address);
> this.addr = new InetSocketAddress(address, this.port);
> if (this.electionPort > 0){
> this.electionAddr = new InetSocketAddress(address, 
> this.electionPort);
> }
> } catch (UnknownHostException ex) {
> LOG.warn("Failed to resolve address: {}", this.hostname, ex);
> // Have we succeeded in the past?
> if (this.addr != null) {
> // Yes, previously the lookup succeeded. Leave things as 
> they are
> return;
> }
> // The hostname has never resolved. Create our 
> InetSocketAddress(es) as unresolved
> this.addr = InetSocketAddress.createUnresolved(this.hostname, 
> this.port);
> if (this.electionPort > 0){
> this.electionAddr = 
> InetSocketAddress.createUnresolved(this.hostname,
>
> this.electionPort);
> }
> }
> }
> 

[GitHub] zookeeper issue #173: ZOOKEEPER-2691: recreateSocketAddresses may recreate t...

2017-05-11 Thread JiangJiafu
Github user JiangJiafu commented on the issue:

https://github.com/apache/zookeeper/pull/173
  
@hanm Hi, I have modified the code according to your advices except the 
second one:
"Documentation (see Abe's comment)"



---
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_branch34_jdk7 - Build # 1509 - Still Failing

2017-05-11 Thread Apache Jenkins Server
See https://builds.apache.org/job/ZooKeeper_branch34_jdk7/1509/

###
## LAST 60 LINES OF THE CONSOLE 
###
[...truncated 29.18 MB...]
[junit] 2017-05-12 02:42:31,184 [myid:] - INFO  
[main:PrepRequestProcessor@764] - Shutting down
[junit] 2017-05-12 02:42:31,185 [myid:] - INFO  
[main:SyncRequestProcessor@208] - Shutting down
[junit] 2017-05-12 02:42:31,185 [myid:] - INFO  [ProcessThread(sid:0 
cport:11221)::PrepRequestProcessor@143] - PrepRequestProcessor exited loop!
[junit] 2017-05-12 02:42:31,185 [myid:] - INFO  
[SyncThread:0:SyncRequestProcessor@186] - SyncRequestProcessor exited!
[junit] 2017-05-12 02:42:31,186 [myid:] - INFO  
[main:FinalRequestProcessor@402] - shutdown of request processor complete
[junit] 2017-05-12 02:42:31,186 [myid:] - INFO  
[main:FourLetterWordMain@62] - connecting to 127.0.0.1 11221
[junit] 2017-05-12 02:42:31,187 [myid:] - INFO  [main:JMXEnv@147] - 
ensureOnly:[]
[junit] 2017-05-12 02:42:31,189 [myid:] - INFO  [main:ClientBase@469] - 
STARTING server
[junit] 2017-05-12 02:42:31,189 [myid:] - INFO  [main:ClientBase@390] - 
CREATING server instance 127.0.0.1:11221
[junit] 2017-05-12 02:42:31,189 [myid:] - INFO  
[main:ServerCnxnFactory@111] - Using 
org.apache.zookeeper.server.NIOServerCnxnFactory as server connection factory
[junit] 2017-05-12 02:42:31,189 [myid:] - INFO  
[main:NIOServerCnxnFactory@89] - binding to port 0.0.0.0/0.0.0.0:11221
[junit] 2017-05-12 02:42:31,190 [myid:] - INFO  [main:ClientBase@365] - 
STARTING server instance 127.0.0.1:11221
[junit] 2017-05-12 02:42:31,190 [myid:] - INFO  [main:ZooKeeperServer@173] 
- Created server with tickTime 3000 minSessionTimeout 6000 maxSessionTimeout 
6 datadir 
/home/jenkins/jenkins-slave/workspace/ZooKeeper_branch34_jdk7/build/test/tmp/test7082283008012155578.junit.dir/version-2
 snapdir 
/home/jenkins/jenkins-slave/workspace/ZooKeeper_branch34_jdk7/build/test/tmp/test7082283008012155578.junit.dir/version-2
[junit] 2017-05-12 02:42:31,194 [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] 2017-05-12 02:42:31,194 [myid:] - INFO  
[main:FourLetterWordMain@62] - connecting to 127.0.0.1 11221
[junit] 2017-05-12 02:42:31,195 [myid:] - INFO  
[NIOServerCxn.Factory:0.0.0.0/0.0.0.0:11221:NIOServerCnxnFactory@192] - 
Accepted socket connection from /127.0.0.1:53346
[junit] 2017-05-12 02:42:31,196 [myid:] - INFO  
[NIOServerCxn.Factory:0.0.0.0/0.0.0.0:11221:NIOServerCnxn@883] - Processing 
stat command from /127.0.0.1:53346
[junit] 2017-05-12 02:42:31,196 [myid:] - INFO  
[Thread-4:NIOServerCnxn$StatCommand@674] - Stat command output
[junit] 2017-05-12 02:42:31,196 [myid:] - INFO  
[Thread-4:NIOServerCnxn@1044] - Closed socket connection for client 
/127.0.0.1:53346 (no session established for client)
[junit] 2017-05-12 02:42:31,197 [myid:] - INFO  [main:JMXEnv@230] - 
ensureParent:[InMemoryDataTree, StandaloneServer_port]
[junit] 2017-05-12 02:42:31,199 [myid:] - INFO  [main:JMXEnv@247] - 
expect:InMemoryDataTree
[junit] 2017-05-12 02:42:31,199 [myid:] - INFO  [main:JMXEnv@251] - 
found:InMemoryDataTree 
org.apache.ZooKeeperService:name0=StandaloneServer_port11221,name1=InMemoryDataTree
[junit] 2017-05-12 02:42:31,200 [myid:] - INFO  [main:JMXEnv@247] - 
expect:StandaloneServer_port
[junit] 2017-05-12 02:42:31,200 [myid:] - INFO  [main:JMXEnv@251] - 
found:StandaloneServer_port 
org.apache.ZooKeeperService:name0=StandaloneServer_port11221
[junit] 2017-05-12 02:42:31,200 [myid:] - INFO  
[main:JUnit4ZKTestRunner$LoggedInvokeMethod@58] - Memory used 35691
[junit] 2017-05-12 02:42:31,201 [myid:] - INFO  
[main:JUnit4ZKTestRunner$LoggedInvokeMethod@63] - Number of threads 20
[junit] 2017-05-12 02:42:31,201 [myid:] - INFO  
[main:JUnit4ZKTestRunner$LoggedInvokeMethod@78] - FINISHED TEST METHOD testQuota
[junit] 2017-05-12 02:42:31,201 [myid:] - INFO  [main:ClientBase@546] - 
tearDown starting
[junit] 2017-05-12 02:42:31,265 [myid:] - INFO  [main:ZooKeeper@684] - 
Session: 0x15bfa8941f2 closed
[junit] 2017-05-12 02:42:31,265 [myid:] - INFO  [main:ClientBase@516] - 
STOPPING server
[junit] 2017-05-12 02:42:31,266 [myid:] - INFO  
[main-EventThread:ClientCnxn$EventThread@519] - EventThread shut down for 
session: 0x15bfa8941f2
[junit] 2017-05-12 02:42:31,266 [myid:] - INFO  
[NIOServerCxn.Factory:0.0.0.0/0.0.0.0:11221:NIOServerCnxnFactory@219] - 
NIOServerCnxn factory exited run method
[junit] 2017-05-12 02:42:31,266 [myid:] - INFO  [main:ZooKeeperServer@505] 
- shutting down
[junit] 2017-05-12 02:42:31,266 [myid:] - ERROR [main:ZooKeeperServer@472] 
- ZKShutdownHandler is not registered, so ZooKeeper server won't take any 
action on ERROR 

[jira] [Commented] (ZOOKEEPER-2768) Some ideas about four word command

2017-05-11 Thread JIRA

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

王震 commented on ZOOKEEPER-2768:
---

HI  [~hanm] 
Thank you for reminding me, I just mentioned it, and some other ideas

> Some ideas about four word command
> --
>
> Key: ZOOKEEPER-2768
> URL: https://issues.apache.org/jira/browse/ZOOKEEPER-2768
> Project: ZooKeeper
>  Issue Type: Improvement
>  Components: contrib
>Affects Versions: 3.4.10, 3.5.1, 3.5.2
>Reporter: 王震
>Priority: Minor
>
> Some ideas about four word command
> 1) about cons,can we add command dimension data,such like
> now
> /10.204.2.39:63943[1](queued=0,recved=7,sent=7,sid=0x154c32e8c2a5b8c,lop=PING,est=1483669807748,
> to=1,lzxid=0x,lresp=1493362823544,llat=0,minlat=0,avglat=0,maxlat=1)
> ---
> after
> /10.204.2.39:63943[1](queued=0,recved=7,sent=7,sid=0x154c32e8c2a5b8c,lop=PING,est=1483669807748,
> to=1,lzxid=0x,lresp=1493362823544,llat=0,minlat=0,avglat=0,maxlat=1,
> cmd={{op=ping,count=1,time=123405,maxTime=34},{op=setData,count=5000,time=2246,maxTime=21},{op=getData,count=3000,time=34345,maxTime=14}})
> 2) about wchc and wchp,can we add param in order to return  litter  data,such 
> as
> wchc 0x154c32e8c2a5b8c
> wchp /path/temp
> 3)many scenarios we need to monitor the detailed slow request,so we need a 
> slow log queue,such as
> slow
> setData  /path/temp   aaa clientIp useTime
> setData  /path/temp   bbb clientIp useTime



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Commented] (ZOOKEEPER-1346) Add Jetty HTTP server support for four letter words.

2017-05-11 Thread JIRA

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

王震 commented on ZOOKEEPER-1346:
---

some ideas about stat , https://issues.apache.org/jira/browse/ZOOKEEPER-2768

We now add these features based on the 3.4.10 version,look forward to the 
future These functions can be supported through http.

In addition, can we increase the statistical output of machine dimensions, such 
as CPU, memory, machine load, network card traffic, disk space.

about txn logs, is it necessary for us to increase a path txn data for a 
certain period of time.

Finally, with regard to zoo.cfg, it would be cool to have some parameters that 
support dynamic configuration




> Add Jetty HTTP server support for four letter words.
> 
>
> Key: ZOOKEEPER-1346
> URL: https://issues.apache.org/jira/browse/ZOOKEEPER-1346
> Project: ZooKeeper
>  Issue Type: Improvement
>  Components: server
>Reporter: Camille Fournier
>Assignee: Bill Havanki
> Fix For: 3.5.0
>
> Attachments: ZOOKEEPER-1346.10.patch, ZOOKEEPER-1346.2.patch, 
> ZOOKEEPER-1346.3.patch, ZOOKEEPER-1346.4.patch, ZOOKEEPER-1346.6.patch, 
> ZOOKEEPER-1346.7.patch, ZOOKEEPER-1346.8.patch, ZOOKEEPER-1346.9.patch, 
> ZOOKEEPER-1346_jetty.patch, ZOOKEEPER-1346.patch
>
>
> Move the 4lws to their own port, off of the client port, and support them 
> properly via long-lived sessions instead of polling. Deprecate the 4lw 
> support on the client port. Will enable us to enhance the functionality of 
> the commands via extended command syntax, address security concerns and fix 
> bugs involving the socket close being received before all of the data on the 
> client end.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Updated] (ZOOKEEPER-2781) Flaky test: testClientAuthAgainstNoAuthServerWithLowerSid

2017-05-11 Thread Abraham Fine (JIRA)

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

Abraham Fine updated ZOOKEEPER-2781:

Affects Version/s: 3.4.10

> Flaky test: testClientAuthAgainstNoAuthServerWithLowerSid
> -
>
> Key: ZOOKEEPER-2781
> URL: https://issues.apache.org/jira/browse/ZOOKEEPER-2781
> Project: ZooKeeper
>  Issue Type: Bug
>Affects Versions: 3.4.10
>Reporter: Abraham Fine
>Assignee: Abraham Fine
>




--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Created] (ZOOKEEPER-2781) Flaky test: testClientAuthAgainstNoAuthServerWithLowerSid

2017-05-11 Thread Abraham Fine (JIRA)
Abraham Fine created ZOOKEEPER-2781:
---

 Summary: Flaky test: testClientAuthAgainstNoAuthServerWithLowerSid
 Key: ZOOKEEPER-2781
 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-2781
 Project: ZooKeeper
  Issue Type: Bug
Reporter: Abraham Fine
Assignee: Abraham Fine






--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Updated] (ZOOKEEPER-2781) Flaky test: testClientAuthAgainstNoAuthServerWithLowerSid

2017-05-11 Thread Abraham Fine (JIRA)

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

Abraham Fine updated ZOOKEEPER-2781:

Description: Here is an example failing job: 
https://builds.apache.org/job/ZooKeeper_branch34_openjdk7/1489/

> Flaky test: testClientAuthAgainstNoAuthServerWithLowerSid
> -
>
> Key: ZOOKEEPER-2781
> URL: https://issues.apache.org/jira/browse/ZOOKEEPER-2781
> Project: ZooKeeper
>  Issue Type: Bug
>Affects Versions: 3.4.10
>Reporter: Abraham Fine
>Assignee: Abraham Fine
>
> Here is an example failing job: 
> https://builds.apache.org/job/ZooKeeper_branch34_openjdk7/1489/



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Commented] (ZOOKEEPER-2691) recreateSocketAddresses may recreate the unreachable IP address

2017-05-11 Thread ASF GitHub Bot (JIRA)

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

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

Github user JiangJiafu commented on the issue:

https://github.com/apache/zookeeper/pull/173
  
Eh, sorry for asking this question, but how to update the documentation? 
Should I modify the html files in docs directory?


> recreateSocketAddresses may recreate the unreachable IP address
> ---
>
> Key: ZOOKEEPER-2691
> URL: https://issues.apache.org/jira/browse/ZOOKEEPER-2691
> Project: ZooKeeper
>  Issue Type: Bug
>Affects Versions: 3.4.8, 3.4.9, 3.4.10, 3.5.0, 3.5.1, 3.5.2
> Environment: Centos6.5
> Java8
> ZooKeeper3.4.8
>Reporter: JiangJiafu
>Priority: Minor
>
> The QuorumPeer$QuorumServer.recreateSocketAddress()  is used to resolved the 
> hostname to a new IP address(InetAddress) when any exception happens to the 
> socket. It will be very useful when a hostname can be resolved to more than 
> one IP address.
> But the problem is Java API InetAddress.getByName(String hostname) will 
> always return the first IP address when the hostname can be resolved to more 
> than one IP address, and the first IP address may be unreachable forever. For 
> example, if a machine has two network interfaces: eth0, eth1, say eth0 has 
> ip1, eth1 has ip2, the relationship between hostname and the IP addresses is 
> set in /etc/hosts. When I "close" the eth0 by command "ifdown eth0", the 
> InetAddress.getByName(String hostname)  will still return ip1, which is 
> unreachable forever.
> So I think it will be better to check the IP address by 
> InetAddress.isReachable(long) and choose the reachable IP address. 
> I have modified the ZooKeeper source code, and test the new code in my own 
> environment, and it can work very well when I turn down some network 
> interfaces using "ifdown" command.
> The original code is:
> {code:title=QuorumPeer.java|borderStyle=solid}
> public void recreateSocketAddresses() {
> InetAddress address = null;
> try {
> address = InetAddress.getByName(this.hostname);
> LOG.info("Resolved hostname: {} to address: {}", 
> this.hostname, address);
> this.addr = new InetSocketAddress(address, this.port);
> if (this.electionPort > 0){
> this.electionAddr = new InetSocketAddress(address, 
> this.electionPort);
> }
> } catch (UnknownHostException ex) {
> LOG.warn("Failed to resolve address: {}", this.hostname, ex);
> // Have we succeeded in the past?
> if (this.addr != null) {
> // Yes, previously the lookup succeeded. Leave things as 
> they are
> return;
> }
> // The hostname has never resolved. Create our 
> InetSocketAddress(es) as unresolved
> this.addr = InetSocketAddress.createUnresolved(this.hostname, 
> this.port);
> if (this.electionPort > 0){
> this.electionAddr = 
> InetSocketAddress.createUnresolved(this.hostname,
>
> this.electionPort);
> }
> }
> }
> {code}
> After my modification:
> {code:title=QuorumPeer.java|borderStyle=solid}
> public void recreateSocketAddresses() {
> InetAddress address = null;
> try {
> address = getReachableAddress(this.hostname);
> LOG.info("Resolved hostname: {} to address: {}", 
> this.hostname, address);
> this.addr = new InetSocketAddress(address, this.port);
> if (this.electionPort > 0){
> this.electionAddr = new InetSocketAddress(address, 
> this.electionPort);
> }
> } catch (UnknownHostException ex) {
> LOG.warn("Failed to resolve address: {}", this.hostname, ex);
> // Have we succeeded in the past?
> if (this.addr != null) {
> // Yes, previously the lookup succeeded. Leave things as 
> they are
> return;
> }
> // The hostname has never resolved. Create our 
> InetSocketAddress(es) as unresolved
> this.addr = InetSocketAddress.createUnresolved(this.hostname, 
> this.port);
> if (this.electionPort > 0){
> this.electionAddr = 
> InetSocketAddress.createUnresolved(this.hostname,
>
> this.electionPort);
> }
> }
> }
>   

[GitHub] zookeeper issue #173: ZOOKEEPER-2691: recreateSocketAddresses may recreate t...

2017-05-11 Thread JiangJiafu
Github user JiangJiafu commented on the issue:

https://github.com/apache/zookeeper/pull/173
  
Eh, sorry for asking this question, but how to update the documentation? 
Should I modify the html files in docs directory?


---
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-2774) Ephemeral znode will not be removed when sesstion timeout, if the system time of ZooKeeper node changes unexpectedly.

2017-05-11 Thread JiangJiafu (JIRA)

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

JiangJiafu commented on ZOOKEEPER-2774:
---

OK。

> Ephemeral znode will not be removed when sesstion timeout, if the system time 
> of ZooKeeper node changes unexpectedly.
> -
>
> Key: ZOOKEEPER-2774
> URL: https://issues.apache.org/jira/browse/ZOOKEEPER-2774
> Project: ZooKeeper
>  Issue Type: Bug
>  Components: server
>Affects Versions: 3.4.8, 3.4.9, 3.4.10
> Environment: Centos6.5
>Reporter: JiangJiafu
>
> 1. Deploy a ZooKeeper cluster with one node.
> 2. Create a Ephemeral znode.
> 3. Change the system time of the ZooKeeper node to a earlier point.
> 4. Disconnect the client with the ZooKeeper server.
> Then the ephemeral znode will exist for a long time even when session timeout.
> I have read the ZooKeeper source code and I find the code int 
> SessionTrackerImpl.java,
> {code:title=SessionTrackerImpl.java|borderStyle=solid}
> @Override
> synchronized public void run() {
> try {
> while (running) {
> currentTime = System.currentTimeMillis();
> if (nextExpirationTime > currentTime) {
> this.wait(nextExpirationTime - currentTime);
> continue;
> }
> SessionSet set;
> set = sessionSets.remove(nextExpirationTime);
> if (set != null) {
> for (SessionImpl s : set.sessions) {
> setSessionClosing(s.sessionId);
> expirer.expire(s);
> }
> }
> nextExpirationTime += expirationInterval;
> }
> } catch (InterruptedException e) {
> handleException(this.getName(), e);
> }
> LOG.info("SessionTrackerImpl exited loop!");
> }
> {code}
> I think it may be better to use System.nanoTime(), not 
> System.currentTimeMillis, because the later can be changed manually or 
> automatically by a NTP client. 



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


ZooKeeper-trunk - Build # 3387 - Failure

2017-05-11 Thread Apache Jenkins Server
See https://builds.apache.org/job/ZooKeeper-trunk/3387/

###
## LAST 60 LINES OF THE CONSOLE 
###
[...truncated 57.50 MB...]
[junit] 2017-05-11 23:32:24,223 [myid:] - INFO  
[SessionTracker:SessionTrackerImpl@158] - SessionTrackerImpl exited loop!
[junit] 2017-05-11 23:32:24,612 [myid:127.0.0.1:11345] - INFO  
[main-SendThread(127.0.0.1:11345):ClientCnxn$SendThread@1113] - Opening socket 
connection to server 127.0.0.1/127.0.0.1:11345. Will not attempt to 
authenticate using SASL (unknown error)
[junit] 2017-05-11 23:32:24,613 [myid:127.0.0.1:11345] - WARN  
[main-SendThread(127.0.0.1:11345):ClientCnxn$SendThread@1235] - Session 
0x104238811a4 for server 127.0.0.1/127.0.0.1:11345, 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$SendThread.run(ClientCnxn.java:1214)
[junit] 2017-05-11 23:32:24,618 [myid:] - INFO  [ProcessThread(sid:0 
cport:11468)::PrepRequestProcessor@617] - Processed session termination for 
sessionid: 0x104238b6b2d
[junit] 2017-05-11 23:32:24,619 [myid:] - INFO  
[SyncThread:0:MBeanRegistry@128] - Unregister MBean 
[org.apache.ZooKeeperService:name0=StandaloneServer_port11468,name1=Connections,name2=127.0.0.1,name3=0x104238b6b2d]
[junit] 2017-05-11 23:32:24,619 [myid:] - INFO  [main:ZooKeeper@1329] - 
Session: 0x104238b6b2d closed
[junit] 2017-05-11 23:32:24,619 [myid:] - INFO  
[main-EventThread:ClientCnxn$EventThread@513] - EventThread shut down for 
session: 0x104238b6b2d
[junit] 2017-05-11 23:32:24,619 [myid:] - INFO  
[main:JUnit4ZKTestRunner$LoggedInvokeMethod@82] - Memory used 216338
[junit] 2017-05-11 23:32:24,620 [myid:] - INFO  
[main:JUnit4ZKTestRunner$LoggedInvokeMethod@87] - Number of threads 2427
[junit] 2017-05-11 23:32:24,620 [myid:] - INFO  
[main:JUnit4ZKTestRunner$LoggedInvokeMethod@102] - FINISHED TEST METHOD 
testWatcherAutoResetWithLocal
[junit] 2017-05-11 23:32:24,620 [myid:] - INFO  [main:ClientBase@582] - 
tearDown starting
[junit] 2017-05-11 23:32:24,620 [myid:] - INFO  [main:ClientBase@552] - 
STOPPING server
[junit] 2017-05-11 23:32:24,621 [myid:] - INFO  
[main:NettyServerCnxnFactory@464] - shutdown called 0.0.0.0/0.0.0.0:11468
[junit] 2017-05-11 23:32:24,629 [myid:] - INFO  [main:ZooKeeperServer@542] 
- shutting down
[junit] 2017-05-11 23:32:24,629 [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] 2017-05-11 23:32:24,629 [myid:] - INFO  
[main:SessionTrackerImpl@232] - Shutting down
[junit] 2017-05-11 23:32:24,630 [myid:] - INFO  
[main:PrepRequestProcessor@1008] - Shutting down
[junit] 2017-05-11 23:32:24,630 [myid:] - INFO  
[main:SyncRequestProcessor@191] - Shutting down
[junit] 2017-05-11 23:32:24,630 [myid:] - INFO  [ProcessThread(sid:0 
cport:11468)::PrepRequestProcessor@157] - PrepRequestProcessor exited loop!
[junit] 2017-05-11 23:32:24,630 [myid:] - INFO  
[SyncThread:0:SyncRequestProcessor@169] - SyncRequestProcessor exited!
[junit] 2017-05-11 23:32:24,633 [myid:] - INFO  
[main:FinalRequestProcessor@481] - shutdown of request processor complete
[junit] 2017-05-11 23:32:24,633 [myid:] - INFO  [main:MBeanRegistry@128] - 
Unregister MBean 
[org.apache.ZooKeeperService:name0=StandaloneServer_port11468,name1=InMemoryDataTree]
[junit] 2017-05-11 23:32:24,633 [myid:] - INFO  [main:MBeanRegistry@128] - 
Unregister MBean [org.apache.ZooKeeperService:name0=StandaloneServer_port11468]
[junit] 2017-05-11 23:32:24,680 [myid:] - INFO  
[main:FourLetterWordMain@85] - connecting to 127.0.0.1 11468
[junit] 2017-05-11 23:32:24,682 [myid:] - INFO  [main:JMXEnv@146] - 
ensureOnly:[]
[junit] 2017-05-11 23:32:24,695 [myid:] - INFO  [main:ClientBase@607] - 
fdcount after test is: 7137 at start it was 7137
[junit] 2017-05-11 23:32:24,695 [myid:] - INFO  [main:ZKTestCase$1@68] - 
SUCCEEDED testWatcherAutoResetWithLocal
[junit] 2017-05-11 23:32:24,695 [myid:] - INFO  [main:ZKTestCase$1@63] - 
FINISHED testWatcherAutoResetWithLocal
[junit] Tests run: 103, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 
508.021 sec, Thread: 1, Class: org.apache.zookeeper.test.NioNettySuiteTest

fail.build.on.test.failure:

BUILD FAILED
/home/jenkins/jenkins-slave/workspace/ZooKeeper-trunk/build.xml:1338: The 
following error occurred while executing this line:

ZooKeeper_branch34_jdk8 - Build # 984 - Failure

2017-05-11 Thread Apache Jenkins Server
See https://builds.apache.org/job/ZooKeeper_branch34_jdk8/984/

###
## LAST 60 LINES OF THE CONSOLE 
###
[...truncated 25.08 MB...]
[junit] 2017-05-11 22:58:12,954 [myid:] - INFO  
[main:PrepRequestProcessor@764] - Shutting down
[junit] 2017-05-11 22:58:12,954 [myid:] - INFO  
[main:SyncRequestProcessor@208] - Shutting down
[junit] 2017-05-11 22:58:12,954 [myid:] - INFO  [ProcessThread(sid:0 
cport:11221)::PrepRequestProcessor@143] - PrepRequestProcessor exited loop!
[junit] 2017-05-11 22:58:12,955 [myid:] - INFO  
[SyncThread:0:SyncRequestProcessor@186] - SyncRequestProcessor exited!
[junit] 2017-05-11 22:58:12,955 [myid:] - INFO  
[main:FinalRequestProcessor@402] - shutdown of request processor complete
[junit] 2017-05-11 22:58:12,955 [myid:] - INFO  
[main:FourLetterWordMain@62] - connecting to 127.0.0.1 11221
[junit] 2017-05-11 22:58:12,956 [myid:] - INFO  [main:JMXEnv@147] - 
ensureOnly:[]
[junit] 2017-05-11 22:58:12,957 [myid:] - INFO  [main:ClientBase@469] - 
STARTING server
[junit] 2017-05-11 22:58:12,957 [myid:] - INFO  [main:ClientBase@390] - 
CREATING server instance 127.0.0.1:11221
[junit] 2017-05-11 22:58:12,957 [myid:] - INFO  
[main:ServerCnxnFactory@111] - Using 
org.apache.zookeeper.server.NIOServerCnxnFactory as server connection factory
[junit] 2017-05-11 22:58:12,957 [myid:] - INFO  
[main:NIOServerCnxnFactory@89] - binding to port 0.0.0.0/0.0.0.0:11221
[junit] 2017-05-11 22:58:12,958 [myid:] - INFO  [main:ClientBase@365] - 
STARTING server instance 127.0.0.1:11221
[junit] 2017-05-11 22:58:12,958 [myid:] - INFO  [main:ZooKeeperServer@173] 
- Created server with tickTime 3000 minSessionTimeout 6000 maxSessionTimeout 
6 datadir 
/home/jenkins/jenkins-slave/workspace/ZooKeeper_branch34_jdk8/build/test/tmp/test4843211960957781126.junit.dir/version-2
 snapdir 
/home/jenkins/jenkins-slave/workspace/ZooKeeper_branch34_jdk8/build/test/tmp/test4843211960957781126.junit.dir/version-2
[junit] 2017-05-11 22:58:12,961 [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] 2017-05-11 22:58:12,961 [myid:] - INFO  
[main:FourLetterWordMain@62] - connecting to 127.0.0.1 11221
[junit] 2017-05-11 22:58:12,962 [myid:] - INFO  
[NIOServerCxn.Factory:0.0.0.0/0.0.0.0:11221:NIOServerCnxnFactory@192] - 
Accepted socket connection from /127.0.0.1:51664
[junit] 2017-05-11 22:58:12,962 [myid:] - INFO  
[NIOServerCxn.Factory:0.0.0.0/0.0.0.0:11221:NIOServerCnxn@883] - Processing 
stat command from /127.0.0.1:51664
[junit] 2017-05-11 22:58:12,962 [myid:] - INFO  
[Thread-4:NIOServerCnxn$StatCommand@674] - Stat command output
[junit] 2017-05-11 22:58:12,963 [myid:] - INFO  
[Thread-4:NIOServerCnxn@1044] - Closed socket connection for client 
/127.0.0.1:51664 (no session established for client)
[junit] 2017-05-11 22:58:12,963 [myid:] - INFO  [main:JMXEnv@230] - 
ensureParent:[InMemoryDataTree, StandaloneServer_port]
[junit] 2017-05-11 22:58:12,964 [myid:] - INFO  [main:JMXEnv@247] - 
expect:InMemoryDataTree
[junit] 2017-05-11 22:58:12,965 [myid:] - INFO  [main:JMXEnv@251] - 
found:InMemoryDataTree 
org.apache.ZooKeeperService:name0=StandaloneServer_port11221,name1=InMemoryDataTree
[junit] 2017-05-11 22:58:12,965 [myid:] - INFO  [main:JMXEnv@247] - 
expect:StandaloneServer_port
[junit] 2017-05-11 22:58:12,965 [myid:] - INFO  [main:JMXEnv@251] - 
found:StandaloneServer_port 
org.apache.ZooKeeperService:name0=StandaloneServer_port11221
[junit] 2017-05-11 22:58:12,965 [myid:] - INFO  
[main:JUnit4ZKTestRunner$LoggedInvokeMethod@58] - Memory used 35531
[junit] 2017-05-11 22:58:12,966 [myid:] - INFO  
[main:JUnit4ZKTestRunner$LoggedInvokeMethod@63] - Number of threads 20
[junit] 2017-05-11 22:58:12,966 [myid:] - INFO  
[main:JUnit4ZKTestRunner$LoggedInvokeMethod@78] - FINISHED TEST METHOD testQuota
[junit] 2017-05-11 22:58:12,966 [myid:] - INFO  [main:ClientBase@546] - 
tearDown starting
[junit] 2017-05-11 22:58:13,041 [myid:] - INFO  [main:ZooKeeper@684] - 
Session: 0x15bf9bbe6c5 closed
[junit] 2017-05-11 22:58:13,041 [myid:] - INFO  
[main-EventThread:ClientCnxn$EventThread@519] - EventThread shut down for 
session: 0x15bf9bbe6c5
[junit] 2017-05-11 22:58:13,042 [myid:] - INFO  [main:ClientBase@516] - 
STOPPING server
[junit] 2017-05-11 22:58:13,042 [myid:] - INFO  
[NIOServerCxn.Factory:0.0.0.0/0.0.0.0:11221:NIOServerCnxnFactory@219] - 
NIOServerCnxn factory exited run method
[junit] 2017-05-11 22:58:13,043 [myid:] - INFO  [main:ZooKeeperServer@505] 
- shutting down
[junit] 2017-05-11 22:58:13,043 [myid:] - ERROR [main:ZooKeeperServer@472] 
- ZKShutdownHandler is not registered, so ZooKeeper server won't take any 
action on ERROR or 

[GitHub] zookeeper issue #173: ZOOKEEPER-2691: recreateSocketAddresses may recreate t...

2017-05-11 Thread hanm
Github user hanm commented on the issue:

https://github.com/apache/zookeeper/pull/173
  
@JiangJiafu Apologize for lagging on code review. I think this patch still 
needs a little bit work to get it merged:

* Provide a way to use old address creation function by checking the sys 
property (See my comment in code.).
* Documentation (see Abe's comment)
* Typo (see Edward's comment)


---
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-2691) recreateSocketAddresses may recreate the unreachable IP address

2017-05-11 Thread ASF GitHub Bot (JIRA)

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

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

Github user hanm commented on the issue:

https://github.com/apache/zookeeper/pull/173
  
@JiangJiafu Apologize for lagging on code review. I think this patch still 
needs a little bit work to get it merged:

* Provide a way to use old address creation function by checking the sys 
property (See my comment in code.).
* Documentation (see Abe's comment)
* Typo (see Edward's comment)


> recreateSocketAddresses may recreate the unreachable IP address
> ---
>
> Key: ZOOKEEPER-2691
> URL: https://issues.apache.org/jira/browse/ZOOKEEPER-2691
> Project: ZooKeeper
>  Issue Type: Bug
>Affects Versions: 3.4.8, 3.4.9, 3.4.10, 3.5.0, 3.5.1, 3.5.2
> Environment: Centos6.5
> Java8
> ZooKeeper3.4.8
>Reporter: JiangJiafu
>Priority: Minor
>
> The QuorumPeer$QuorumServer.recreateSocketAddress()  is used to resolved the 
> hostname to a new IP address(InetAddress) when any exception happens to the 
> socket. It will be very useful when a hostname can be resolved to more than 
> one IP address.
> But the problem is Java API InetAddress.getByName(String hostname) will 
> always return the first IP address when the hostname can be resolved to more 
> than one IP address, and the first IP address may be unreachable forever. For 
> example, if a machine has two network interfaces: eth0, eth1, say eth0 has 
> ip1, eth1 has ip2, the relationship between hostname and the IP addresses is 
> set in /etc/hosts. When I "close" the eth0 by command "ifdown eth0", the 
> InetAddress.getByName(String hostname)  will still return ip1, which is 
> unreachable forever.
> So I think it will be better to check the IP address by 
> InetAddress.isReachable(long) and choose the reachable IP address. 
> I have modified the ZooKeeper source code, and test the new code in my own 
> environment, and it can work very well when I turn down some network 
> interfaces using "ifdown" command.
> The original code is:
> {code:title=QuorumPeer.java|borderStyle=solid}
> public void recreateSocketAddresses() {
> InetAddress address = null;
> try {
> address = InetAddress.getByName(this.hostname);
> LOG.info("Resolved hostname: {} to address: {}", 
> this.hostname, address);
> this.addr = new InetSocketAddress(address, this.port);
> if (this.electionPort > 0){
> this.electionAddr = new InetSocketAddress(address, 
> this.electionPort);
> }
> } catch (UnknownHostException ex) {
> LOG.warn("Failed to resolve address: {}", this.hostname, ex);
> // Have we succeeded in the past?
> if (this.addr != null) {
> // Yes, previously the lookup succeeded. Leave things as 
> they are
> return;
> }
> // The hostname has never resolved. Create our 
> InetSocketAddress(es) as unresolved
> this.addr = InetSocketAddress.createUnresolved(this.hostname, 
> this.port);
> if (this.electionPort > 0){
> this.electionAddr = 
> InetSocketAddress.createUnresolved(this.hostname,
>
> this.electionPort);
> }
> }
> }
> {code}
> After my modification:
> {code:title=QuorumPeer.java|borderStyle=solid}
> public void recreateSocketAddresses() {
> InetAddress address = null;
> try {
> address = getReachableAddress(this.hostname);
> LOG.info("Resolved hostname: {} to address: {}", 
> this.hostname, address);
> this.addr = new InetSocketAddress(address, this.port);
> if (this.electionPort > 0){
> this.electionAddr = new InetSocketAddress(address, 
> this.electionPort);
> }
> } catch (UnknownHostException ex) {
> LOG.warn("Failed to resolve address: {}", this.hostname, ex);
> // Have we succeeded in the past?
> if (this.addr != null) {
> // Yes, previously the lookup succeeded. Leave things as 
> they are
> return;
> }
> // The hostname has never resolved. Create our 
> InetSocketAddress(es) as unresolved
> this.addr = InetSocketAddress.createUnresolved(this.hostname, 
> this.port);
> if (this.electionPort > 0){
> this.electionAddr = 
> 

[GitHub] zookeeper pull request #173: ZOOKEEPER-2691: recreateSocketAddresses may rec...

2017-05-11 Thread hanm
Github user hanm commented on a diff in the pull request:

https://github.com/apache/zookeeper/pull/173#discussion_r116099795
  
--- Diff: src/java/main/org/apache/zookeeper/server/quorum/QuorumPeer.java 
---
@@ -181,6 +197,33 @@ public void recreateSocketAddresses() {
 }
 }
 
+/**
+ * Resolve the hostname to IP addresses, and find one reachable 
address.
+ *
+ * @param hostname the name of the host
+ * @param timeout the time, in millseconds, before {@link 
InetAddress#isReachable}
+ *aborts
+ * @return a reachable IP address. If no such IP address can be 
found,
+ * just return the first IP address of the hostname.
+ *
+ * @exception UnknownHostException
+ */
+public InetAddress getReachableAddress(String hostname, int 
timeout) 
+throws UnknownHostException {
+InetAddress[] addresses = InetAddress.getAllByName(hostname);
+for (InetAddress a : addresses) {
+try {
+if (a.isReachable(timeout)) {
--- End diff --

I think this is a valid concern. On top of this, I think we should make 
sure user can resort to old behavior if needed. With this patch the 
`isReachable` will be called in any case, regardless of the property 
'zookeeper.ipReachableTimeout' is defined or not. How about something like this:

if (zookeeper.ipReachableTimeout is not defined) {
 address = InetAddress.getByName(this.hostname);
} else {
address = getReachableAddress(this.hostname, ipReachableTimeout);
}


---
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-2691) recreateSocketAddresses may recreate the unreachable IP address

2017-05-11 Thread ASF GitHub Bot (JIRA)

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

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

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

https://github.com/apache/zookeeper/pull/173#discussion_r116099795
  
--- Diff: src/java/main/org/apache/zookeeper/server/quorum/QuorumPeer.java 
---
@@ -181,6 +197,33 @@ public void recreateSocketAddresses() {
 }
 }
 
+/**
+ * Resolve the hostname to IP addresses, and find one reachable 
address.
+ *
+ * @param hostname the name of the host
+ * @param timeout the time, in millseconds, before {@link 
InetAddress#isReachable}
+ *aborts
+ * @return a reachable IP address. If no such IP address can be 
found,
+ * just return the first IP address of the hostname.
+ *
+ * @exception UnknownHostException
+ */
+public InetAddress getReachableAddress(String hostname, int 
timeout) 
+throws UnknownHostException {
+InetAddress[] addresses = InetAddress.getAllByName(hostname);
+for (InetAddress a : addresses) {
+try {
+if (a.isReachable(timeout)) {
--- End diff --

I think this is a valid concern. On top of this, I think we should make 
sure user can resort to old behavior if needed. With this patch the 
`isReachable` will be called in any case, regardless of the property 
'zookeeper.ipReachableTimeout' is defined or not. How about something like this:

if (zookeeper.ipReachableTimeout is not defined) {
 address = InetAddress.getByName(this.hostname);
} else {
address = getReachableAddress(this.hostname, ipReachableTimeout);
}


> recreateSocketAddresses may recreate the unreachable IP address
> ---
>
> Key: ZOOKEEPER-2691
> URL: https://issues.apache.org/jira/browse/ZOOKEEPER-2691
> Project: ZooKeeper
>  Issue Type: Bug
>Affects Versions: 3.4.8, 3.4.9, 3.4.10, 3.5.0, 3.5.1, 3.5.2
> Environment: Centos6.5
> Java8
> ZooKeeper3.4.8
>Reporter: JiangJiafu
>Priority: Minor
>
> The QuorumPeer$QuorumServer.recreateSocketAddress()  is used to resolved the 
> hostname to a new IP address(InetAddress) when any exception happens to the 
> socket. It will be very useful when a hostname can be resolved to more than 
> one IP address.
> But the problem is Java API InetAddress.getByName(String hostname) will 
> always return the first IP address when the hostname can be resolved to more 
> than one IP address, and the first IP address may be unreachable forever. For 
> example, if a machine has two network interfaces: eth0, eth1, say eth0 has 
> ip1, eth1 has ip2, the relationship between hostname and the IP addresses is 
> set in /etc/hosts. When I "close" the eth0 by command "ifdown eth0", the 
> InetAddress.getByName(String hostname)  will still return ip1, which is 
> unreachable forever.
> So I think it will be better to check the IP address by 
> InetAddress.isReachable(long) and choose the reachable IP address. 
> I have modified the ZooKeeper source code, and test the new code in my own 
> environment, and it can work very well when I turn down some network 
> interfaces using "ifdown" command.
> The original code is:
> {code:title=QuorumPeer.java|borderStyle=solid}
> public void recreateSocketAddresses() {
> InetAddress address = null;
> try {
> address = InetAddress.getByName(this.hostname);
> LOG.info("Resolved hostname: {} to address: {}", 
> this.hostname, address);
> this.addr = new InetSocketAddress(address, this.port);
> if (this.electionPort > 0){
> this.electionAddr = new InetSocketAddress(address, 
> this.electionPort);
> }
> } catch (UnknownHostException ex) {
> LOG.warn("Failed to resolve address: {}", this.hostname, ex);
> // Have we succeeded in the past?
> if (this.addr != null) {
> // Yes, previously the lookup succeeded. Leave things as 
> they are
> return;
> }
> // The hostname has never resolved. Create our 
> InetSocketAddress(es) as unresolved
> this.addr = InetSocketAddress.createUnresolved(this.hostname, 
> this.port);
> if (this.electionPort > 0){
> this.electionAddr = 
> InetSocketAddress.createUnresolved(this.hostname,
>
> 

[jira] [Commented] (ZOOKEEPER-2774) Ephemeral znode will not be removed when sesstion timeout, if the system time of ZooKeeper node changes unexpectedly.

2017-05-11 Thread Michael Han (JIRA)

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

Michael Han commented on ZOOKEEPER-2774:


This issue can be fixed by porting ZOOKEEPER-1366 to branch-3.5. If you are 
interested to resolve this feel free to send a pull request to branch-3.4 
[~jiangjiafu].

> Ephemeral znode will not be removed when sesstion timeout, if the system time 
> of ZooKeeper node changes unexpectedly.
> -
>
> Key: ZOOKEEPER-2774
> URL: https://issues.apache.org/jira/browse/ZOOKEEPER-2774
> Project: ZooKeeper
>  Issue Type: Bug
>  Components: server
>Affects Versions: 3.4.8, 3.4.9, 3.4.10
> Environment: Centos6.5
>Reporter: JiangJiafu
>
> 1. Deploy a ZooKeeper cluster with one node.
> 2. Create a Ephemeral znode.
> 3. Change the system time of the ZooKeeper node to a earlier point.
> 4. Disconnect the client with the ZooKeeper server.
> Then the ephemeral znode will exist for a long time even when session timeout.
> I have read the ZooKeeper source code and I find the code int 
> SessionTrackerImpl.java,
> {code:title=SessionTrackerImpl.java|borderStyle=solid}
> @Override
> synchronized public void run() {
> try {
> while (running) {
> currentTime = System.currentTimeMillis();
> if (nextExpirationTime > currentTime) {
> this.wait(nextExpirationTime - currentTime);
> continue;
> }
> SessionSet set;
> set = sessionSets.remove(nextExpirationTime);
> if (set != null) {
> for (SessionImpl s : set.sessions) {
> setSessionClosing(s.sessionId);
> expirer.expire(s);
> }
> }
> nextExpirationTime += expirationInterval;
> }
> } catch (InterruptedException e) {
> handleException(this.getName(), e);
> }
> LOG.info("SessionTrackerImpl exited loop!");
> }
> {code}
> I think it may be better to use System.nanoTime(), not 
> System.currentTimeMillis, because the later can be changed manually or 
> automatically by a NTP client. 



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Commented] (ZOOKEEPER-2768) Some ideas about four word command

2017-05-11 Thread Michael Han (JIRA)

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

Michael Han commented on ZOOKEEPER-2768:


[~wangzhen] I would recommend 4lw improvements go to the AdminServer / HTTP 
interface introduced by ZOOKEEPER-1346.. which is designed to replace 4lw. 4lw 
will be deprecated in a future release.

> Some ideas about four word command
> --
>
> Key: ZOOKEEPER-2768
> URL: https://issues.apache.org/jira/browse/ZOOKEEPER-2768
> Project: ZooKeeper
>  Issue Type: Improvement
>  Components: contrib
>Affects Versions: 3.4.10, 3.5.1, 3.5.2
>Reporter: 王震
>Priority: Minor
>
> Some ideas about four word command
> 1) about cons,can we add command dimension data,such like
> now
> /10.204.2.39:63943[1](queued=0,recved=7,sent=7,sid=0x154c32e8c2a5b8c,lop=PING,est=1483669807748,
> to=1,lzxid=0x,lresp=1493362823544,llat=0,minlat=0,avglat=0,maxlat=1)
> ---
> after
> /10.204.2.39:63943[1](queued=0,recved=7,sent=7,sid=0x154c32e8c2a5b8c,lop=PING,est=1483669807748,
> to=1,lzxid=0x,lresp=1493362823544,llat=0,minlat=0,avglat=0,maxlat=1,
> cmd={{op=ping,count=1,time=123405,maxTime=34},{op=setData,count=5000,time=2246,maxTime=21},{op=getData,count=3000,time=34345,maxTime=14}})
> 2) about wchc and wchp,can we add param in order to return  litter  data,such 
> as
> wchc 0x154c32e8c2a5b8c
> wchp /path/temp
> 3)many scenarios we need to monitor the detailed slow request,so we need a 
> slow log queue,such as
> slow
> setData  /path/temp   aaa clientIp useTime
> setData  /path/temp   bbb clientIp useTime



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Updated] (ZOOKEEPER-2768) Some ideas about four word command

2017-05-11 Thread Michael Han (JIRA)

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

Michael Han updated ZOOKEEPER-2768:
---
Priority: Minor  (was: Critical)

> Some ideas about four word command
> --
>
> Key: ZOOKEEPER-2768
> URL: https://issues.apache.org/jira/browse/ZOOKEEPER-2768
> Project: ZooKeeper
>  Issue Type: Improvement
>  Components: contrib
>Affects Versions: 3.4.10, 3.5.1, 3.5.2
>Reporter: 王震
>Priority: Minor
>
> Some ideas about four word command
> 1) about cons,can we add command dimension data,such like
> now
> /10.204.2.39:63943[1](queued=0,recved=7,sent=7,sid=0x154c32e8c2a5b8c,lop=PING,est=1483669807748,
> to=1,lzxid=0x,lresp=1493362823544,llat=0,minlat=0,avglat=0,maxlat=1)
> ---
> after
> /10.204.2.39:63943[1](queued=0,recved=7,sent=7,sid=0x154c32e8c2a5b8c,lop=PING,est=1483669807748,
> to=1,lzxid=0x,lresp=1493362823544,llat=0,minlat=0,avglat=0,maxlat=1,
> cmd={{op=ping,count=1,time=123405,maxTime=34},{op=setData,count=5000,time=2246,maxTime=21},{op=getData,count=3000,time=34345,maxTime=14}})
> 2) about wchc and wchp,can we add param in order to return  litter  data,such 
> as
> wchc 0x154c32e8c2a5b8c
> wchp /path/temp
> 3)many scenarios we need to monitor the detailed slow request,so we need a 
> slow log queue,such as
> slow
> setData  /path/temp   aaa clientIp useTime
> setData  /path/temp   bbb clientIp useTime



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


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

2017-05-11 Thread Apache Jenkins Server
See https://builds.apache.org/job/ZooKeeper-trunk-openjdk7/1466/

###
## LAST 60 LINES OF THE CONSOLE 
###
[...truncated 57.55 MB...]
[junit] at 
sun.nio.ch.SocketChannelImpl.finishConnect(SocketChannelImpl.java:739)
[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] 2017-05-11 20:10:33,204 [myid:] - INFO  [New I/O boss 
#98:ClientCnxnSocketNetty@208] - channel is told closing
[junit] 2017-05-11 20:10:33,204 [myid:127.0.0.1:13915] - INFO  
[main-SendThread(127.0.0.1:13915):ClientCnxn$SendThread@1231] - channel for 
sessionid 0x1042411d77f is lost, closing socket connection and attempting 
reconnect
[junit] 2017-05-11 20:10:33,365 [myid:127.0.0.1:14041] - INFO  
[main-SendThread(127.0.0.1:14041):ClientCnxn$SendThread@1113] - Opening socket 
connection to server 127.0.0.1/127.0.0.1:14041. Will not attempt to 
authenticate using SASL (unknown error)
[junit] 2017-05-11 20:10:33,365 [myid:] - INFO  [New I/O boss 
#15092:ClientCnxnSocketNetty$1@127] - future isn't success, cause: {}
[junit] java.net.ConnectException: Connection refused: 
127.0.0.1/127.0.0.1:14041
[junit] at sun.nio.ch.SocketChannelImpl.checkConnect(Native Method)
[junit] at 
sun.nio.ch.SocketChannelImpl.finishConnect(SocketChannelImpl.java:739)
[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] 2017-05-11 20:10:33,366 [myid:] - WARN  [New I/O boss 
#15092:ClientCnxnSocketNetty$ZKClientHandler@439] - Exception caught: [id: 
0xbc82c4dc] EXCEPTION: java.net.ConnectException: Connection refused: 
127.0.0.1/127.0.0.1:14041
[junit] java.net.ConnectException: Connection refused: 
127.0.0.1/127.0.0.1:14041
[junit] at sun.nio.ch.SocketChannelImpl.checkConnect(Native Method)
[junit] at 
sun.nio.ch.SocketChannelImpl.finishConnect(SocketChannelImpl.java:739)
[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] 2017-05-11 20:10:33,366 [myid:] - INFO  [New I/O boss 
#15092:ClientCnxnSocketNetty@208] - channel is told closing
[junit] 2017-05-11 20:10:33,366 [myid:127.0.0.1:14041] - INFO  

Re: committing doc changes

2017-05-11 Thread Michael Han
I suspect removing of the compiled doc from git source repo will not break
https://zookeeper.apache.org/ because we publish the web site through CMS
 from the site's svn repo
, which is a separate
repo. So I am +1 with this proposal, but I'd like to hear what Flavio / Pat
/ Ben and other PMC thinks as I don't have the full history of how the site
works.

A side note is the current trunk doc is out of date, and the API doc link
is broken. The last time trunk doc was committed to the site svn repo was
2014 when dynamic reconfig doc was added.


On Fri, Apr 28, 2017 at 12:50 PM, Abraham Fine  wrote:

> Apologies for reviving an old thread.
>
> I'm wondering if we can make this conversation actionable. It would be
> great to remove the compiled documentation from the repository. I
> created a JIRA to cover this work:
> https://issues.apache.org/jira/browse/ZOOKEEPER-2769
>
> Does anyone have any insight into what would be required to make sure
> the trunk documentation remains available if we make this change. I do
> not believe I have access to the trunk jenkins job configuration to see
> exactly what is going on.
>
> Thanks,
> Abe
>
>
> On Mon, Dec 5, 2016, at 16:10, Patrick Hunt wrote:
> > As Flavio mentioned we (committers) commit the docs so that users
> > interested in d/l the source and using it don't need to generate the
> > docs,
> > which requires forrest and could often be a pita. In the early days this
> > was seen as a benefit. That's the history at least.
> >
> > Patrick
> >
> > On Thu, Dec 1, 2016 at 12:09 PM, Michael Han  wrote:
> >
> > > Run forrest check only take a few seconds, so it seems worthwhile to
> add it
> > > to QA target to have some sanity checks on the doc change.
> > >
> > > On Thu, Dec 1, 2016 at 3:20 AM, Flavio Junqueira 
> wrote:
> > >
> > > > We currently do it for the trunk build:
> > > >
> > > > 
> > > >
> > > > but not for pull request or patch QA:
> > > >
> > > > 
> > > >
> > > > "forrest.check" only checks if the forrest.home variable is defined.
> > > >
> > > > Is that enough that we run it as part of the trunk build?
> > > >
> > > > -Flavio
> > > >
> > > > > On 01 Dec 2016, at 01:04, Benjamin Reed  wrote:
> > > > >
> > > > > we could also build the doc as part of the tests.
> > > > >
> > > > > On Wed, Nov 30, 2016 at 3:26 PM, Flavio Junqueira 
> > > > wrote:
> > > > >> As part of the release process, we only copy the documentation,
> see it
> > > > here:
> > > > >>
> > > > >> https://cwiki.apache.org/confluence/display/ZOOKEEPER/
> HowToRelease <
> > > > https://cwiki.apache.org/confluence/display/ZOOKEEPER/HowToRelease>
> > > > >>
> > > > >> I think the reason we have gone this way is to avoid issues
> compiling
> > > > the documentation at the time that we are preparing a release
> candidate
> > > or
> > > > after voting on a release candidate. We could for sure build the
> > > > documentation right before generating the first rc for a release and
> > > create
> > > > blocker jiras in the case there is any issue.
> > > > >>
> > > > >> -Flavio
> > > > >>
> > > > >>> On 30 Nov 2016, at 23:12, Benjamin Reed 
> wrote:
> > > > >>>
> > > > >>> yeah, that's a deeper question. pat or flavio can correct me on
> this,
> > > > >>> but i think the reason we check it in is so that the website's
> > > "trunk"
> > > > >>> documentation will work. now that we moved to git, i don't thing
> it
> > > > >>> works though... i also would just like to only build it when we
> do
> > > > >>> releases.
> > > > >>>
> > > > >>> On Wed, Nov 30, 2016 at 2:24 PM, Jordan Zimmerman
> > > > >>>  wrote:
> > > >  I wondered about that myself. Why bother building the docs?
> Isn’t
> > > > that only needed for packaging/deployment? It ends up making PRs ugly
> > > > because you have all the unnecessary docs in the diff.
> > > > 
> > > >  -Jordan
> > > > 
> > > > > On Nov 30, 2016, at 11:23 PM, Benjamin Reed 
> > > > wrote:
> > > > >
> > > > > when we commit pull requests with doc changes, i think we
> should
> > > > > commit the generated doc as a separate commit. what do you all
> > > think?
> > > > > i would like to do that to keep the change from the
> contributors
> > > > > pristine :) and i think it simplifies things a bit.
> > > > >
> > > > > ben
> > > > 
> > > > >>
> > > >
> > > >
> > >
> > >
> > > --
> > > Cheers
> > > Michael.
> > >
>



-- 
Cheers
Michael.


New project: Pravega

2017-05-11 Thread Flavio P JUNQUEIRA
Hi there,

I wanted to share with both communities the news that we have open-source a
project that I have been working on for the past few months: Pravega.
Pravega is storage for streams and we have decided to make it publicly
available at an earlier stage to build a community that will help us drive
the project in the right direction.

The project uses both Apache BookKeeper and Apache ZooKeeper, which is the
main reason I wanted to share the news with you. This project is not an
incubating Apache project, which might happen in the near future, but we
haven't really made that call yet.

If you are interested, check out the web site and github repo:

Web site: http://pravega.io
Github repo: http://github.com/pravega/pravega

Thanks,
-Flavio


[jira] [Commented] (ZOOKEEPER-1932) Remove deprecated LeaderElection class

2017-05-11 Thread Hudson (JIRA)

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

Hudson commented on ZOOKEEPER-1932:
---

SUCCESS: Integrated in Jenkins build ZooKeeper-trunk #3386 (See 
[https://builds.apache.org/job/ZooKeeper-trunk/3386/])
ZOOKEEPER-1932: Remove deprecated LeaderElection class. (arshad: rev 
a680655a3569bfc546712cb85eeaea8c9b7de3ad)
* (delete) src/java/test/org/apache/zookeeper/test/LENonTerminateTest.java
* (edit) src/java/main/org/apache/zookeeper/server/quorum/QuorumPeerConfig.java
* (delete) src/java/main/org/apache/zookeeper/server/quorum/LeaderElection.java
* (edit) 
src/java/systest/org/apache/zookeeper/test/system/QuorumPeerInstance.java
* (edit) src/java/main/org/apache/zookeeper/server/quorum/QuorumPeer.java
* (edit) src/docs/src/documentation/content/xdocs/zookeeperAdmin.xml
* (edit) src/java/test/config/findbugsExcludeFile.xml
* (delete) src/java/test/org/apache/zookeeper/test/LETest.java
* (edit) src/java/test/org/apache/zookeeper/test/TruncateTest.java
* (edit) src/java/systest/org/apache/zookeeper/test/system/BaseSysTest.java
* (edit) src/java/test/org/apache/zookeeper/test/HierarchicalQuorumTest.java


> Remove deprecated LeaderElection class
> --
>
> Key: ZOOKEEPER-1932
> URL: https://issues.apache.org/jira/browse/ZOOKEEPER-1932
> Project: ZooKeeper
>  Issue Type: Bug
>  Components: leaderElection
>Affects Versions: 3.5.0
>Reporter: Michi Mutsuzaki
>Assignee: Michael Han
> Fix For: 3.6.0
>
> Attachments: TEST-org.apache.zookeeper.test.LETest.txt, 
> ZOOKEEPER-1932.patch, ZOOKEEPER-1932.patch
>
>
> org.apache.zookeeper.test.LETest.testLE is failing on trunk once in a while. 
> I'm not able to reproduce the failure on my box. I looked at the log, but I 
> couldn't quite figure out what's going on. 
> https://builds.apache.org/view/S-Z/view/ZooKeeper/job/ZooKeeper-trunk/2315/testReport/
> Update:
> ==
> Because LE is deprecated there is not much points on spending effort fixing 
> it, as discussed in the JIRA. Updated JIRA title to reflect the state of the 
> issue.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


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

2017-05-11 Thread Apache Jenkins Server
See https://builds.apache.org/job/ZooKeeper-trunk-openjdk7/1465/

###
## LAST 60 LINES OF THE CONSOLE 
###
[...truncated 60.34 MB...]
[junit] 2017-05-11 16:32:26,221 [myid:] - INFO  
[SyncThread:0:MBeanRegistry@128] - Unregister MBean 
[org.apache.ZooKeeperService:name0=StandaloneServer_port19547,name1=Connections,name2=127.0.0.1,name3=0x104234e5728]
[junit] 2017-05-11 16:32:26,221 [myid:] - INFO  [main:ZooKeeper@1329] - 
Session: 0x104234e5728 closed
[junit] 2017-05-11 16:32:26,221 [myid:] - INFO  
[main-EventThread:ClientCnxn$EventThread@513] - EventThread shut down for 
session: 0x104234e5728
[junit] 2017-05-11 16:32:26,221 [myid:] - INFO  
[main:JUnit4ZKTestRunner$LoggedInvokeMethod@82] - Memory used 216040
[junit] 2017-05-11 16:32:26,221 [myid:] - INFO  
[main:JUnit4ZKTestRunner$LoggedInvokeMethod@87] - Number of threads 2455
[junit] 2017-05-11 16:32:26,222 [myid:] - INFO  
[main:JUnit4ZKTestRunner$LoggedInvokeMethod@102] - FINISHED TEST METHOD 
testWatcherAutoResetWithLocal
[junit] 2017-05-11 16:32:26,222 [myid:] - INFO  [main:ClientBase@582] - 
tearDown starting
[junit] 2017-05-11 16:32:26,222 [myid:] - INFO  [main:ClientBase@552] - 
STOPPING server
[junit] 2017-05-11 16:32:26,222 [myid:] - INFO  
[main:NettyServerCnxnFactory@464] - shutdown called 0.0.0.0/0.0.0.0:19547
[junit] 2017-05-11 16:32:26,226 [myid:] - INFO  [main:ZooKeeperServer@542] 
- shutting down
[junit] 2017-05-11 16:32:26,226 [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] 2017-05-11 16:32:26,226 [myid:] - INFO  
[main:SessionTrackerImpl@232] - Shutting down
[junit] 2017-05-11 16:32:26,227 [myid:] - INFO  
[main:PrepRequestProcessor@1008] - Shutting down
[junit] 2017-05-11 16:32:26,227 [myid:] - INFO  
[main:SyncRequestProcessor@191] - Shutting down
[junit] 2017-05-11 16:32:26,227 [myid:] - INFO  [ProcessThread(sid:0 
cport:19547)::PrepRequestProcessor@157] - PrepRequestProcessor exited loop!
[junit] 2017-05-11 16:32:26,227 [myid:] - INFO  
[SyncThread:0:SyncRequestProcessor@169] - SyncRequestProcessor exited!
[junit] 2017-05-11 16:32:26,227 [myid:] - INFO  
[main:FinalRequestProcessor@481] - shutdown of request processor complete
[junit] 2017-05-11 16:32:26,227 [myid:] - INFO  [main:MBeanRegistry@128] - 
Unregister MBean 
[org.apache.ZooKeeperService:name0=StandaloneServer_port19547,name1=InMemoryDataTree]
[junit] 2017-05-11 16:32:26,227 [myid:] - INFO  [main:MBeanRegistry@128] - 
Unregister MBean [org.apache.ZooKeeperService:name0=StandaloneServer_port19547]
[junit] 2017-05-11 16:32:26,228 [myid:] - INFO  
[main:FourLetterWordMain@85] - connecting to 127.0.0.1 19547
[junit] 2017-05-11 16:32:26,228 [myid:] - INFO  [main:JMXEnv@146] - 
ensureOnly:[]
[junit] 2017-05-11 16:32:26,235 [myid:] - INFO  [main:ClientBase@607] - 
fdcount after test is: 7201 at start it was 7201
[junit] 2017-05-11 16:32:26,235 [myid:] - INFO  [main:ZKTestCase$1@68] - 
SUCCEEDED testWatcherAutoResetWithLocal
[junit] 2017-05-11 16:32:26,235 [myid:] - INFO  [main:ZKTestCase$1@63] - 
FINISHED testWatcherAutoResetWithLocal
[junit] Tests run: 103, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 
512.378 sec, Thread: 4, Class: org.apache.zookeeper.test.NioNettySuiteTest
[junit] 2017-05-11 16:32:26,469 [myid:127.0.0.1:19376] - INFO  
[main-SendThread(127.0.0.1:19376):ClientCnxn$SendThread@1113] - Opening socket 
connection to server 127.0.0.1/127.0.0.1:19376. Will not attempt to 
authenticate using SASL (unknown error)
[junit] 2017-05-11 16:32:26,470 [myid:127.0.0.1:19376] - WARN  
[main-SendThread(127.0.0.1:19376):ClientCnxn$SendThread@1235] - Session 
0x1042348badd0001 for server 127.0.0.1/127.0.0.1:19376, 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:739)
[junit] at 
org.apache.zookeeper.ClientCnxnSocketNIO.doTransport(ClientCnxnSocketNIO.java:357)
[junit] at 
org.apache.zookeeper.ClientCnxn$SendThread.run(ClientCnxn.java:1214)
[junit] 2017-05-11 16:32:26,478 [myid:127.0.0.1:19382] - INFO  
[main-SendThread(127.0.0.1:19382):ClientCnxn$SendThread@1113] - Opening socket 
connection to server 127.0.0.1/127.0.0.1:19382. Will not attempt to 
authenticate using SASL (unknown error)
[junit] 2017-05-11 16:32:26,479 [myid:127.0.0.1:19382] - WARN  
[main-SendThread(127.0.0.1:19382):ClientCnxn$SendThread@1235] - Session 
0x3042348bb630001 for server 127.0.0.1/127.0.0.1:19382, unexpected error, 
closing socket connection and attempting 

ZooKeeper-trunk-jdk8 - Build # 1044 - Still Failing

2017-05-11 Thread Apache Jenkins Server
See https://builds.apache.org/job/ZooKeeper-trunk-jdk8/1044/

###
## LAST 60 LINES OF THE CONSOLE 
###
[...truncated 59.50 MB...]
[junit] at 
org.apache.zookeeper.ClientCnxn$SendThread.run(ClientCnxn.java:1214)
[junit] 2017-05-11 16:15:48,496 [myid:127.0.0.1:30073] - INFO  
[main-SendThread(127.0.0.1:30073):ClientCnxn$SendThread@1113] - Opening socket 
connection to server 127.0.0.1/127.0.0.1:30073. Will not attempt to 
authenticate using SASL (unknown error)
[junit] 2017-05-11 16:15:48,496 [myid:127.0.0.1:30073] - WARN  
[main-SendThread(127.0.0.1:30073):ClientCnxn$SendThread@1235] - Session 
0xb564f88b0001 for server 127.0.0.1/127.0.0.1:30073, 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] 2017-05-11 16:15:48,848 [myid:127.0.0.1:30076] - INFO  
[main-SendThread(127.0.0.1:30076):ClientCnxn$SendThread@1113] - Opening socket 
connection to server 127.0.0.1/127.0.0.1:30076. Will not attempt to 
authenticate using SASL (unknown error)
[junit] 2017-05-11 16:15:48,849 [myid:127.0.0.1:30076] - WARN  
[main-SendThread(127.0.0.1:30076):ClientCnxn$SendThread@1235] - Session 
0x100b564fa6e0001 for server 127.0.0.1/127.0.0.1:30076, 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] 2017-05-11 16:15:49,321 [myid:127.0.0.1:30076] - INFO  
[main-SendThread(127.0.0.1:30076):ClientCnxn$SendThread@1113] - Opening socket 
connection to server 127.0.0.1/127.0.0.1:30076. Will not attempt to 
authenticate using SASL (unknown error)
[junit] 2017-05-11 16:15:49,321 [myid:127.0.0.1:30076] - WARN  
[main-SendThread(127.0.0.1:30076):ClientCnxn$SendThread@1235] - Session 
0x100b564fa6e for server 127.0.0.1/127.0.0.1:30076, 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] 2017-05-11 16:15:49,810 [myid:127.0.0.1:30073] - INFO  
[main-SendThread(127.0.0.1:30073):ClientCnxn$SendThread@1113] - Opening socket 
connection to server 127.0.0.1/127.0.0.1:30073. Will not attempt to 
authenticate using SASL (unknown error)
[junit] 2017-05-11 16:15:49,810 [myid:127.0.0.1:30073] - WARN  
[main-SendThread(127.0.0.1:30073):ClientCnxn$SendThread@1235] - Session 
0xb564f88b0001 for server 127.0.0.1/127.0.0.1:30073, 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] 2017-05-11 16:15:50,211 [myid:127.0.0.1:30076] - INFO  
[main-SendThread(127.0.0.1:30076):ClientCnxn$SendThread@1113] - Opening socket 
connection to server 127.0.0.1/127.0.0.1:30076. Will not attempt to 
authenticate using SASL (unknown error)
[junit] 2017-05-11 16:15:50,212 [myid:127.0.0.1:30076] - WARN  
[main-SendThread(127.0.0.1:30076):ClientCnxn$SendThread@1235] - Session 
0x100b564fa6e0001 for server 127.0.0.1/127.0.0.1:30076, 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 

[jira] [Commented] (ZOOKEEPER-1932) Remove deprecated LeaderElection class

2017-05-11 Thread Michael Han (JIRA)

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

Michael Han commented on ZOOKEEPER-1932:


Thanks [~arshad.mohammad] for code review and commit!

> Remove deprecated LeaderElection class
> --
>
> Key: ZOOKEEPER-1932
> URL: https://issues.apache.org/jira/browse/ZOOKEEPER-1932
> Project: ZooKeeper
>  Issue Type: Bug
>  Components: leaderElection
>Affects Versions: 3.5.0
>Reporter: Michi Mutsuzaki
>Assignee: Michael Han
> Fix For: 3.6.0
>
> Attachments: TEST-org.apache.zookeeper.test.LETest.txt, 
> ZOOKEEPER-1932.patch, ZOOKEEPER-1932.patch
>
>
> org.apache.zookeeper.test.LETest.testLE is failing on trunk once in a while. 
> I'm not able to reproduce the failure on my box. I looked at the log, but I 
> couldn't quite figure out what's going on. 
> https://builds.apache.org/view/S-Z/view/ZooKeeper/job/ZooKeeper-trunk/2315/testReport/
> Update:
> ==
> Because LE is deprecated there is not much points on spending effort fixing 
> it, as discussed in the JIRA. Updated JIRA title to reflect the state of the 
> issue.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Commented] (ZOOKEEPER-1932) Remove deprecated LeaderElection class

2017-05-11 Thread Mohammad Arshad (JIRA)

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

Mohammad Arshad commented on ZOOKEEPER-1932:


Thanks [~hanm] for working on this issue.
Merged to master: 
https://github.com/apache/zookeeper/commit/a680655a3569bfc546712cb85eeaea8c9b7de3ad

> Remove deprecated LeaderElection class
> --
>
> Key: ZOOKEEPER-1932
> URL: https://issues.apache.org/jira/browse/ZOOKEEPER-1932
> Project: ZooKeeper
>  Issue Type: Bug
>  Components: leaderElection
>Affects Versions: 3.5.0
>Reporter: Michi Mutsuzaki
>Assignee: Michael Han
> Fix For: 3.6.0
>
> Attachments: TEST-org.apache.zookeeper.test.LETest.txt, 
> ZOOKEEPER-1932.patch, ZOOKEEPER-1932.patch
>
>
> org.apache.zookeeper.test.LETest.testLE is failing on trunk once in a while. 
> I'm not able to reproduce the failure on my box. I looked at the log, but I 
> couldn't quite figure out what's going on. 
> https://builds.apache.org/view/S-Z/view/ZooKeeper/job/ZooKeeper-trunk/2315/testReport/
> Update:
> ==
> Because LE is deprecated there is not much points on spending effort fixing 
> it, as discussed in the JIRA. Updated JIRA title to reflect the state of the 
> issue.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Updated] (ZOOKEEPER-1932) Remove deprecated LeaderElection class

2017-05-11 Thread Mohammad Arshad (JIRA)

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

Mohammad Arshad updated ZOOKEEPER-1932:
---
Summary: Remove deprecated LeaderElection class  (was: 
org.apache.zookeeper.test.LETest.testLE fails once in a while)

> Remove deprecated LeaderElection class
> --
>
> Key: ZOOKEEPER-1932
> URL: https://issues.apache.org/jira/browse/ZOOKEEPER-1932
> Project: ZooKeeper
>  Issue Type: Bug
>  Components: leaderElection
>Affects Versions: 3.5.0
>Reporter: Michi Mutsuzaki
>Assignee: Michael Han
> Fix For: 3.6.0
>
> Attachments: TEST-org.apache.zookeeper.test.LETest.txt, 
> ZOOKEEPER-1932.patch, ZOOKEEPER-1932.patch
>
>
> org.apache.zookeeper.test.LETest.testLE is failing on trunk once in a while. 
> I'm not able to reproduce the failure on my box. I looked at the log, but I 
> couldn't quite figure out what's going on. 
> https://builds.apache.org/view/S-Z/view/ZooKeeper/job/ZooKeeper-trunk/2315/testReport/
> Update:
> ==
> Because LE is deprecated there is not much points on spending effort fixing 
> it, as discussed in the JIRA. Updated JIRA title to reflect the state of the 
> issue.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Commented] (ZOOKEEPER-1932) org.apache.zookeeper.test.LETest.testLE fails once in a while

2017-05-11 Thread ASF GitHub Bot (JIRA)

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

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

Github user asfgit closed the pull request at:

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


> org.apache.zookeeper.test.LETest.testLE fails once in a while
> -
>
> Key: ZOOKEEPER-1932
> URL: https://issues.apache.org/jira/browse/ZOOKEEPER-1932
> Project: ZooKeeper
>  Issue Type: Bug
>  Components: leaderElection
>Affects Versions: 3.5.0
>Reporter: Michi Mutsuzaki
>Assignee: Michael Han
> Fix For: 3.6.0
>
> Attachments: TEST-org.apache.zookeeper.test.LETest.txt, 
> ZOOKEEPER-1932.patch, ZOOKEEPER-1932.patch
>
>
> org.apache.zookeeper.test.LETest.testLE is failing on trunk once in a while. 
> I'm not able to reproduce the failure on my box. I looked at the log, but I 
> couldn't quite figure out what's going on. 
> https://builds.apache.org/view/S-Z/view/ZooKeeper/job/ZooKeeper-trunk/2315/testReport/
> Update:
> ==
> Because LE is deprecated there is not much points on spending effort fixing 
> it, as discussed in the JIRA. Updated JIRA title to reflect the state of the 
> issue.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[GitHub] zookeeper pull request #106: ZOOKEEPER-1932: Remove deprecated LeaderElectio...

2017-05-11 Thread asfgit
Github user asfgit closed the pull request at:

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


---
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.
---


Re: ZooKeeper 3.4.9 fails to start with SSL setting

2017-05-11 Thread Michael Han
Clinent - server ssl as a feature is only available in 3.5.1 and later
versions.

On May 11, 2017 7:07 AM, "venu bachewal"  wrote:

> Hi,
> Please help me to configure ZK with SSL (keystrore,truststore are not
> problem as I berified them using for Kafka)
> In order to support SSL on zookeeper, zk offers to configure secureClient
> port instead of client port
> and some other configurations java parameters passed as per
> https://cwiki.apache.org/confluence/display/ZOOKEEPER/
> ZooKeeper+SSL+User+Guide
>
> But, I am getting this error
>
>
> 2017-05-11 12:16:10,001 [myid:] - INFO  [main:QuorumPeerConfig@124] -
> Reading configuration from:
> C:\OpenText\ExperienceAnalyticsSSL3\ZooKeeper\bin\..\conf\zoo.cfg
> 2017-05-11 12:16:10,020 [myid:] - INFO  [main:QuorumPeer$QuorumServer@149]
> - Resolved hostname: 10.96.132.218 to address: /10.96.132.218
> 2017-05-11 12:16:10,021 [myid:] - ERROR [main:QuorumPeerMain@85] - Invalid
> config, exiting abnormally
> org.apache.zookeeper.server.quorum.QuorumPeerConfig$ConfigException: Error
> processing C:\OpenText\ExperienceAnalyticsSSL3\ZooKeeper\bin\
> *..\conf\zoo.cfg*
> at
> org.apache.zookeeper.server.quorum.QuorumPeerConfig.parse(
> QuorumPeerConfig.java:144)
> at
> org.apache.zookeeper.server.quorum.QuorumPeerMain.initializeAndRun(
> QuorumPeerMain.java:101)
> at
> org.apache.zookeeper.server.quorum.QuorumPeerMain.main(
> QuorumPeerMain.java:78)
> *Caused by: java.lang.IllegalArgumentException: clientPort is not set*
> at
> org.apache.zookeeper.server.quorum.QuorumPeerConfig.parseProperties(
> QuorumPeerConfig.java:270)
> at
> org.apache.zookeeper.server.quorum.QuorumPeerConfig.parse(
> QuorumPeerConfig.java:140)
> ... 2 more
> Invalid config, exiting abnormally
>
> Venu
> *8297004555*
>


[jira] [Commented] (ZOOKEEPER-1932) org.apache.zookeeper.test.LETest.testLE fails once in a while

2017-05-11 Thread ASF GitHub Bot (JIRA)

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

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

Github user arshadmohammad commented on the issue:

https://github.com/apache/zookeeper/pull/106
  
LGTM  +1


> org.apache.zookeeper.test.LETest.testLE fails once in a while
> -
>
> Key: ZOOKEEPER-1932
> URL: https://issues.apache.org/jira/browse/ZOOKEEPER-1932
> Project: ZooKeeper
>  Issue Type: Bug
>  Components: leaderElection
>Affects Versions: 3.5.0
>Reporter: Michi Mutsuzaki
>Assignee: Michael Han
> Fix For: 3.6.0
>
> Attachments: TEST-org.apache.zookeeper.test.LETest.txt, 
> ZOOKEEPER-1932.patch, ZOOKEEPER-1932.patch
>
>
> org.apache.zookeeper.test.LETest.testLE is failing on trunk once in a while. 
> I'm not able to reproduce the failure on my box. I looked at the log, but I 
> couldn't quite figure out what's going on. 
> https://builds.apache.org/view/S-Z/view/ZooKeeper/job/ZooKeeper-trunk/2315/testReport/
> Update:
> ==
> Because LE is deprecated there is not much points on spending effort fixing 
> it, as discussed in the JIRA. Updated JIRA title to reflect the state of the 
> issue.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[GitHub] zookeeper issue #106: ZOOKEEPER-1932: Remove deprecated LeaderElection class...

2017-05-11 Thread arshadmohammad
Github user arshadmohammad commented on the issue:

https://github.com/apache/zookeeper/pull/106
  
LGTM  +1


---
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_branch34_openjdk7 - Build # 1493 - Still Failing

2017-05-11 Thread Apache Jenkins Server
See https://builds.apache.org/job/ZooKeeper_branch34_openjdk7/1493/

###
## LAST 60 LINES OF THE CONSOLE 
###
Started by timer
[EnvInject] - Loading node environment variables.
Building remotely on qnode3 (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 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 ad26e22dffc35af991d32bf95aa8ada9f99322ed 
(refs/remotes/origin/branch-3.4)
 > git config core.sparsecheckout # timeout=10
 > git checkout -f ad26e22dffc35af991d32bf95aa8ada9f99322ed
 > git rev-list ad26e22dffc35af991d32bf95aa8ada9f99322ed # timeout=10
No emails were triggered.
[ZooKeeper_branch34_openjdk7] $ 
/home/jenkins/tools/ant/apache-ant-1.9.9/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 3.4.9 fails to start with SSL setting

2017-05-11 Thread venu bachewal
Hi,
Please help me to configure ZK with SSL (keystrore,truststore are not
problem as I berified them using for Kafka)
In order to support SSL on zookeeper, zk offers to configure secureClient
port instead of client port
and some other configurations java parameters passed as per
https://cwiki.apache.org/confluence/display/ZOOKEEPER/ZooKeeper+SSL+User+Guide

But, I am getting this error


2017-05-11 12:16:10,001 [myid:] - INFO  [main:QuorumPeerConfig@124] -
Reading configuration from:
C:\OpenText\ExperienceAnalyticsSSL3\ZooKeeper\bin\..\conf\zoo.cfg
2017-05-11 12:16:10,020 [myid:] - INFO  [main:QuorumPeer$QuorumServer@149]
- Resolved hostname: 10.96.132.218 to address: /10.96.132.218
2017-05-11 12:16:10,021 [myid:] - ERROR [main:QuorumPeerMain@85] - Invalid
config, exiting abnormally
org.apache.zookeeper.server.quorum.QuorumPeerConfig$ConfigException: Error
processing C:\OpenText\ExperienceAnalyticsSSL3\ZooKeeper\bin\
*..\conf\zoo.cfg*
at
org.apache.zookeeper.server.quorum.QuorumPeerConfig.parse(QuorumPeerConfig.java:144)
at
org.apache.zookeeper.server.quorum.QuorumPeerMain.initializeAndRun(QuorumPeerMain.java:101)
at
org.apache.zookeeper.server.quorum.QuorumPeerMain.main(QuorumPeerMain.java:78)
*Caused by: java.lang.IllegalArgumentException: clientPort is not set*
at
org.apache.zookeeper.server.quorum.QuorumPeerConfig.parseProperties(QuorumPeerConfig.java:270)
at
org.apache.zookeeper.server.quorum.QuorumPeerConfig.parse(QuorumPeerConfig.java:140)
... 2 more
Invalid config, exiting abnormally

Venu
*8297004555*


ZooKeeper_branch35_jdk8 - Build # 521 - Failure

2017-05-11 Thread Apache Jenkins Server
See https://builds.apache.org/job/ZooKeeper_branch35_jdk8/521/

###
## LAST 60 LINES OF THE CONSOLE 
###
[...truncated 55.26 MB...]
[junit] 2017-05-11 12:11:28,718 [myid:127.0.0.1:16731] - WARN  
[main-SendThread(127.0.0.1:16731):ClientCnxn$SendThread@1235] - Session 
0x101742a526e for server 127.0.0.1/127.0.0.1:16731, 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] 2017-05-11 12:11:28,922 [myid:127.0.0.1:16734] - INFO  
[main-SendThread(127.0.0.1:16734):ClientCnxn$SendThread@1113] - Opening socket 
connection to server 127.0.0.1/127.0.0.1:16734. Will not attempt to 
authenticate using SASL (unknown error)
[junit] 2017-05-11 12:11:28,922 [myid:127.0.0.1:16734] - WARN  
[main-SendThread(127.0.0.1:16734):ClientCnxn$SendThread@1235] - Session 
0x201742a525e for server 127.0.0.1/127.0.0.1:16734, 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] 2017-05-11 12:11:28,933 [myid:] - INFO  
[SessionTracker:SessionTrackerImpl@158] - SessionTrackerImpl exited loop!
[junit] 2017-05-11 12:11:28,986 [myid:127.0.0.1:16608] - INFO  
[main-SendThread(127.0.0.1:16608):ClientCnxn$SendThread@1113] - Opening socket 
connection to server 127.0.0.1/127.0.0.1:16608. Will not attempt to 
authenticate using SASL (unknown error)
[junit] 2017-05-11 12:11:28,987 [myid:127.0.0.1:16608] - WARN  
[main-SendThread(127.0.0.1:16608):ClientCnxn$SendThread@1235] - Session 
0x1017425768b for server 127.0.0.1/127.0.0.1:16608, 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] 2017-05-11 12:11:29,204 [myid:] - INFO  [ProcessThread(sid:0 
cport:16854)::PrepRequestProcessor@613] - Processed session termination for 
sessionid: 0x101742d8389
[junit] 2017-05-11 12:11:29,205 [myid:] - INFO  
[SyncThread:0:MBeanRegistry@128] - Unregister MBean 
[org.apache.ZooKeeperService:name0=StandaloneServer_port16854,name1=Connections,name2=127.0.0.1,name3=0x101742d8389]
[junit] 2017-05-11 12:11:29,205 [myid:] - INFO  [main:ZooKeeper@1331] - 
Session: 0x101742d8389 closed
[junit] 2017-05-11 12:11:29,205 [myid:] - INFO  
[main-EventThread:ClientCnxn$EventThread@513] - EventThread shut down for 
session: 0x101742d8389
[junit] 2017-05-11 12:11:29,205 [myid:] - INFO  
[main:JUnit4ZKTestRunner$LoggedInvokeMethod@82] - Memory used 176623
[junit] 2017-05-11 12:11:29,206 [myid:] - INFO  
[main:JUnit4ZKTestRunner$LoggedInvokeMethod@87] - Number of threads 1643
[junit] 2017-05-11 12:11:29,206 [myid:] - INFO  
[main:JUnit4ZKTestRunner$LoggedInvokeMethod@102] - FINISHED TEST METHOD 
testWatcherAutoResetWithLocal
[junit] 2017-05-11 12:11:29,206 [myid:] - INFO  [main:ClientBase@567] - 
tearDown starting
[junit] 2017-05-11 12:11:29,206 [myid:] - INFO  [main:ClientBase@537] - 
STOPPING server
[junit] 2017-05-11 12:11:29,206 [myid:] - INFO  
[main:NettyServerCnxnFactory@464] - shutdown called 0.0.0.0/0.0.0.0:16854
[junit] 2017-05-11 12:11:29,211 [myid:] - INFO  [main:ZooKeeperServer@541] 
- shutting down
[junit] 2017-05-11 12:11:29,211 [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] 2017-05-11 12:11:29,211 [myid:] - INFO  
[main:SessionTrackerImpl@232] - Shutting down
[junit] 2017-05-11 12:11:29,211 [myid:] - INFO  
[main:PrepRequestProcessor@1004] - Shutting down
[junit] 2017-05-11 12:11:29,211 [myid:] - INFO  
[main:SyncRequestProcessor@191] - Shutting down
[junit] 2017-05-11 12:11:29,211 [myid:] - INFO  

ZooKeeper-trunk-jdk8 - Build # 1043 - Still Failing

2017-05-11 Thread Apache Jenkins Server
See https://builds.apache.org/job/ZooKeeper-trunk-jdk8/1043/

###
## LAST 60 LINES OF THE CONSOLE 
###
[...truncated 57.96 MB...]
[junit] 2017-05-11 11:56:37,978 [myid:] - INFO  
[SyncThread:0:MBeanRegistry@128] - Unregister MBean 
[org.apache.ZooKeeperService:name0=StandaloneServer_port27626,name1=Connections,name2=127.0.0.1,name3=0x100b4854605]
[junit] 2017-05-11 11:56:37,978 [myid:] - INFO  [main:ZooKeeper@1329] - 
Session: 0x100b4854605 closed
[junit] 2017-05-11 11:56:37,979 [myid:] - INFO  
[main:JUnit4ZKTestRunner$LoggedInvokeMethod@82] - Memory used 129885
[junit] 2017-05-11 11:56:37,978 [myid:] - INFO  
[main-EventThread:ClientCnxn$EventThread@513] - EventThread shut down for 
session: 0x100b4854605
[junit] 2017-05-11 11:56:37,979 [myid:] - INFO  
[main:JUnit4ZKTestRunner$LoggedInvokeMethod@87] - Number of threads 860
[junit] 2017-05-11 11:56:37,979 [myid:] - INFO  
[main:JUnit4ZKTestRunner$LoggedInvokeMethod@102] - FINISHED TEST METHOD 
testWatcherAutoResetWithLocal
[junit] 2017-05-11 11:56:37,979 [myid:] - INFO  [main:ClientBase@582] - 
tearDown starting
[junit] 2017-05-11 11:56:37,979 [myid:] - INFO  [main:ClientBase@552] - 
STOPPING server
[junit] 2017-05-11 11:56:37,979 [myid:] - INFO  
[main:NettyServerCnxnFactory@464] - shutdown called 0.0.0.0/0.0.0.0:27626
[junit] 2017-05-11 11:56:37,981 [myid:] - INFO  [main:ZooKeeperServer@542] 
- shutting down
[junit] 2017-05-11 11:56:37,981 [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] 2017-05-11 11:56:37,981 [myid:] - INFO  
[main:SessionTrackerImpl@232] - Shutting down
[junit] 2017-05-11 11:56:37,981 [myid:] - INFO  
[main:PrepRequestProcessor@1008] - Shutting down
[junit] 2017-05-11 11:56:37,981 [myid:] - INFO  
[main:SyncRequestProcessor@191] - Shutting down
[junit] 2017-05-11 11:56:37,982 [myid:] - INFO  
[SyncThread:0:SyncRequestProcessor@169] - SyncRequestProcessor exited!
[junit] 2017-05-11 11:56:37,982 [myid:] - INFO  
[main:FinalRequestProcessor@481] - shutdown of request processor complete
[junit] 2017-05-11 11:56:37,982 [myid:] - INFO  [ProcessThread(sid:0 
cport:27626)::PrepRequestProcessor@157] - PrepRequestProcessor exited loop!
[junit] 2017-05-11 11:56:37,982 [myid:] - INFO  [main:MBeanRegistry@128] - 
Unregister MBean 
[org.apache.ZooKeeperService:name0=StandaloneServer_port27626,name1=InMemoryDataTree]
[junit] 2017-05-11 11:56:37,982 [myid:] - INFO  [main:MBeanRegistry@128] - 
Unregister MBean [org.apache.ZooKeeperService:name0=StandaloneServer_port27626]
[junit] 2017-05-11 11:56:37,982 [myid:] - INFO  
[main:FourLetterWordMain@85] - connecting to 127.0.0.1 27626
[junit] 2017-05-11 11:56:37,983 [myid:] - INFO  [main:JMXEnv@146] - 
ensureOnly:[]
[junit] 2017-05-11 11:56:37,987 [myid:] - INFO  [main:ClientBase@607] - 
fdcount after test is: 2541 at start it was 2541
[junit] 2017-05-11 11:56:37,988 [myid:] - INFO  [main:ZKTestCase$1@68] - 
SUCCEEDED testWatcherAutoResetWithLocal
[junit] 2017-05-11 11:56:37,988 [myid:] - INFO  [main:ZKTestCase$1@63] - 
FINISHED testWatcherAutoResetWithLocal
[junit] Tests run: 103, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 
478.198 sec, Thread: 7, Class: org.apache.zookeeper.test.NioNettySuiteTest
[junit] 2017-05-11 11:56:38,067 [myid:127.0.0.1:27380] - INFO  
[main-SendThread(127.0.0.1:27380):ClientCnxn$SendThread@1113] - Opening socket 
connection to server 127.0.0.1/127.0.0.1:27380. Will not attempt to 
authenticate using SASL (unknown error)
[junit] 2017-05-11 11:56:38,068 [myid:127.0.0.1:27380] - WARN  
[main-SendThread(127.0.0.1:27380):ClientCnxn$SendThread@1235] - Session 
0x100b47e13ff for server 127.0.0.1/127.0.0.1:27380, 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] 2017-05-11 11:56:38,079 [myid:127.0.0.1:27506] - INFO  
[main-SendThread(127.0.0.1:27506):ClientCnxn$SendThread@1113] - Opening socket 
connection to server 127.0.0.1/127.0.0.1:27506. Will not attempt to 
authenticate using SASL (unknown error)
[junit] 2017-05-11 11:56:38,079 [myid:127.0.0.1:27506] - WARN  
[main-SendThread(127.0.0.1:27506):ClientCnxn$SendThread@1235] - Session 
0x200b48212ce for server 127.0.0.1/127.0.0.1:27506, unexpected error, 
closing socket connection and attempting reconnect
  

Failed: ZOOKEEPER- PreCommit Build #677

2017-05-11 Thread Apache Jenkins Server
Build: https://builds.apache.org/job/PreCommit-ZOOKEEPER-github-pr-build/677/

###
## LAST 60 LINES OF THE CONSOLE 
###
[...truncated 31.22 MB...]
 [exec] +1 tests included.  The patch appears to include 3 new or 
modified tests.
 [exec] 
 [exec] -1 javadoc.  The javadoc tool appears to have generated 1 
warning messages.
 [exec] 
 [exec] +1 javac.  The applied patch does not increase the total number 
of javac compiler warnings.
 [exec] 
 [exec] -1 findbugs.  The patch appears to introduce 90 new Findbugs 
(version 3.0.1) warnings.
 [exec] 
 [exec] +1 release audit.  The applied patch does not increase the 
total number of release audit warnings.
 [exec] 
 [exec] +1 core tests.  The patch passed core unit tests.
 [exec] 
 [exec] +1 contrib tests.  The patch passed contrib unit tests.
 [exec] 
 [exec] Test results: 
https://builds.apache.org/job/PreCommit-ZOOKEEPER-github-pr-build/677//testReport/
 [exec] Findbugs warnings: 
https://builds.apache.org/job/PreCommit-ZOOKEEPER-github-pr-build/677//artifact/trunk/build/test/findbugs/newPatchFindbugsWarnings.html
 [exec] Console output: 
https://builds.apache.org/job/PreCommit-ZOOKEEPER-github-pr-build/677//console
 [exec] 
 [exec] This message is automatically generated.
 [exec] 
 [exec] 
 [exec] 
==
 [exec] 
==
 [exec] Adding comment to Jira.
 [exec] 
==
 [exec] 
==
 [exec] 
 [exec] 
 [exec] Comment added.
 [exec] ad89cab1f02c885df81cccf8c3cc1444c38ba003 logged out
 [exec] 
 [exec] 
 [exec] 
==
 [exec] 
==
 [exec] Finished build.
 [exec] 
==
 [exec] 
==
 [exec] 
 [exec] 
 [exec] mv: 
'/home/jenkins/jenkins-slave/workspace/PreCommit-ZOOKEEPER-github-pr-build/patchprocess'
 and 
'/home/jenkins/jenkins-slave/workspace/PreCommit-ZOOKEEPER-github-pr-build/patchprocess'
 are the same file

BUILD FAILED
/home/jenkins/jenkins-slave/workspace/PreCommit-ZOOKEEPER-github-pr-build/build.xml:1703:
 exec returned: 2

Total time: 35 minutes 38 seconds
Build step 'Execute shell' marked build as failure
Archiving artifacts
Setting JDK_1_7_LATEST__HOME=/home/jenkins/tools/java/latest1.7
Recording test results
Setting JDK_1_7_LATEST__HOME=/home/jenkins/tools/java/latest1.7
Setting JDK_1_7_LATEST__HOME=/home/jenkins/tools/java/latest1.7
[description-setter] Description set: ZOOKEEPER-2691
Putting comment on the pull request
Setting JDK_1_7_LATEST__HOME=/home/jenkins/tools/java/latest1.7
Email was triggered for: Failure - Any
Sending email for trigger: Failure - Any
Setting JDK_1_7_LATEST__HOME=/home/jenkins/tools/java/latest1.7
Setting JDK_1_7_LATEST__HOME=/home/jenkins/tools/java/latest1.7
Setting JDK_1_7_LATEST__HOME=/home/jenkins/tools/java/latest1.7



###
## FAILED TESTS (if any) 
##
All tests passed

[jira] [Commented] (ZOOKEEPER-2691) recreateSocketAddresses may recreate the unreachable IP address

2017-05-11 Thread Hadoop QA (JIRA)

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

Hadoop QA commented on ZOOKEEPER-2691:
--

-1 overall.  GitHub Pull Request  Build
  

+1 @author.  The patch does not contain any @author tags.

+1 tests included.  The patch appears to include 3 new or modified tests.

-1 javadoc.  The javadoc tool appears to have generated 1 warning messages.

+1 javac.  The applied patch does not increase the total number of javac 
compiler warnings.

-1 findbugs.  The patch appears to introduce 90 new Findbugs (version 
3.0.1) warnings.

+1 release audit.  The applied patch does not increase the total number of 
release audit warnings.

+1 core tests.  The patch passed core unit tests.

+1 contrib tests.  The patch passed contrib unit tests.

Test results: 
https://builds.apache.org/job/PreCommit-ZOOKEEPER-github-pr-build/677//testReport/
Findbugs warnings: 
https://builds.apache.org/job/PreCommit-ZOOKEEPER-github-pr-build/677//artifact/trunk/build/test/findbugs/newPatchFindbugsWarnings.html
Console output: 
https://builds.apache.org/job/PreCommit-ZOOKEEPER-github-pr-build/677//console

This message is automatically generated.

> recreateSocketAddresses may recreate the unreachable IP address
> ---
>
> Key: ZOOKEEPER-2691
> URL: https://issues.apache.org/jira/browse/ZOOKEEPER-2691
> Project: ZooKeeper
>  Issue Type: Bug
>Affects Versions: 3.4.8, 3.4.9, 3.4.10, 3.5.0, 3.5.1, 3.5.2
> Environment: Centos6.5
> Java8
> ZooKeeper3.4.8
>Reporter: JiangJiafu
>Priority: Minor
>
> The QuorumPeer$QuorumServer.recreateSocketAddress()  is used to resolved the 
> hostname to a new IP address(InetAddress) when any exception happens to the 
> socket. It will be very useful when a hostname can be resolved to more than 
> one IP address.
> But the problem is Java API InetAddress.getByName(String hostname) will 
> always return the first IP address when the hostname can be resolved to more 
> than one IP address, and the first IP address may be unreachable forever. For 
> example, if a machine has two network interfaces: eth0, eth1, say eth0 has 
> ip1, eth1 has ip2, the relationship between hostname and the IP addresses is 
> set in /etc/hosts. When I "close" the eth0 by command "ifdown eth0", the 
> InetAddress.getByName(String hostname)  will still return ip1, which is 
> unreachable forever.
> So I think it will be better to check the IP address by 
> InetAddress.isReachable(long) and choose the reachable IP address. 
> I have modified the ZooKeeper source code, and test the new code in my own 
> environment, and it can work very well when I turn down some network 
> interfaces using "ifdown" command.
> The original code is:
> {code:title=QuorumPeer.java|borderStyle=solid}
> public void recreateSocketAddresses() {
> InetAddress address = null;
> try {
> address = InetAddress.getByName(this.hostname);
> LOG.info("Resolved hostname: {} to address: {}", 
> this.hostname, address);
> this.addr = new InetSocketAddress(address, this.port);
> if (this.electionPort > 0){
> this.electionAddr = new InetSocketAddress(address, 
> this.electionPort);
> }
> } catch (UnknownHostException ex) {
> LOG.warn("Failed to resolve address: {}", this.hostname, ex);
> // Have we succeeded in the past?
> if (this.addr != null) {
> // Yes, previously the lookup succeeded. Leave things as 
> they are
> return;
> }
> // The hostname has never resolved. Create our 
> InetSocketAddress(es) as unresolved
> this.addr = InetSocketAddress.createUnresolved(this.hostname, 
> this.port);
> if (this.electionPort > 0){
> this.electionAddr = 
> InetSocketAddress.createUnresolved(this.hostname,
>
> this.electionPort);
> }
> }
> }
> {code}
> After my modification:
> {code:title=QuorumPeer.java|borderStyle=solid}
> public void recreateSocketAddresses() {
> InetAddress address = null;
> try {
> address = getReachableAddress(this.hostname);
> LOG.info("Resolved hostname: {} to address: {}", 
> this.hostname, address);
> this.addr = new InetSocketAddress(address, this.port);
> if (this.electionPort > 0){
> this.electionAddr = new InetSocketAddress(address, 
> this.electionPort);
> }
> } catch 

Failed: ZOOKEEPER- PreCommit Build #676

2017-05-11 Thread Apache Jenkins Server
Build: https://builds.apache.org/job/PreCommit-ZOOKEEPER-github-pr-build/676/

###
## LAST 60 LINES OF THE CONSOLE 
###
[...truncated 74.57 KB...]
warning: Cannot merge binary files: docs/zookeeperAdmin.pdf (HEAD vs. 
ad26e22dffc35af991d32bf95aa8ada9f99322ed)
warning: Cannot merge binary files: docs/recipes.pdf (HEAD vs. 
ad26e22dffc35af991d32bf95aa8ada9f99322ed)
warning: Cannot merge binary files: docs/linkmap.pdf (HEAD vs. 
ad26e22dffc35af991d32bf95aa8ada9f99322ed)
warning: Cannot merge binary files: docs/javaExample.pdf (HEAD vs. 
ad26e22dffc35af991d32bf95aa8ada9f99322ed)
warning: Cannot merge binary files: docs/index.pdf (HEAD vs. 
ad26e22dffc35af991d32bf95aa8ada9f99322ed)
warning: Cannot merge binary files: docs/bookkeeperStream.pdf (HEAD vs. 
ad26e22dffc35af991d32bf95aa8ada9f99322ed)
warning: Cannot merge binary files: docs/bookkeeperStarted.pdf (HEAD vs. 
ad26e22dffc35af991d32bf95aa8ada9f99322ed)
warning: Cannot merge binary files: docs/bookkeeperProgrammer.pdf (HEAD vs. 
ad26e22dffc35af991d32bf95aa8ada9f99322ed)
warning: Cannot merge binary files: docs/bookkeeperOverview.pdf (HEAD vs. 
ad26e22dffc35af991d32bf95aa8ada9f99322ed)
warning: Cannot merge binary files: docs/bookkeeperConfig.pdf (HEAD vs. 
ad26e22dffc35af991d32bf95aa8ada9f99322ed)

at 
org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:1866)
at 
org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:1834)
at 
org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:1830)
at 
org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommand(CliGitAPIImpl.java:1475)
at 
org.jenkinsci.plugins.gitclient.CliGitAPIImpl$3.execute(CliGitAPIImpl.java:621)
at 
org.jenkinsci.plugins.gitclient.AbstractGitAPIImpl.merge(AbstractGitAPIImpl.java:86)
at 
org.jenkinsci.plugins.gitclient.CliGitAPIImpl.merge(CliGitAPIImpl.java:71)
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:895)
at 
hudson.remoting.RemoteInvocationHandler$RPCRequest.call(RemoteInvocationHandler.java:870)
at 
hudson.remoting.RemoteInvocationHandler$RPCRequest.call(RemoteInvocationHandler.java:829)
at hudson.remoting.UserRequest.perform(UserRequest.java:153)
at hudson.remoting.UserRequest.perform(UserRequest.java:50)
at hudson.remoting.Request$2.run(Request.java:336)
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:1545)
at hudson.remoting.UserResponse.retrieve(UserRequest.java:253)
at hudson.remoting.Channel.call(Channel.java:830)
at 
hudson.remoting.RemoteInvocationHandler.invoke(RemoteInvocationHandler.java:257)
at com.sun.proxy.$Proxy102.merge(Unknown Source)
at 
org.jenkinsci.plugins.gitclient.RemoteGitImpl.merge(RemoteGitImpl.java:435)
at 
com.cloudbees.jenkins.plugins.git.vmerge.BuildChooserImpl.getCandidateRevisions(BuildChooserImpl.java:107)
at hudson.plugins.git.GitSCM.determineRevisionToBuild(GitSCM.java:1001)
at hudson.plugins.git.GitSCM.checkout(GitSCM.java:1108)
at hudson.scm.SCM.checkout(SCM.java:496)
at hudson.model.AbstractProject.checkout(AbstractProject.java:1281)
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:1728)
at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
at hudson.model.ResourceController.execute(ResourceController.java:98)
at hudson.model.Executor.run(Executor.java:405)
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 

[GitHub] zookeeper pull request #250: Branch 3.4

2017-05-11 Thread JiangJiafu
Github user JiangJiafu closed the pull request at:

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


---
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 #250: Branch 3.4

2017-05-11 Thread JiangJiafu
GitHub user JiangJiafu opened a pull request:

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

Branch 3.4



You can merge this pull request into a Git repository by running:

$ git pull https://github.com/apache/zookeeper branch-3.4

Alternatively you can review and apply these changes as the patch at:

https://github.com/apache/zookeeper/pull/250.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

This closes #250


commit fb01942d1ffa59e64bbc874abb00b9494a7d42ad
Author: Flavio Paiva Junqueira 
Date:   2013-09-02T21:47:42Z

ZOOKEEPER-1379. 'printwatches, redo, history and connect '. client commands 
always print usage. This is not necessary (edward via fpj)



git-svn-id: 
https://svn.apache.org/repos/asf/zookeeper/branches/branch-3.4@1519521 
13f79535-47bb-0310-9956-ffa450edef68

commit 32593f56c1c084a20f3a76a39b70555607ea8982
Author: Flavio Paiva Junqueira 
Date:   2013-09-03T11:20:03Z

ZOOKEEPER-1670: zookeeper should set a default value for SERVER_JVMFLAGS 
and CLIENT_JVMFLAGS so that memory usage is controlled (Arpit Gupta via fpj)



git-svn-id: 
https://svn.apache.org/repos/asf/zookeeper/branches/branch-3.4@1519650 
13f79535-47bb-0310-9956-ffa450edef68

commit 33550d6ce719b2cedfd0fa8650c4311dd9077d97
Author: Flavio Paiva Junqueira 
Date:   2013-09-05T20:46:44Z

ZOOKEEPER-1448: Node+Quota creation in transaction log can crash leader 
startup (Botond Hejj via fpj)


git-svn-id: 
https://svn.apache.org/repos/asf/zookeeper/branches/branch-3.4@1520418 
13f79535-47bb-0310-9956-ffa450edef68

commit 579c7a4736ee03183e6cba25d7d20dedb6f892dc
Author: Camille Fournier 
Date:   2013-09-11T20:42:24Z

ZOOKEEPER-1664. Kerberos auth doesn't work with native platform GSS 
integration. (Boaz Kelmer via camille) 


git-svn-id: 
https://svn.apache.org/repos/asf/zookeeper/branches/branch-3.4@1522028 
13f79535-47bb-0310-9956-ffa450edef68

commit a69b56620a12ab4be2147dab6b45a92c85bca1f2
Author: Michi Mutsuzaki 
Date:   2013-09-12T17:26:40Z

ZOOKEEPER-1750. Race condition producing NPE in NIOServerCnxn.toString 
(Rakesh R via michim)


git-svn-id: 
https://svn.apache.org/repos/asf/zookeeper/branches/branch-3.4@1522673 
13f79535-47bb-0310-9956-ffa450edef68

commit 2ad419efc40456c3aa25b1cba0624c39d0b49c7f
Author: Flavio Paiva Junqueira 
Date:   2013-09-17T22:44:54Z

ZOOKEEPER-1754. Read-only server allows to create znode (Rakesh R via fpj)



git-svn-id: 
https://svn.apache.org/repos/asf/zookeeper/branches/branch-3.4@1524247 
13f79535-47bb-0310-9956-ffa450edef68

commit 973665c48a176227a681998587f1bd14f0ea9578
Author: Mahadev Konar 
Date:   2013-09-18T02:06:28Z

ZOOKEEPER-1751. ClientCnxn#run could miss the second ping or connection get 
dropped before a ping. (Jeffrey Zhong  via mahadev)

git-svn-id: 
https://svn.apache.org/repos/asf/zookeeper/branches/branch-3.4@1524274 
13f79535-47bb-0310-9956-ffa450edef68

commit a8df46db76ee725411ff4774debf8a6352d12c6a
Author: Flavio Paiva Junqueira 
Date:   2013-09-18T10:24:00Z

ZOOKEEPER-1657. Increased CPU usage by unnecessary SASL checks (Philip K. 
Warren via fpj)



git-svn-id: 
https://svn.apache.org/repos/asf/zookeeper/branches/branch-3.4@1524355 
13f79535-47bb-0310-9956-ffa450edef68

commit d1eff7a27be156a5b4a37bd6aff4da446dd3813e
Author: Flavio Paiva Junqueira 
Date:   2013-09-18T12:33:45Z

ZOOKEEPER-1753. ClientCnxn is not properly releasing the resources, which 
are used to ping RwServer (Rakesh R via fpj)



git-svn-id: 
https://svn.apache.org/repos/asf/zookeeper/branches/branch-3.4@1524387 
13f79535-47bb-0310-9956-ffa450edef68

commit e3a488b11e4e0e8a124c7387dad98ecd286ee1eb
Author: Flavio Paiva Junqueira 
Date:   2013-09-25T21:44:11Z

ZOOKEEPER-1096. Leader communication should listen on specified IP, not 
wildcard address (Jared Cantwell, German Blanco via fpj)



git-svn-id: 
https://svn.apache.org/repos/asf/zookeeper/branches/branch-3.4@1526313 
13f79535-47bb-0310-9956-ffa450edef68

commit dc3267b0ec40abdd67833a86e7a6051e0b468a4d
Author: Mahadev Konar 
Date:   2013-09-26T00:03:59Z

ZOOKEEPER-1696. Fail to run zookeeper client on Weblogic application 
server. (Jeffrey Zhong via mahadev)

git-svn-id: 
https://svn.apache.org/repos/asf/zookeeper/branches/branch-3.4@1526338 
13f79535-47bb-0310-9956-ffa450edef68

commit a8fe3f3be3b77273950d9e10bc2c51aadd1902dc
Author: Flavio Paiva Junqueira 
Date:   2013-09-26T12:37:12Z

ZOOKEEPER-87. Follower does not shut itself down if its too far behind the 
leader. (German Blanco via fpj)



git-svn-id: 

ZooKeeper_branch35_openjdk7 - Build # 520 - Still Failing

2017-05-11 Thread Apache Jenkins Server
See https://builds.apache.org/job/ZooKeeper_branch35_openjdk7/520/

###
## LAST 60 LINES OF THE CONSOLE 
###
[...truncated 60.58 MB...]
[junit] 2017-05-11 10:08:42,239 [myid:] - WARN  [New I/O boss 
#2772:ClientCnxnSocketNetty$ZKClientHandler@439] - Exception caught: [id: 
0x0cf796aa] EXCEPTION: java.net.ConnectException: Connection refused: 
127.0.0.1/127.0.0.1:11348
[junit] java.net.ConnectException: Connection refused: 
127.0.0.1/127.0.0.1:11348
[junit] at sun.nio.ch.SocketChannelImpl.checkConnect(Native Method)
[junit] at 
sun.nio.ch.SocketChannelImpl.finishConnect(SocketChannelImpl.java:739)
[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] 2017-05-11 10:08:42,239 [myid:] - INFO  [New I/O boss 
#2772:ClientCnxnSocketNetty@208] - channel is told closing
[junit] 2017-05-11 10:08:42,239 [myid:127.0.0.1:11348] - INFO  
[main-SendThread(127.0.0.1:11348):ClientCnxn$SendThread@1231] - channel for 
sessionid 0x200e5f485a5 is lost, closing socket connection and attempting 
reconnect
[junit] 2017-05-11 10:08:42,516 [myid:127.0.0.1:11222] - INFO  
[main-SendThread(127.0.0.1:11222):ClientCnxn$SendThread@1113] - Opening socket 
connection to server 127.0.0.1/127.0.0.1:11222. Will not attempt to 
authenticate using SASL (unknown error)
[junit] 2017-05-11 10:08:42,518 [myid:] - INFO  [New I/O boss 
#18:ClientCnxnSocketNetty$1@127] - future isn't success, cause: {}
[junit] java.net.ConnectException: Connection refused: 
127.0.0.1/127.0.0.1:11222
[junit] at sun.nio.ch.SocketChannelImpl.checkConnect(Native Method)
[junit] at 
sun.nio.ch.SocketChannelImpl.finishConnect(SocketChannelImpl.java:739)
[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] 2017-05-11 10:08:42,518 [myid:] - WARN  [New I/O boss 
#18:ClientCnxnSocketNetty$ZKClientHandler@439] - Exception caught: [id: 
0x71c968f1] EXCEPTION: java.net.ConnectException: Connection refused: 
127.0.0.1/127.0.0.1:11222
[junit] java.net.ConnectException: Connection refused: 
127.0.0.1/127.0.0.1:11222
[junit] at sun.nio.ch.SocketChannelImpl.checkConnect(Native Method)
[junit] at 
sun.nio.ch.SocketChannelImpl.finishConnect(SocketChannelImpl.java:739)
[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 

[jira] [Updated] (ZOOKEEPER-2780) if directories of connectString don't exist, then...

2017-05-11 Thread Xiaoshuang LU (JIRA)

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

Xiaoshuang LU updated ZOOKEEPER-2780:
-
Description: 
{code}
public static void main(String[] stringArray) {
try {
// None of a, b, and c exist.
// Can I create them with the following ZooKeeper object?
ZooKeeper zooKeeper =
new ZooKeeper(

"address1:port1,address2:port2,address3:port3,address4:port4,address5:port5/a/b/c",
6,
null);

zooKeeper.create("/d", null, ZooDefs.Ids.OPEN_ACL_UNSAFE, 
CreateMode.PERSISTENT);

zooKeeper.close();
} catch (Exception e) {
LOGGER.error("", e);
}
}
{code}

  was:
{code}
public static void main(String[] stringArray) {
try {
// a, b, and c don't exit.
// Can I create them with the following ZooKeeper object?
ZooKeeper zooKeeper =
new ZooKeeper(

"address1:port1,address2:port2,address3:port3,address4:port4,address5:port5/a/b/c",
6,
null);

zooKeeper.create("/d", null, ZooDefs.Ids.OPEN_ACL_UNSAFE, 
CreateMode.PERSISTENT);

zooKeeper.close();
} catch (Exception e) {
LOGGER.error("", e);
}
}
{code}


> if directories of connectString don't exist, then...
> 
>
> Key: ZOOKEEPER-2780
> URL: https://issues.apache.org/jira/browse/ZOOKEEPER-2780
> Project: ZooKeeper
>  Issue Type: Improvement
>  Components: java client
>Reporter: Xiaoshuang LU
>
> {code}
> public static void main(String[] stringArray) {
> try {
> // None of a, b, and c exist.
> // Can I create them with the following ZooKeeper object?
> ZooKeeper zooKeeper =
> new ZooKeeper(
> 
> "address1:port1,address2:port2,address3:port3,address4:port4,address5:port5/a/b/c",
> 6,
> null);
> zooKeeper.create("/d", null, ZooDefs.Ids.OPEN_ACL_UNSAFE, 
> CreateMode.PERSISTENT);
> zooKeeper.close();
> } catch (Exception e) {
> LOGGER.error("", e);
> }
> }
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Updated] (ZOOKEEPER-2780) if directories of connectString don't exist, then...

2017-05-11 Thread Xiaoshuang LU (JIRA)

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

Xiaoshuang LU updated ZOOKEEPER-2780:
-
Description: 
{code}
public static void main(String[] stringArray) {
try {
// a, b, and c don't exit.
// Can I create them with the following ZooKeeper object?
ZooKeeper zooKeeper =
new ZooKeeper(

"address1:port1,address2:port2,address3:port3,address4:port4,address5:port5/a/b/c",
6,
null);

zooKeeper.create("/d", null, ZooDefs.Ids.OPEN_ACL_UNSAFE, 
CreateMode.PERSISTENT);

zooKeeper.close();
} catch (Exception e) {
LOGGER.error("", e);
}
}
{code}

  was:
{code}
public static void main(String[] stringArray) {
try {
// a, b, and c don't exit. Can I create them by the following 
ZooKeeper object?
ZooKeeper zooKeeper =
new ZooKeeper(

"address1:port1,address2:port2,address3:port3,address4:port4,address5:port5/a/b/c",
6,
null);

zooKeeper.create("/d", null, ZooDefs.Ids.OPEN_ACL_UNSAFE, 
CreateMode.PERSISTENT);

zooKeeper.close();
} catch (Exception e) {
LOGGER.error("", e);
}
}
{code}


> if directories of connectString don't exist, then...
> 
>
> Key: ZOOKEEPER-2780
> URL: https://issues.apache.org/jira/browse/ZOOKEEPER-2780
> Project: ZooKeeper
>  Issue Type: Improvement
>  Components: java client
>Reporter: Xiaoshuang LU
>
> {code}
> public static void main(String[] stringArray) {
> try {
> // a, b, and c don't exit.
> // Can I create them with the following ZooKeeper object?
> ZooKeeper zooKeeper =
> new ZooKeeper(
> 
> "address1:port1,address2:port2,address3:port3,address4:port4,address5:port5/a/b/c",
> 6,
> null);
> zooKeeper.create("/d", null, ZooDefs.Ids.OPEN_ACL_UNSAFE, 
> CreateMode.PERSISTENT);
> zooKeeper.close();
> } catch (Exception e) {
> LOGGER.error("", e);
> }
> }
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Updated] (ZOOKEEPER-2780) if directories of connectString don't exist, then...

2017-05-11 Thread Xiaoshuang LU (JIRA)

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

Xiaoshuang LU updated ZOOKEEPER-2780:
-
Description: 
{code}
public static void main(String[] stringArray) {
try {
// a, b, and c don't exit. Can I create them by the following 
ZooKeeper object?
ZooKeeper zooKeeper =
new ZooKeeper(

"address1:port1,address2:port2,address3:port3,address4:port4,address5:port5/a/b/c",
6,
null);

zooKeeper.create("/d", null, ZooDefs.Ids.OPEN_ACL_UNSAFE, 
CreateMode.PERSISTENT);

zooKeeper.close();
} catch (Exception e) {
LOGGER.error("", e);
}
}
{code}

  was:
{code}
public static void main(String[] stringArray) {
try {
// a, b, and c don't exit. Can I create them by the following 
ZooKeeper object?
ZooKeeper zooKeeper =
new ZooKeeper(

"address1:port1,address2:port2,address3:port3,address4:port4,address5:port5/a/b/c",
6,
null);

zooKeeper.create("/d", null, ZooDefs.Ids.OPEN_ACL_UNSAFE, 
CreateMode.PERSISTENT);

zooKeeper.close();
} catch (Exception e) {
LOGGER.warn("", e);
}
}
{code}


> if directories of connectString don't exist, then...
> 
>
> Key: ZOOKEEPER-2780
> URL: https://issues.apache.org/jira/browse/ZOOKEEPER-2780
> Project: ZooKeeper
>  Issue Type: Improvement
>  Components: java client
>Reporter: Xiaoshuang LU
>
> {code}
> public static void main(String[] stringArray) {
> try {
> // a, b, and c don't exit. Can I create them by the following 
> ZooKeeper object?
> ZooKeeper zooKeeper =
> new ZooKeeper(
> 
> "address1:port1,address2:port2,address3:port3,address4:port4,address5:port5/a/b/c",
> 6,
> null);
> zooKeeper.create("/d", null, ZooDefs.Ids.OPEN_ACL_UNSAFE, 
> CreateMode.PERSISTENT);
> zooKeeper.close();
> } catch (Exception e) {
> LOGGER.error("", e);
> }
> }
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Updated] (ZOOKEEPER-2780) if directories of connectString don't exist, then...

2017-05-11 Thread Xiaoshuang LU (JIRA)

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

Xiaoshuang LU updated ZOOKEEPER-2780:
-
Description: 
{code}
public static void main(String[] stringArray) {
try {
// a, b, and c don't exit. Can I create them by the following 
ZooKeeper object?
ZooKeeper zooKeeper =
new ZooKeeper(

"address1:port1,address2:port2,address3:port3,address4:port4,address5:port5/a/b/c",
6,
null);

zooKeeper.create("/d", null, ZooDefs.Ids.OPEN_ACL_UNSAFE, 
CreateMode.PERSISTENT);

zooKeeper.close();
} catch (Exception e) {
LOGGER.warn("", e);
}
}
{code}

  was:
{code}
public static void main(String[] stringArray) {
try {
ZooKeeper zooKeeper =
new ZooKeeper(

"address1:port1,address2:port2,address3:port3,address4:port4,address5:port5/a/b/c",
6,
null);

zooKeeper.create("/d", null, ZooDefs.Ids.OPEN_ACL_UNSAFE, 
CreateMode.PERSISTENT);

zooKeeper.close();
} catch (Exception e) {
LOGGER.warn("", e);
}
}
{code}


> if directories of connectString don't exist, then...
> 
>
> Key: ZOOKEEPER-2780
> URL: https://issues.apache.org/jira/browse/ZOOKEEPER-2780
> Project: ZooKeeper
>  Issue Type: Improvement
>  Components: java client
>Reporter: Xiaoshuang LU
>
> {code}
> public static void main(String[] stringArray) {
> try {
> // a, b, and c don't exit. Can I create them by the following 
> ZooKeeper object?
> ZooKeeper zooKeeper =
> new ZooKeeper(
> 
> "address1:port1,address2:port2,address3:port3,address4:port4,address5:port5/a/b/c",
> 6,
> null);
> zooKeeper.create("/d", null, ZooDefs.Ids.OPEN_ACL_UNSAFE, 
> CreateMode.PERSISTENT);
> zooKeeper.close();
> } catch (Exception e) {
> LOGGER.warn("", e);
> }
> }
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Updated] (ZOOKEEPER-2780) if directories of connectString don't exist, then...

2017-05-11 Thread Xiaoshuang LU (JIRA)

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

Xiaoshuang LU updated ZOOKEEPER-2780:
-
Description: 
{code}
public static void main(String[] stringArray) {
try {
ZooKeeper zooKeeper =
new ZooKeeper(

"address1:port1,address2:port2,address3:port3,address4:port4,address5:port5/a/b/c",
6,
null);

zooKeeper.create("/d", null, ZooDefs.Ids.OPEN_ACL_UNSAFE, 
CreateMode.PERSISTENT);

zooKeeper.close();
} catch (Exception e) {
LOGGER.warn("", e);
}
}
{code}

  was:
{code}

{code}


> if directories of connectString don't exist, then...
> 
>
> Key: ZOOKEEPER-2780
> URL: https://issues.apache.org/jira/browse/ZOOKEEPER-2780
> Project: ZooKeeper
>  Issue Type: Improvement
>  Components: java client
>Reporter: Xiaoshuang LU
>
> {code}
> public static void main(String[] stringArray) {
> try {
> ZooKeeper zooKeeper =
> new ZooKeeper(
> 
> "address1:port1,address2:port2,address3:port3,address4:port4,address5:port5/a/b/c",
> 6,
> null);
> zooKeeper.create("/d", null, ZooDefs.Ids.OPEN_ACL_UNSAFE, 
> CreateMode.PERSISTENT);
> zooKeeper.close();
> } catch (Exception e) {
> LOGGER.warn("", e);
> }
> }
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Updated] (ZOOKEEPER-2780) if directories of connectString don't exist, then...

2017-05-11 Thread Xiaoshuang LU (JIRA)

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

Xiaoshuang LU updated ZOOKEEPER-2780:
-
Summary: if directories of connectString don't exist, then...  (was: if 
directories of connectString do not exist)

> if directories of connectString don't exist, then...
> 
>
> Key: ZOOKEEPER-2780
> URL: https://issues.apache.org/jira/browse/ZOOKEEPER-2780
> Project: ZooKeeper
>  Issue Type: Improvement
>  Components: java client
>Reporter: Xiaoshuang LU
>
> {code}
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Created] (ZOOKEEPER-2780) if directories of connectString do not exist

2017-05-11 Thread Xiaoshuang LU (JIRA)
Xiaoshuang LU created ZOOKEEPER-2780:


 Summary: if directories of connectString do not exist
 Key: ZOOKEEPER-2780
 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-2780
 Project: ZooKeeper
  Issue Type: Improvement
  Components: java client
Reporter: Xiaoshuang LU


{code}

{code}



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Commented] (ZOOKEEPER-2755) Allow to subclass ClientCnxnSocketNetty and NettyServerCnxn in order to use Netty Local transport

2017-05-11 Thread ASF GitHub Bot (JIRA)

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

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

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

https://github.com/apache/zookeeper/pull/227#discussion_r115932842
  
--- Diff: src/java/test/org/apache/zookeeper/test/NettyLocalSuiteTest.java 
---
@@ -0,0 +1,35 @@
+/**
+ * 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 org.junit.runners.Suite;
+
+/**
+ * Run tests with: Netty Client against Netty server
+ */
+@Suite.SuiteClasses({
--- End diff --

tagging @arshadmohammad @hanm  for review/merge

@Randgalt do you think this new feature would be useful for Curator and for 
local testing of apps which use ZooKeeper ?


> Allow to subclass ClientCnxnSocketNetty and NettyServerCnxn in order to use 
> Netty Local transport
> -
>
> Key: ZOOKEEPER-2755
> URL: https://issues.apache.org/jira/browse/ZOOKEEPER-2755
> Project: ZooKeeper
>  Issue Type: New Feature
>  Components: java client, server
>Affects Versions: 3.5.2
>Reporter: Enrico Olivelli
>
> ClientCnxnSocketNetty and NettyServerCnxn use explicitly InetSocketAddress 
> class to work with network addresses.
> We can do a little refactoring to use only SocketAddress and make it possible 
> to create subclasses of ClientCnxnSocketNetty and NettyServerCnxn which 
> leverage built-in Netty 'local' channels. 
> Such Netty local channels do not create real sockets and so allow a simple 
> ZooKeeper server + ZooKeeper client to be run on the same JVM without binding 
> to real TCP endpoints.
> Usecases:
> Ability to run concurrently on the same machine tests of projects which use 
> ZooKeeper (usually in unit tests the server and the client run inside the 
> same JVM) without dealing with random ports and in general using less network 
> resources
> Run simplified (standalone, all processes in the same JVM) versions of 
> applications which need a working ZooKeeper ensemble to run.
> Note:
> Embedding ZooKeeper server + client on the same JVM has many risks and in 
> general I think we should encourage users to do so, so I in this patch I will 
> not provide official implementations of ClientCnxnSocketNetty and 
> NettyServerCnxn. There will be implementations only inside the test packages, 
> in order to test that most of the features are working with custom socket 
> factories and in particular with the 'LocalAddress' specific subclass of 
> SocketAddress.
> Note:
> the 'Local' sockets feature will be available on Netty 4 too



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[GitHub] zookeeper pull request #227: ZOOKEEPER-2755 Allow to subclass ClientCnxnSock...

2017-05-11 Thread eolivelli
Github user eolivelli commented on a diff in the pull request:

https://github.com/apache/zookeeper/pull/227#discussion_r115932842
  
--- Diff: src/java/test/org/apache/zookeeper/test/NettyLocalSuiteTest.java 
---
@@ -0,0 +1,35 @@
+/**
+ * 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 org.junit.runners.Suite;
+
+/**
+ * Run tests with: Netty Client against Netty server
+ */
+@Suite.SuiteClasses({
--- End diff --

tagging @arshadmohammad @hanm  for review/merge

@Randgalt do you think this new feature would be useful for Curator and for 
local testing of apps which use ZooKeeper ?


---
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] [Updated] (ZOOKEEPER-2691) recreateSocketAddresses may recreate the unreachable IP address

2017-05-11 Thread JiangJiafu (JIRA)

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

JiangJiafu updated ZOOKEEPER-2691:
--
Affects Version/s: 3.4.9
   3.4.10
   3.5.0
   3.5.1
   3.5.2

> recreateSocketAddresses may recreate the unreachable IP address
> ---
>
> Key: ZOOKEEPER-2691
> URL: https://issues.apache.org/jira/browse/ZOOKEEPER-2691
> Project: ZooKeeper
>  Issue Type: Bug
>Affects Versions: 3.4.8, 3.4.9, 3.4.10, 3.5.0, 3.5.1, 3.5.2
> Environment: Centos6.5
> Java8
> ZooKeeper3.4.8
>Reporter: JiangJiafu
>Priority: Minor
>
> The QuorumPeer$QuorumServer.recreateSocketAddress()  is used to resolved the 
> hostname to a new IP address(InetAddress) when any exception happens to the 
> socket. It will be very useful when a hostname can be resolved to more than 
> one IP address.
> But the problem is Java API InetAddress.getByName(String hostname) will 
> always return the first IP address when the hostname can be resolved to more 
> than one IP address, and the first IP address may be unreachable forever. For 
> example, if a machine has two network interfaces: eth0, eth1, say eth0 has 
> ip1, eth1 has ip2, the relationship between hostname and the IP addresses is 
> set in /etc/hosts. When I "close" the eth0 by command "ifdown eth0", the 
> InetAddress.getByName(String hostname)  will still return ip1, which is 
> unreachable forever.
> So I think it will be better to check the IP address by 
> InetAddress.isReachable(long) and choose the reachable IP address. 
> I have modified the ZooKeeper source code, and test the new code in my own 
> environment, and it can work very well when I turn down some network 
> interfaces using "ifdown" command.
> The original code is:
> {code:title=QuorumPeer.java|borderStyle=solid}
> public void recreateSocketAddresses() {
> InetAddress address = null;
> try {
> address = InetAddress.getByName(this.hostname);
> LOG.info("Resolved hostname: {} to address: {}", 
> this.hostname, address);
> this.addr = new InetSocketAddress(address, this.port);
> if (this.electionPort > 0){
> this.electionAddr = new InetSocketAddress(address, 
> this.electionPort);
> }
> } catch (UnknownHostException ex) {
> LOG.warn("Failed to resolve address: {}", this.hostname, ex);
> // Have we succeeded in the past?
> if (this.addr != null) {
> // Yes, previously the lookup succeeded. Leave things as 
> they are
> return;
> }
> // The hostname has never resolved. Create our 
> InetSocketAddress(es) as unresolved
> this.addr = InetSocketAddress.createUnresolved(this.hostname, 
> this.port);
> if (this.electionPort > 0){
> this.electionAddr = 
> InetSocketAddress.createUnresolved(this.hostname,
>
> this.electionPort);
> }
> }
> }
> {code}
> After my modification:
> {code:title=QuorumPeer.java|borderStyle=solid}
> public void recreateSocketAddresses() {
> InetAddress address = null;
> try {
> address = getReachableAddress(this.hostname);
> LOG.info("Resolved hostname: {} to address: {}", 
> this.hostname, address);
> this.addr = new InetSocketAddress(address, this.port);
> if (this.electionPort > 0){
> this.electionAddr = new InetSocketAddress(address, 
> this.electionPort);
> }
> } catch (UnknownHostException ex) {
> LOG.warn("Failed to resolve address: {}", this.hostname, ex);
> // Have we succeeded in the past?
> if (this.addr != null) {
> // Yes, previously the lookup succeeded. Leave things as 
> they are
> return;
> }
> // The hostname has never resolved. Create our 
> InetSocketAddress(es) as unresolved
> this.addr = InetSocketAddress.createUnresolved(this.hostname, 
> this.port);
> if (this.electionPort > 0){
> this.electionAddr = 
> InetSocketAddress.createUnresolved(this.hostname,
>
> this.electionPort);
> }
> }
> }
> public InetAddress getReachableAddress(String hostname) throws 
> UnknownHostException {
> InetAddress[] 

?????? Is it good for Session management to use system time ?

2017-05-11 Thread ??????
Hi Michael,


I am using ZooKeeper 3.4.8, and I eager to know whether this problem be fixed 
in 3.4.X version, because as I know 3.4.X is currently the stable version.
If you have some other method to solve this problem, please let me know.


Thanks.


--
JiangJiafu



 


>> I think it may be better to use System.nanoTime() because it can achieve
the same goal without any problem.
Yes, and this has been fixed in ZOOKEEPER-1366 which is included in 3.5.1
and later versions. Which version of ZK you are using?

On Wed, May 3, 2017 at 1:09 AM, ??  wrote:

> Hi,
>
> I'm using ZooKeepr in a multi-node environment, I found that if the
> machine time changes, the ephemeral node may exist for a long time even
> that the client has disconnected with ZooKeeper server.
> I read the source code and I find that the SessionTracker use
> System.currentTimeMills() to record the time. I think it may be better to
> use System.nanoTime() because it can achieve the same goal without any
> problem.
> I don't know whether I'm right. Can anyone give me suggestions?
>
>
>
> JiangJiafu




-- 
Cheers
Michael.