[GitHub] zookeeper issue #681: ZOOKEEPER-3176: Quorum TLS - add SSL config options

2018-10-29 Thread asfgit
Github user asfgit commented on the issue:

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

Refer to this link for build results (access rights to CI server needed): 
https://builds.apache.org/job/PreCommit-ZOOKEEPER-github-pr-build/2539/



---


Failed: ZOOKEEPER- PreCommit Build #2539

2018-10-29 Thread Apache Jenkins Server
Build: https://builds.apache.org/job/PreCommit-ZOOKEEPER-github-pr-build/2539/

###
## LAST 60 LINES OF THE CONSOLE 
###
[...truncated 86.17 MB...]
 [exec] 
==
 [exec] 
 [exec] 
 [exec] 
 [exec] Error: No value specified for option "issue"
 [exec] Session logged out. Session was 
JSESSIONID=54A2AC753A5763A61482B50CEB303F9E.
 [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:1859:
 exec returned: 2

Total time: 13 minutes 41 seconds
Build step 'Execute shell' marked build as failure
Archiving artifacts
Setting JDK_1_8_LATEST__HOME=/home/jenkins/tools/java/latest1.8
Setting MAVEN_3_LATEST__HOME=/home/jenkins/tools/maven/latest3/
Recording test results
Setting JDK_1_8_LATEST__HOME=/home/jenkins/tools/java/latest1.8
Setting MAVEN_3_LATEST__HOME=/home/jenkins/tools/maven/latest3/
Setting JDK_1_8_LATEST__HOME=/home/jenkins/tools/java/latest1.8
Setting MAVEN_3_LATEST__HOME=/home/jenkins/tools/maven/latest3/
[description-setter] Description set: ZOOKEEPER-3176
Setting JDK_1_8_LATEST__HOME=/home/jenkins/tools/java/latest1.8
Setting MAVEN_3_LATEST__HOME=/home/jenkins/tools/maven/latest3/
Setting JDK_1_8_LATEST__HOME=/home/jenkins/tools/java/latest1.8
Setting MAVEN_3_LATEST__HOME=/home/jenkins/tools/maven/latest3/
Adding one-line test results to commit status...
Setting JDK_1_8_LATEST__HOME=/home/jenkins/tools/java/latest1.8
Setting MAVEN_3_LATEST__HOME=/home/jenkins/tools/maven/latest3/
Setting JDK_1_8_LATEST__HOME=/home/jenkins/tools/java/latest1.8
Setting MAVEN_3_LATEST__HOME=/home/jenkins/tools/maven/latest3/
Setting status of 94ee0424d36bba2d77593986981389233db2199e to FAILURE with url 
https://builds.apache.org/job/PreCommit-ZOOKEEPER-github-pr-build/2539/ and 
message: 'FAILURE
 2186 tests run, 1 skipped, 1 failed.'
Using context: Jenkins

Refer to this link for build results (access rights to CI server needed): 
https://builds.apache.org/job/PreCommit-ZOOKEEPER-github-pr-build/2539/

Setting JDK_1_8_LATEST__HOME=/home/jenkins/tools/java/latest1.8
Setting MAVEN_3_LATEST__HOME=/home/jenkins/tools/maven/latest3/
Setting JDK_1_8_LATEST__HOME=/home/jenkins/tools/java/latest1.8
Setting MAVEN_3_LATEST__HOME=/home/jenkins/tools/maven/latest3/
Email was triggered for: Failure - Any
Sending email for trigger: Failure - Any
Setting JDK_1_8_LATEST__HOME=/home/jenkins/tools/java/latest1.8
Setting MAVEN_3_LATEST__HOME=/home/jenkins/tools/maven/latest3/
Setting JDK_1_8_LATEST__HOME=/home/jenkins/tools/java/latest1.8
Setting MAVEN_3_LATEST__HOME=/home/jenkins/tools/maven/latest3/
Setting JDK_1_8_LATEST__HOME=/home/jenkins/tools/java/latest1.8
Setting MAVEN_3_LATEST__HOME=/home/jenkins/tools/maven/latest3/



###
## FAILED TESTS (if any) 
##
1 tests failed.
FAILED:  
org.apache.zookeeper.server.quorum.UnifiedServerSocketTest.testDenialOfServiceResistanceNonStrictServer[0]

Error Message:
null

Stack Trace:
junit.framework.AssertionFailedError
at 
org.apache.zookeeper.server.quorum.UnifiedServerSocketTest.testDenialOfServiceResistanceNonStrictServer(UnifiedServerSocketTest.java:460)

[GitHub] zookeeper issue #679: ZOOKEEPER-3172: Quorum TLS - fix port unification to a...

2018-10-29 Thread asfgit
Github user asfgit commented on the issue:

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

Refer to this link for build results (access rights to CI server needed): 
https://builds.apache.org/job/PreCommit-ZOOKEEPER-github-pr-build/2537/



---


Failed: ZOOKEEPER- PreCommit Build #2537

2018-10-29 Thread Apache Jenkins Server
Build: https://builds.apache.org/job/PreCommit-ZOOKEEPER-github-pr-build/2537/

###
## LAST 60 LINES OF THE CONSOLE 
###
[...truncated 86.27 MB...]
 [exec] 
==
 [exec] 
 [exec] 
 [exec] 
 [exec] Error: No value specified for option "issue"
 [exec] Session logged out. Session was 
JSESSIONID=67EB3DE7717EA3CD6AEA0BC6525C2DA6.
 [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:1859:
 exec returned: 2

Total time: 13 minutes 30 seconds
Build step 'Execute shell' marked build as failure
Archiving artifacts
Setting JDK_1_8_LATEST__HOME=/home/jenkins/tools/java/latest1.8
Setting MAVEN_3_LATEST__HOME=/home/jenkins/tools/maven/latest3/
Recording test results
Setting JDK_1_8_LATEST__HOME=/home/jenkins/tools/java/latest1.8
Setting MAVEN_3_LATEST__HOME=/home/jenkins/tools/maven/latest3/
Setting JDK_1_8_LATEST__HOME=/home/jenkins/tools/java/latest1.8
Setting MAVEN_3_LATEST__HOME=/home/jenkins/tools/maven/latest3/
[description-setter] Description set: ZOOKEEPER-3172
Setting JDK_1_8_LATEST__HOME=/home/jenkins/tools/java/latest1.8
Setting MAVEN_3_LATEST__HOME=/home/jenkins/tools/maven/latest3/
Setting JDK_1_8_LATEST__HOME=/home/jenkins/tools/java/latest1.8
Setting MAVEN_3_LATEST__HOME=/home/jenkins/tools/maven/latest3/
Adding one-line test results to commit status...
Setting JDK_1_8_LATEST__HOME=/home/jenkins/tools/java/latest1.8
Setting MAVEN_3_LATEST__HOME=/home/jenkins/tools/maven/latest3/
Setting JDK_1_8_LATEST__HOME=/home/jenkins/tools/java/latest1.8
Setting MAVEN_3_LATEST__HOME=/home/jenkins/tools/maven/latest3/
Setting status of 8fac486c83726979ff69067116b309d568f52425 to FAILURE with url 
https://builds.apache.org/job/PreCommit-ZOOKEEPER-github-pr-build/2537/ and 
message: 'FAILURE
 2181 tests run, 1 skipped, 1 failed.'
Using context: Jenkins

Refer to this link for build results (access rights to CI server needed): 
https://builds.apache.org/job/PreCommit-ZOOKEEPER-github-pr-build/2537/

Setting JDK_1_8_LATEST__HOME=/home/jenkins/tools/java/latest1.8
Setting MAVEN_3_LATEST__HOME=/home/jenkins/tools/maven/latest3/
Setting JDK_1_8_LATEST__HOME=/home/jenkins/tools/java/latest1.8
Setting MAVEN_3_LATEST__HOME=/home/jenkins/tools/maven/latest3/
Email was triggered for: Failure - Any
Sending email for trigger: Failure - Any
Setting JDK_1_8_LATEST__HOME=/home/jenkins/tools/java/latest1.8
Setting MAVEN_3_LATEST__HOME=/home/jenkins/tools/maven/latest3/
Setting JDK_1_8_LATEST__HOME=/home/jenkins/tools/java/latest1.8
Setting MAVEN_3_LATEST__HOME=/home/jenkins/tools/maven/latest3/
Setting JDK_1_8_LATEST__HOME=/home/jenkins/tools/java/latest1.8
Setting MAVEN_3_LATEST__HOME=/home/jenkins/tools/maven/latest3/



###
## FAILED TESTS (if any) 
##
1 tests failed.
FAILED:  
org.apache.zookeeper.server.quorum.UnifiedServerSocketTest.testDenialOfServiceResistanceNonStrictServer[0]

Error Message:
null

Stack Trace:
junit.framework.AssertionFailedError
at 
org.apache.zookeeper.server.quorum.UnifiedServerSocketTest.testDenialOfServiceResistanceNonStrictServer(UnifiedServerSocketTest.java:460)

[GitHub] zookeeper issue #678: ZOOKEEPER-3173: Quorum TLS - support PEM trust/key sto...

2018-10-29 Thread asfgit
Github user asfgit commented on the issue:

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

Refer to this link for build results (access rights to CI server needed): 
https://builds.apache.org/job/PreCommit-ZOOKEEPER-github-pr-build/2536/



---


Failed: ZOOKEEPER- PreCommit Build #2536

2018-10-29 Thread Apache Jenkins Server
Build: https://builds.apache.org/job/PreCommit-ZOOKEEPER-github-pr-build/2536/

###
## LAST 60 LINES OF THE CONSOLE 
###
[...truncated 21.89 MB...]
 [exec] /bin/kill -9 13437 
 [exec] /bin/kill -9 13467 
 [exec] 
/home/jenkins/jenkins-slave/workspace/PreCommit-ZOOKEEPER-github-pr-build/zookeeper-server/src/test/resources/test-github-pr.sh:
 line 471: 13488 Killed  $ANT_HOME/bin/ant 
-DZookeeperPatchProcess= -Dtest.junit.output.format=xml -Dtest.output=yes 
test-contrib
 [exec] 
 [exec] Error: No value specified for option "issue"
 [exec] Session logged out. Session was 
JSESSIONID=00DD27C3C5F616879857911A7EA45E08.
 [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:1859:
 exec returned: 3

Total time: 5 minutes 27 seconds
Build step 'Execute shell' marked build as failure
Archiving artifacts
Setting JDK_1_8_LATEST__HOME=/home/jenkins/tools/java/latest1.8
Setting MAVEN_3_LATEST__HOME=/home/jenkins/tools/maven/latest3/
Recording test results
Setting JDK_1_8_LATEST__HOME=/home/jenkins/tools/java/latest1.8
Setting MAVEN_3_LATEST__HOME=/home/jenkins/tools/maven/latest3/
Setting JDK_1_8_LATEST__HOME=/home/jenkins/tools/java/latest1.8
Setting MAVEN_3_LATEST__HOME=/home/jenkins/tools/maven/latest3/
[description-setter] Description set: ZOOKEEPER-3173
Setting JDK_1_8_LATEST__HOME=/home/jenkins/tools/java/latest1.8
Setting MAVEN_3_LATEST__HOME=/home/jenkins/tools/maven/latest3/
Setting JDK_1_8_LATEST__HOME=/home/jenkins/tools/java/latest1.8
Setting MAVEN_3_LATEST__HOME=/home/jenkins/tools/maven/latest3/
Adding one-line test results to commit status...
Setting JDK_1_8_LATEST__HOME=/home/jenkins/tools/java/latest1.8
Setting MAVEN_3_LATEST__HOME=/home/jenkins/tools/maven/latest3/
Setting JDK_1_8_LATEST__HOME=/home/jenkins/tools/java/latest1.8
Setting MAVEN_3_LATEST__HOME=/home/jenkins/tools/maven/latest3/
Setting status of 3067d8402392d0e06fbe0a12741893470dffa0fa to FAILURE with url 
https://builds.apache.org/job/PreCommit-ZOOKEEPER-github-pr-build/2536/ and 
message: 'FAILURE
 1293 tests run, 0 skipped, 0 failed.'
Using context: Jenkins

Refer to this link for build results (access rights to CI server needed): 
https://builds.apache.org/job/PreCommit-ZOOKEEPER-github-pr-build/2536/

Setting JDK_1_8_LATEST__HOME=/home/jenkins/tools/java/latest1.8
Setting MAVEN_3_LATEST__HOME=/home/jenkins/tools/maven/latest3/
Setting JDK_1_8_LATEST__HOME=/home/jenkins/tools/java/latest1.8
Setting MAVEN_3_LATEST__HOME=/home/jenkins/tools/maven/latest3/
Email was triggered for: Failure - Any
Sending email for trigger: Failure - Any
Setting JDK_1_8_LATEST__HOME=/home/jenkins/tools/java/latest1.8
Setting MAVEN_3_LATEST__HOME=/home/jenkins/tools/maven/latest3/
Setting JDK_1_8_LATEST__HOME=/home/jenkins/tools/java/latest1.8
Setting MAVEN_3_LATEST__HOME=/home/jenkins/tools/maven/latest3/
Setting JDK_1_8_LATEST__HOME=/home/jenkins/tools/java/latest1.8
Setting MAVEN_3_LATEST__HOME=/home/jenkins/tools/maven/latest3/



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

Failed: ZOOKEEPER- PreCommit Build #2538

2018-10-29 Thread Apache Jenkins Server
Build: https://builds.apache.org/job/PreCommit-ZOOKEEPER-github-pr-build/2538/

###
## LAST 60 LINES OF THE CONSOLE 
###
[...truncated 38.06 KB...]
 [exec] 
 [exec] 
 [exec] 
 [exec] Error: No value specified for option "issue"
 [exec] Session 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@2/patchprocess'
 and 
'/home/jenkins/jenkins-slave/workspace/PreCommit-ZOOKEEPER-github-pr-build@2/patchprocess'
 are the same file

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

Total time: 2 minutes 54 seconds
Build step 'Execute shell' marked build as failure
Archiving artifacts
Setting JDK_1_8_LATEST__HOME=/home/jenkins/tools/java/latest1.8
Setting MAVEN_3_LATEST__HOME=/home/jenkins/tools/maven/latest3/
Recording test results
Setting JDK_1_8_LATEST__HOME=/home/jenkins/tools/java/latest1.8
Setting MAVEN_3_LATEST__HOME=/home/jenkins/tools/maven/latest3/
ERROR: Step ?Publish JUnit test result report? failed: No test report files 
were found. Configuration error?
Setting JDK_1_8_LATEST__HOME=/home/jenkins/tools/java/latest1.8
Setting MAVEN_3_LATEST__HOME=/home/jenkins/tools/maven/latest3/
[description-setter] Description set: ZOOKEEPER-3174
Setting JDK_1_8_LATEST__HOME=/home/jenkins/tools/java/latest1.8
Setting MAVEN_3_LATEST__HOME=/home/jenkins/tools/maven/latest3/
Setting JDK_1_8_LATEST__HOME=/home/jenkins/tools/java/latest1.8
Setting MAVEN_3_LATEST__HOME=/home/jenkins/tools/maven/latest3/
Adding one-line test results to commit status...
Setting JDK_1_8_LATEST__HOME=/home/jenkins/tools/java/latest1.8
Setting MAVEN_3_LATEST__HOME=/home/jenkins/tools/maven/latest3/
Setting JDK_1_8_LATEST__HOME=/home/jenkins/tools/java/latest1.8
Setting MAVEN_3_LATEST__HOME=/home/jenkins/tools/maven/latest3/
Setting status of 213af717364132bb1e7811d47e20fde527ee6dd3 to FAILURE with url 
https://builds.apache.org/job/PreCommit-ZOOKEEPER-github-pr-build/2538/ and 
message: 'FAILURE
 No test results found.'
Using context: Jenkins

Refer to this link for build results (access rights to CI server needed): 
https://builds.apache.org/job/PreCommit-ZOOKEEPER-github-pr-build/2538/

Setting JDK_1_8_LATEST__HOME=/home/jenkins/tools/java/latest1.8
Setting MAVEN_3_LATEST__HOME=/home/jenkins/tools/maven/latest3/
Setting JDK_1_8_LATEST__HOME=/home/jenkins/tools/java/latest1.8
Setting MAVEN_3_LATEST__HOME=/home/jenkins/tools/maven/latest3/
Email was triggered for: Failure - Any
Sending email for trigger: Failure - Any
Setting JDK_1_8_LATEST__HOME=/home/jenkins/tools/java/latest1.8
Setting MAVEN_3_LATEST__HOME=/home/jenkins/tools/maven/latest3/
Setting JDK_1_8_LATEST__HOME=/home/jenkins/tools/java/latest1.8
Setting MAVEN_3_LATEST__HOME=/home/jenkins/tools/maven/latest3/
Setting JDK_1_8_LATEST__HOME=/home/jenkins/tools/java/latest1.8
Setting MAVEN_3_LATEST__HOME=/home/jenkins/tools/maven/latest3/



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

[GitHub] zookeeper issue #680: ZOOKEEPER-3174: Quorum TLS - support reloading trust/k...

2018-10-29 Thread asfgit
Github user asfgit commented on the issue:

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

Refer to this link for build results (access rights to CI server needed): 
https://builds.apache.org/job/PreCommit-ZOOKEEPER-github-pr-build/2538/



---


[GitHub] zookeeper issue #680: ZOOKEEPER-3174: Quorum TLS - support reloading trust/k...

2018-10-29 Thread asfgit
Github user asfgit commented on the issue:

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

Refer to this link for build results (access rights to CI server needed): 
https://builds.apache.org/job/PreCommit-ZOOKEEPER-github-pr-build/2534/



---


Failed: ZOOKEEPER- PreCommit Build #2534

2018-10-29 Thread Apache Jenkins Server
Build: https://builds.apache.org/job/PreCommit-ZOOKEEPER-github-pr-build/2534/

###
## LAST 60 LINES OF THE CONSOLE 
###
[...truncated 85.58 MB...]
 [exec] 
==
 [exec] 
 [exec] 
 [exec] 
 [exec] Error: No value specified for option "issue"
 [exec] Session logged out. Session was 
JSESSIONID=E5897246462B2A21FBB41CC2206F7365.
 [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:1859:
 exec returned: 2

Total time: 17 minutes 5 seconds
Build step 'Execute shell' marked build as failure
Archiving artifacts
Setting JDK_1_8_LATEST__HOME=/home/jenkins/tools/java/latest1.8
Setting MAVEN_3_LATEST__HOME=/home/jenkins/tools/maven/latest3/
Recording test results
Setting JDK_1_8_LATEST__HOME=/home/jenkins/tools/java/latest1.8
Setting MAVEN_3_LATEST__HOME=/home/jenkins/tools/maven/latest3/
Setting JDK_1_8_LATEST__HOME=/home/jenkins/tools/java/latest1.8
Setting MAVEN_3_LATEST__HOME=/home/jenkins/tools/maven/latest3/
[description-setter] Description set: ZOOKEEPER-3174
Setting JDK_1_8_LATEST__HOME=/home/jenkins/tools/java/latest1.8
Setting MAVEN_3_LATEST__HOME=/home/jenkins/tools/maven/latest3/
Setting JDK_1_8_LATEST__HOME=/home/jenkins/tools/java/latest1.8
Setting MAVEN_3_LATEST__HOME=/home/jenkins/tools/maven/latest3/
Adding one-line test results to commit status...
Setting JDK_1_8_LATEST__HOME=/home/jenkins/tools/java/latest1.8
Setting MAVEN_3_LATEST__HOME=/home/jenkins/tools/maven/latest3/
Setting JDK_1_8_LATEST__HOME=/home/jenkins/tools/java/latest1.8
Setting MAVEN_3_LATEST__HOME=/home/jenkins/tools/maven/latest3/
Setting status of aea9fd45abdc36b3dc766fac79dec52c7f76b717 to FAILURE with url 
https://builds.apache.org/job/PreCommit-ZOOKEEPER-github-pr-build/2534/ and 
message: 'FAILURE
 2186 tests run, 1 skipped, 1 failed.'
Using context: Jenkins

Refer to this link for build results (access rights to CI server needed): 
https://builds.apache.org/job/PreCommit-ZOOKEEPER-github-pr-build/2534/

Setting JDK_1_8_LATEST__HOME=/home/jenkins/tools/java/latest1.8
Setting MAVEN_3_LATEST__HOME=/home/jenkins/tools/maven/latest3/
Setting JDK_1_8_LATEST__HOME=/home/jenkins/tools/java/latest1.8
Setting MAVEN_3_LATEST__HOME=/home/jenkins/tools/maven/latest3/
Email was triggered for: Failure - Any
Sending email for trigger: Failure - Any
Setting JDK_1_8_LATEST__HOME=/home/jenkins/tools/java/latest1.8
Setting MAVEN_3_LATEST__HOME=/home/jenkins/tools/maven/latest3/
Setting JDK_1_8_LATEST__HOME=/home/jenkins/tools/java/latest1.8
Setting MAVEN_3_LATEST__HOME=/home/jenkins/tools/maven/latest3/
Setting JDK_1_8_LATEST__HOME=/home/jenkins/tools/java/latest1.8
Setting MAVEN_3_LATEST__HOME=/home/jenkins/tools/maven/latest3/



###
## FAILED TESTS (if any) 
##
1 tests failed.
FAILED:  
org.apache.zookeeper.server.quorum.UnifiedServerSocketTest.testDenialOfServiceResistanceNonStrictServer[0]

Error Message:
null

Stack Trace:
junit.framework.AssertionFailedError
at 
org.apache.zookeeper.server.quorum.UnifiedServerSocketTest.testDenialOfServiceResistanceNonStrictServer(UnifiedServerSocketTest.java:460)

[GitHub] zookeeper issue #681: ZOOKEEPER-3176: Quorum TLS - add SSL config options

2018-10-29 Thread asfgit
Github user asfgit commented on the issue:

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

Refer to this link for build results (access rights to CI server needed): 
https://builds.apache.org/job/PreCommit-ZOOKEEPER-github-pr-build/2535/



---


Failed: ZOOKEEPER- PreCommit Build #2535

2018-10-29 Thread Apache Jenkins Server
Build: https://builds.apache.org/job/PreCommit-ZOOKEEPER-github-pr-build/2535/

###
## LAST 60 LINES OF THE CONSOLE 
###
[...truncated 86.29 MB...]
 [exec] 
==
 [exec] 
 [exec] 
 [exec] 
 [exec] Error: No value specified for option "issue"
 [exec] Session logged out. Session was 
JSESSIONID=BD263962EA36DA79B81B07F218D740FF.
 [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:1859:
 exec returned: 2

Total time: 13 minutes 23 seconds
Build step 'Execute shell' marked build as failure
Archiving artifacts
Setting JDK_1_8_LATEST__HOME=/home/jenkins/tools/java/latest1.8
Setting MAVEN_3_LATEST__HOME=/home/jenkins/tools/maven/latest3/
Recording test results
Setting JDK_1_8_LATEST__HOME=/home/jenkins/tools/java/latest1.8
Setting MAVEN_3_LATEST__HOME=/home/jenkins/tools/maven/latest3/
Setting JDK_1_8_LATEST__HOME=/home/jenkins/tools/java/latest1.8
Setting MAVEN_3_LATEST__HOME=/home/jenkins/tools/maven/latest3/
[description-setter] Description set: ZOOKEEPER-3176
Setting JDK_1_8_LATEST__HOME=/home/jenkins/tools/java/latest1.8
Setting MAVEN_3_LATEST__HOME=/home/jenkins/tools/maven/latest3/
Setting JDK_1_8_LATEST__HOME=/home/jenkins/tools/java/latest1.8
Setting MAVEN_3_LATEST__HOME=/home/jenkins/tools/maven/latest3/
Adding one-line test results to commit status...
Setting JDK_1_8_LATEST__HOME=/home/jenkins/tools/java/latest1.8
Setting MAVEN_3_LATEST__HOME=/home/jenkins/tools/maven/latest3/
Setting JDK_1_8_LATEST__HOME=/home/jenkins/tools/java/latest1.8
Setting MAVEN_3_LATEST__HOME=/home/jenkins/tools/maven/latest3/
Setting status of 0e4c55ab5bad31f9b1cdec63765421fe4c823920 to FAILURE with url 
https://builds.apache.org/job/PreCommit-ZOOKEEPER-github-pr-build/2535/ and 
message: 'FAILURE
 2186 tests run, 1 skipped, 1 failed.'
Using context: Jenkins

Refer to this link for build results (access rights to CI server needed): 
https://builds.apache.org/job/PreCommit-ZOOKEEPER-github-pr-build/2535/

Setting JDK_1_8_LATEST__HOME=/home/jenkins/tools/java/latest1.8
Setting MAVEN_3_LATEST__HOME=/home/jenkins/tools/maven/latest3/
Setting JDK_1_8_LATEST__HOME=/home/jenkins/tools/java/latest1.8
Setting MAVEN_3_LATEST__HOME=/home/jenkins/tools/maven/latest3/
Email was triggered for: Failure - Any
Sending email for trigger: Failure - Any
Setting JDK_1_8_LATEST__HOME=/home/jenkins/tools/java/latest1.8
Setting MAVEN_3_LATEST__HOME=/home/jenkins/tools/maven/latest3/
Setting JDK_1_8_LATEST__HOME=/home/jenkins/tools/java/latest1.8
Setting MAVEN_3_LATEST__HOME=/home/jenkins/tools/maven/latest3/
Setting JDK_1_8_LATEST__HOME=/home/jenkins/tools/java/latest1.8
Setting MAVEN_3_LATEST__HOME=/home/jenkins/tools/maven/latest3/



###
## FAILED TESTS (if any) 
##
1 tests failed.
FAILED:  
org.apache.zookeeper.server.quorum.UnifiedServerSocketTest.testDenialOfServiceResistanceNonStrictServer[0]

Error Message:
null

Stack Trace:
junit.framework.AssertionFailedError
at 
org.apache.zookeeper.server.quorum.UnifiedServerSocketTest.testDenialOfServiceResistanceNonStrictServer(UnifiedServerSocketTest.java:460)

Failed: ZOOKEEPER- PreCommit Build #2533

2018-10-29 Thread Apache Jenkins Server
Build: https://builds.apache.org/job/PreCommit-ZOOKEEPER-github-pr-build/2533/

###
## LAST 60 LINES OF THE CONSOLE 
###
[...truncated 85.93 MB...]
 [exec] 
==
 [exec] 
 [exec] 
 [exec] 
 [exec] Error: No value specified for option "issue"
 [exec] Session 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:1859:
 exec returned: 1

Total time: 22 minutes 44 seconds
Build step 'Execute shell' marked build as failure
Archiving artifacts
Setting JDK_1_8_LATEST__HOME=/home/jenkins/tools/java/latest1.8
Setting MAVEN_3_LATEST__HOME=/home/jenkins/tools/maven/latest3/
Recording test results
Setting JDK_1_8_LATEST__HOME=/home/jenkins/tools/java/latest1.8
Setting MAVEN_3_LATEST__HOME=/home/jenkins/tools/maven/latest3/
Setting JDK_1_8_LATEST__HOME=/home/jenkins/tools/java/latest1.8
Setting MAVEN_3_LATEST__HOME=/home/jenkins/tools/maven/latest3/
[description-setter] Description set: ZOOKEEPER-3172
Setting JDK_1_8_LATEST__HOME=/home/jenkins/tools/java/latest1.8
Setting MAVEN_3_LATEST__HOME=/home/jenkins/tools/maven/latest3/
Setting JDK_1_8_LATEST__HOME=/home/jenkins/tools/java/latest1.8
Setting MAVEN_3_LATEST__HOME=/home/jenkins/tools/maven/latest3/
Adding one-line test results to commit status...
Setting JDK_1_8_LATEST__HOME=/home/jenkins/tools/java/latest1.8
Setting MAVEN_3_LATEST__HOME=/home/jenkins/tools/maven/latest3/
Setting JDK_1_8_LATEST__HOME=/home/jenkins/tools/java/latest1.8
Setting MAVEN_3_LATEST__HOME=/home/jenkins/tools/maven/latest3/
Setting status of c3fc090f5bc2b1972d247f8a30441dc3512b4557 to FAILURE with url 
https://builds.apache.org/job/PreCommit-ZOOKEEPER-github-pr-build/2533/ and 
message: 'FAILURE
 2181 tests run, 1 skipped, 0 failed.'
Using context: Jenkins

Refer to this link for build results (access rights to CI server needed): 
https://builds.apache.org/job/PreCommit-ZOOKEEPER-github-pr-build/2533/

Setting JDK_1_8_LATEST__HOME=/home/jenkins/tools/java/latest1.8
Setting MAVEN_3_LATEST__HOME=/home/jenkins/tools/maven/latest3/
Setting JDK_1_8_LATEST__HOME=/home/jenkins/tools/java/latest1.8
Setting MAVEN_3_LATEST__HOME=/home/jenkins/tools/maven/latest3/
Email was triggered for: Failure - Any
Sending email for trigger: Failure - Any
Setting JDK_1_8_LATEST__HOME=/home/jenkins/tools/java/latest1.8
Setting MAVEN_3_LATEST__HOME=/home/jenkins/tools/maven/latest3/
Setting JDK_1_8_LATEST__HOME=/home/jenkins/tools/java/latest1.8
Setting MAVEN_3_LATEST__HOME=/home/jenkins/tools/maven/latest3/
Setting JDK_1_8_LATEST__HOME=/home/jenkins/tools/java/latest1.8
Setting MAVEN_3_LATEST__HOME=/home/jenkins/tools/maven/latest3/



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

[GitHub] zookeeper issue #679: ZOOKEEPER-3172: Quorum TLS - fix port unification to a...

2018-10-29 Thread asfgit
Github user asfgit commented on the issue:

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

Refer to this link for build results (access rights to CI server needed): 
https://builds.apache.org/job/PreCommit-ZOOKEEPER-github-pr-build/2533/



---


[jira] [Commented] (ZOOKEEPER-2219) ZooKeeper server should better handle SessionMovedException.

2018-10-29 Thread yangwei (JIRA)


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

yangwei commented on ZOOKEEPER-2219:


https://issues.apache.org/jira/browse/ZOOKEEPER-2886 fixed

> ZooKeeper server should better handle SessionMovedException.
> 
>
> Key: ZOOKEEPER-2219
> URL: https://issues.apache.org/jira/browse/ZOOKEEPER-2219
> Project: ZooKeeper
>  Issue Type: Bug
>Affects Versions: 3.4.5
>Reporter: zhihai xu
>Priority: Major
>
> ZooKeeper server should better handle SessionMovedException.
> We hit the SessionMovedException. the following is the reason for the 
> SessionMovedException we find:
> 1. ZK client tried to connect to Leader L. Network was very slow, so before 
> leader processed the request, client disconnected.
> 2. Client then re-connected to Follower F reusing the same session ID. It was 
> successful.
> 3. The request in step 1 went into leader. Leader processed it and 
> invalidated the connection created in step 2. But client didn't know the 
> connection it used is invalidated.
> 4. Client got SessionMovedException when it used the connection invalidated 
> by leader for any ZooKeeper operation.
> The following are logs: c045dkh is the Leader, c470udy is the Follower and 
> the sessionID is 0x14be28f50f4419d.
> 1. ZK client try to initiate session to Leader at 015-03-16 10:59:40,735 and 
> timeout after 10/3 seconds.
> logs from ZK client 
> {code}
> 2015-03-16 10:59:40,078 INFO org.apache.zookeeper.ClientCnxn: Client session 
> timed out, have not heard from server in 6670ms for sessionid 
> 0x14be28f50f4419d, closing socket connection and attempting reconnect
> 015-03-16 10:59:40,735 INFO org.apache.zookeeper.ClientCnxn: Opening socket 
> connection to server c045dkh/?.?.?.67:2181. Will not attempt to authenticate 
> using SASL (unknown error)
> 2015-03-16 10:59:40,735 INFO org.apache.zookeeper.ClientCnxn: Socket 
> connection established to c045dkh/?.?.?.67:2181, initiating session
> 2015-03-16 10:59:44,071 INFO org.apache.zookeeper.ClientCnxn: Client session 
> timed out, have not heard from server in 3336ms for sessionid 
> 0x14be28f50f4419d, closing socket connection and attempting reconnect
> {code}
> 2. ZK client initiated session to Follower successfully at 2015-03-16 
> 10:59:44,688
> logs from ZK client
> {code}
> 2015-03-16 10:59:44,673 INFO org.apache.zookeeper.ClientCnxn: Opening socket 
> connection to server c470udy/?.?.?.65:2181. Will not attempt to authenticate 
> using SASL (unknown error)
> 2015-03-16 10:59:44,673 INFO org.apache.zookeeper.ClientCnxn: Socket 
> connection established to c470udy/?.?.?.65:2181, initiating session
> 2015-03-16 10:59:44,688 INFO org.apache.zookeeper.ClientCnxn: Session 
> establishment complete on server c470udy/?.?.?.65:2181, sessionid = 
> 0x14be28f50f4419d, negotiated timeout = 1
> {code}
> logs from ZK Follower server
> {code}
> 2015-03-16 10:59:44,673 INFO 
> org.apache.zookeeper.server.NIOServerCnxnFactory: Accepted socket connection 
> from /?.?.?.65:42777
> 2015-03-16 10:59:44,674 INFO org.apache.zookeeper.server.ZooKeeperServer: 
> Client attempting to renew session 0x14be28f50f4419d at /?.?.?.65:42777
> 2015-03-16 10:59:44,674 INFO org.apache.zookeeper.server.quorum.Learner: 
> Revalidating client: 0x14be28f50f4419d
> 2015-03-16 10:59:44,675 INFO org.apache.zookeeper.server.ZooKeeperServer: 
> Established session 0x14be28f50f4419d with negotiated timeout 1 for 
> client /?.?.?.65:42777
> {code}
> 3. At 2015-03-16 10:59:45,668, Leader processed the delayed request which is 
> sent by Client at 2015-03-16 10:59:40,735, right after session was 
> established, it close the socket connection/session because client was 
> already disconnected due to timeout.
> logs from ZK Leader server
> {code}
> 2015-03-16 10:59:45,668 INFO org.apache.zookeeper.server.ZooKeeperServer: 
> Client attempting to renew session 0x14be28f50f4419d at /?.?.?.65:50271
> 2015-03-16 10:59:45,668 INFO org.apache.zookeeper.server.ZooKeeperServer: 
> Established session 0x14be28f50f4419d with negotiated timeout 1 for 
> client /?.?.?.65:50271
> 2015-03-16 10:59:45,670 WARN org.apache.zookeeper.server.NIOServerCnxn: 
> Exception causing close of session 0x14be28f50f4419d due to 
> java.io.IOException: Broken pipe
> 2015-03-16 10:59:45,671 INFO org.apache.zookeeper.server.NIOServerCnxn: 
> Closed socket connection for client /?.?.?.65:50271 which had sessionid 
> 0x14be28f50f4419d
> {code}
> 4. Client got SessionMovedException at 2015-03-16 10:59:45,693
> logs from ZK Leader server
> {code}
> 2015-03-16 10:59:45,693 INFO 
> org.apache.zookeeper.server.PrepRequestProcessor: Got user-level 
> KeeperException when processing sessionid:0x14be28f50f4419d type:multi 
> cxid:0x86e3 zxid:0x1c002a4e53 

Failed: ZOOKEEPER- PreCommit Build #2532

2018-10-29 Thread Apache Jenkins Server
Build: https://builds.apache.org/job/PreCommit-ZOOKEEPER-github-pr-build/2532/

###
## LAST 60 LINES OF THE CONSOLE 
###
[...truncated 85.86 MB...]
 [exec] 
==
 [exec] 
 [exec] 
 [exec] 
 [exec] Error: No value specified for option "issue"
 [exec] Session logged out. Session was 
JSESSIONID=A70AD0BC7A7A3ADE0DFF51413B52869A.
 [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:1859:
 exec returned: 1

Total time: 20 minutes 10 seconds
Build step 'Execute shell' marked build as failure
Archiving artifacts
Setting JDK_1_8_LATEST__HOME=/home/jenkins/tools/java/latest1.8
Setting MAVEN_3_LATEST__HOME=/home/jenkins/tools/maven/latest3/
Recording test results
Setting JDK_1_8_LATEST__HOME=/home/jenkins/tools/java/latest1.8
Setting MAVEN_3_LATEST__HOME=/home/jenkins/tools/maven/latest3/
Setting JDK_1_8_LATEST__HOME=/home/jenkins/tools/java/latest1.8
Setting MAVEN_3_LATEST__HOME=/home/jenkins/tools/maven/latest3/
[description-setter] Description set: ZOOKEEPER-3173
Setting JDK_1_8_LATEST__HOME=/home/jenkins/tools/java/latest1.8
Setting MAVEN_3_LATEST__HOME=/home/jenkins/tools/maven/latest3/
Setting JDK_1_8_LATEST__HOME=/home/jenkins/tools/java/latest1.8
Setting MAVEN_3_LATEST__HOME=/home/jenkins/tools/maven/latest3/
Adding one-line test results to commit status...
Setting JDK_1_8_LATEST__HOME=/home/jenkins/tools/java/latest1.8
Setting MAVEN_3_LATEST__HOME=/home/jenkins/tools/maven/latest3/
Setting JDK_1_8_LATEST__HOME=/home/jenkins/tools/java/latest1.8
Setting MAVEN_3_LATEST__HOME=/home/jenkins/tools/maven/latest3/
Setting status of fb2308b8d2ee66505956d9cbbae187e1ed7b to FAILURE with url 
https://builds.apache.org/job/PreCommit-ZOOKEEPER-github-pr-build/2532/ and 
message: 'FAILURE
 2103 tests run, 2 skipped, 0 failed.'
Using context: Jenkins

Refer to this link for build results (access rights to CI server needed): 
https://builds.apache.org/job/PreCommit-ZOOKEEPER-github-pr-build/2532/

Setting JDK_1_8_LATEST__HOME=/home/jenkins/tools/java/latest1.8
Setting MAVEN_3_LATEST__HOME=/home/jenkins/tools/maven/latest3/
Setting JDK_1_8_LATEST__HOME=/home/jenkins/tools/java/latest1.8
Setting MAVEN_3_LATEST__HOME=/home/jenkins/tools/maven/latest3/
Email was triggered for: Failure - Any
Sending email for trigger: Failure - Any
Setting JDK_1_8_LATEST__HOME=/home/jenkins/tools/java/latest1.8
Setting MAVEN_3_LATEST__HOME=/home/jenkins/tools/maven/latest3/
Setting JDK_1_8_LATEST__HOME=/home/jenkins/tools/java/latest1.8
Setting MAVEN_3_LATEST__HOME=/home/jenkins/tools/maven/latest3/
Setting JDK_1_8_LATEST__HOME=/home/jenkins/tools/java/latest1.8
Setting MAVEN_3_LATEST__HOME=/home/jenkins/tools/maven/latest3/



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

[GitHub] zookeeper issue #678: ZOOKEEPER-3173: Quorum TLS - support PEM trust/key sto...

2018-10-29 Thread asfgit
Github user asfgit commented on the issue:

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

Refer to this link for build results (access rights to CI server needed): 
https://builds.apache.org/job/PreCommit-ZOOKEEPER-github-pr-build/2532/



---


[GitHub] zookeeper issue #678: ZOOKEEPER-3173: Quorum TLS - support PEM trust/key sto...

2018-10-29 Thread ivmaykov
Github user ivmaykov commented on the issue:

https://github.com/apache/zookeeper/pull/678
  
@anmolnar added KeyStoreLoader classes
@eolivelli updated NOTICE file and PemReader.java


---


[GitHub] zookeeper pull request #678: ZOOKEEPER-3173: Quorum TLS - support PEM trust/...

2018-10-29 Thread ivmaykov
Github user ivmaykov commented on a diff in the pull request:

https://github.com/apache/zookeeper/pull/678#discussion_r229102998
  
--- Diff: 
zookeeper-server/src/main/java/org/apache/zookeeper/common/X509Util.java ---
@@ -167,47 +222,50 @@ public SSLContext createSSLContext(ZKConfig config) 
throws SSLContextException {
 KeyManager[] keyManagers = null;
 TrustManager[] trustManagers = null;
 
-String keyStoreLocationProp = 
config.getProperty(sslKeystoreLocationProperty);
-String keyStorePasswordProp = 
config.getProperty(sslKeystorePasswdProperty);
+String keyStoreLocationProp = 
config.getProperty(sslKeystoreLocationProperty, "");
--- End diff --

Sorry, I misread this comment. You are talking about the location, not the 
store type. But it's the same thing - null location and empty location can be 
treated the same way, so by defaulting to empty string here we don't need to 
check for 2 different options below. The previous code actually didn't check 
for empty location at all.


---


ZooKeeper_branch34_jdk7 - Build # 2106 - Failure

2018-10-29 Thread Apache Jenkins Server
See https://builds.apache.org/job/ZooKeeper_branch34_jdk7/2106/

###
## LAST 60 LINES OF THE CONSOLE 
###
[...truncated 43.10 KB...]
[junit] Running org.apache.zookeeper.test.RestoreCommittedLogTest
[junit] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 
26.604 sec
[junit] Running org.apache.zookeeper.test.SaslAuthDesignatedClientTest
[junit] Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 
1.691 sec
[junit] Running org.apache.zookeeper.test.SaslAuthDesignatedServerTest
[junit] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 
0.605 sec
[junit] Running org.apache.zookeeper.test.SaslAuthFailDesignatedClientTest
[junit] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 
1.058 sec
[junit] Running org.apache.zookeeper.test.SaslAuthFailNotifyTest
[junit] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 
0.545 sec
[junit] Running org.apache.zookeeper.test.SaslAuthFailTest
[junit] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 
0.607 sec
[junit] Running org.apache.zookeeper.test.SaslAuthMissingClientConfigTest
[junit] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 
0.544 sec
[junit] Running org.apache.zookeeper.test.SaslClientTest
[junit] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 
0.074 sec
[junit] Running org.apache.zookeeper.test.SessionInvalidationTest
[junit] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 
0.706 sec
[junit] Running org.apache.zookeeper.test.SessionTest
[junit] Tests run: 5, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 
11.067 sec
[junit] Running org.apache.zookeeper.test.SessionTimeoutTest
[junit] Tests run: 4, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 
0.832 sec
[junit] Running org.apache.zookeeper.test.StandaloneTest
[junit] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 
0.857 sec
[junit] Running org.apache.zookeeper.test.StatTest
[junit] Tests run: 4, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 
0.859 sec
[junit] Running org.apache.zookeeper.test.StaticHostProviderTest
[junit] Tests run: 13, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 
2.248 sec
[junit] Running org.apache.zookeeper.test.SyncCallTest
[junit] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 
0.553 sec
[junit] Running org.apache.zookeeper.test.TruncateTest
[junit] Tests run: 3, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 
10.618 sec
[junit] Running org.apache.zookeeper.test.UpgradeTest
[junit] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 
1.361 sec
[junit] Running org.apache.zookeeper.test.WatchedEventTest
[junit] Tests run: 4, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 
0.106 sec
[junit] Running org.apache.zookeeper.test.WatcherFuncTest
[junit] Tests run: 6, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 
12.882 sec
[junit] Running org.apache.zookeeper.test.WatcherTest
[junit] Tests run: 7, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 
28.223 sec
[junit] Running org.apache.zookeeper.test.ZkDatabaseCorruptionTest
[junit] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 
29.479 sec
[junit] Running org.apache.zookeeper.test.ZooKeeperQuotaTest
[junit] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 
0.718 sec
[junit] Running org.apache.jute.BinaryInputArchiveTest
[junit] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 
0.079 sec

fail.build.on.test.failure:

BUILD FAILED
/home/jenkins/jenkins-slave/workspace/ZooKeeper_branch34_jdk7/build.xml:1426: 
The following error occurred while executing this line:
/home/jenkins/jenkins-slave/workspace/ZooKeeper_branch34_jdk7/build.xml:1429: 
Tests failed!

Total time: 49 minutes 27 seconds
Build step 'Invoke Ant' marked build as failure
Archiving artifacts
Recording test results
Email was triggered for: Failure - Any
Sending email for trigger: Failure - Any



###
## FAILED TESTS (if any) 
##
10 tests failed.
FAILED:  org.apache.zookeeper.server.PurgeTxnTest.testPurge

Error Message:
KeeperErrorCode = ConnectionLoss for /invalidsnap-0

Stack Trace:
org.apache.zookeeper.KeeperException$ConnectionLossException: KeeperErrorCode = 
ConnectionLoss for /invalidsnap-0
at org.apache.zookeeper.KeeperException.create(KeeperException.java:102)
at org.apache.zookeeper.KeeperException.create(KeeperException.java:54)
at org.apache.zookeeper.ZooKeeper.create(ZooKeeper.java:792)
at 

[GitHub] zookeeper pull request #678: ZOOKEEPER-3173: Quorum TLS - support PEM trust/...

2018-10-29 Thread eolivelli
Github user eolivelli commented on a diff in the pull request:

https://github.com/apache/zookeeper/pull/678#discussion_r229021572
  
--- Diff: 
zookeeper-server/src/main/java/org/apache/zookeeper/util/PemReader.java ---
@@ -0,0 +1,224 @@
+/*
+ * Licensed 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.util;
+
+import javax.crypto.Cipher;
+import javax.crypto.EncryptedPrivateKeyInfo;
+import javax.crypto.SecretKey;
+import javax.crypto.SecretKeyFactory;
+import javax.crypto.spec.PBEKeySpec;
+import javax.security.auth.x500.X500Principal;
+
+import java.io.ByteArrayInputStream;
+import java.io.File;
+import java.io.IOException;
+import java.nio.charset.StandardCharsets;
+import java.nio.file.Files;
+import java.security.GeneralSecurityException;
+import java.security.KeyFactory;
+import java.security.KeyStore;
+import java.security.KeyStoreException;
+import java.security.PrivateKey;
+import java.security.PublicKey;
+import java.security.cert.Certificate;
+import java.security.cert.CertificateException;
+import java.security.cert.CertificateFactory;
+import java.security.cert.X509Certificate;
+import java.security.spec.InvalidKeySpecException;
+import java.security.spec.PKCS8EncodedKeySpec;
+import java.security.spec.X509EncodedKeySpec;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Optional;
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
+
+import static java.util.Base64.getMimeDecoder;
+import static java.util.regex.Pattern.CASE_INSENSITIVE;
+import static javax.crypto.Cipher.DECRYPT_MODE;
+
+/**
+ * Note: this class is copied from io.airlift.security.pem.PemReader (see
+ * 
https://github.com/airlift/airlift/blob/master/security/src/main/java/io/airlift/security/pem/PemReader.java)
 with
--- End diff --

For the NOTICE you can take a look to this example from Bookkeeper project

https://github.com/apache/bookkeeper/blob/master/bookkeeper-dist/src/main/resources/NOTICE-server.bin.txt


---


[GitHub] zookeeper pull request #678: ZOOKEEPER-3173: Quorum TLS - support PEM trust/...

2018-10-29 Thread ivmaykov
Github user ivmaykov commented on a diff in the pull request:

https://github.com/apache/zookeeper/pull/678#discussion_r229013179
  
--- Diff: 
zookeeper-server/src/main/java/org/apache/zookeeper/util/PemReader.java ---
@@ -0,0 +1,224 @@
+/*
+ * Licensed 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.util;
+
+import javax.crypto.Cipher;
+import javax.crypto.EncryptedPrivateKeyInfo;
+import javax.crypto.SecretKey;
+import javax.crypto.SecretKeyFactory;
+import javax.crypto.spec.PBEKeySpec;
+import javax.security.auth.x500.X500Principal;
+
+import java.io.ByteArrayInputStream;
+import java.io.File;
+import java.io.IOException;
+import java.nio.charset.StandardCharsets;
+import java.nio.file.Files;
+import java.security.GeneralSecurityException;
+import java.security.KeyFactory;
+import java.security.KeyStore;
+import java.security.KeyStoreException;
+import java.security.PrivateKey;
+import java.security.PublicKey;
+import java.security.cert.Certificate;
+import java.security.cert.CertificateException;
+import java.security.cert.CertificateFactory;
+import java.security.cert.X509Certificate;
+import java.security.spec.InvalidKeySpecException;
+import java.security.spec.PKCS8EncodedKeySpec;
+import java.security.spec.X509EncodedKeySpec;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Optional;
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
+
+import static java.util.Base64.getMimeDecoder;
+import static java.util.regex.Pattern.CASE_INSENSITIVE;
+import static javax.crypto.Cipher.DECRYPT_MODE;
+
+/**
+ * Note: this class is copied from io.airlift.security.pem.PemReader (see
+ * 
https://github.com/airlift/airlift/blob/master/security/src/main/java/io/airlift/security/pem/PemReader.java)
 with
--- End diff --

BouncyCastle is currently a test-only dependency (used for creating test 
certificates), so we can't use it in production code. It's a large library and 
I'd rather not take it on as a full dependency if the only thing we need from 
it is the PEM reader. I think it's fine to copy the code (license allows it and 
the author of airlift recommended it to me), will wait for guidance on NOTICE 
file update from @eolivelli.


---


[GitHub] zookeeper pull request #678: ZOOKEEPER-3173: Quorum TLS - support PEM trust/...

2018-10-29 Thread ivmaykov
Github user ivmaykov commented on a diff in the pull request:

https://github.com/apache/zookeeper/pull/678#discussion_r229012448
  
--- Diff: 
zookeeper-server/src/main/java/org/apache/zookeeper/common/X509Util.java ---
@@ -360,4 +476,26 @@ private void configureSSLServerSocket(SSLServerSocket 
sslServerSocket) {
 LOG.debug("Using Java8-optimized cipher suites for Java version 
{}", javaVersion);
 return DEFAULT_CIPHERS_JAVA8;
 }
+
+/**
+ * Detects the type of KeyStore / TrustStore file from the file 
extension. If the file name ends with
+ * ".jks", returns StoreFileType.JKS. If the file name 
ends with ".pem", returns
+ * StoreFileType.PEM. Otherwise, throws an IOException.
+ * @param filename the filename of the key store or trust store file.
+ * @return a StoreFileType.
+ * @throws IOException if the filename does not end with ".jks" or 
".pem".
+ */
+public static StoreFileType detectStoreFileTypeFromFileExtension(File 
filename) throws IOException {
--- End diff --

How about I make it package-private and add a unit test?


---


[GitHub] zookeeper pull request #678: ZOOKEEPER-3173: Quorum TLS - support PEM trust/...

2018-10-29 Thread ivmaykov
Github user ivmaykov commented on a diff in the pull request:

https://github.com/apache/zookeeper/pull/678#discussion_r229012101
  
--- Diff: 
zookeeper-server/src/main/java/org/apache/zookeeper/common/X509Util.java ---
@@ -167,47 +222,50 @@ public SSLContext createSSLContext(ZKConfig config) 
throws SSLContextException {
 KeyManager[] keyManagers = null;
 TrustManager[] trustManagers = null;
 
-String keyStoreLocationProp = 
config.getProperty(sslKeystoreLocationProperty);
-String keyStorePasswordProp = 
config.getProperty(sslKeystorePasswdProperty);
+String keyStoreLocationProp = 
config.getProperty(sslKeystoreLocationProperty, "");
+String keyStorePasswordProp = 
config.getProperty(sslKeystorePasswdProperty, "");
+String keyStoreTypeProp = 
config.getProperty(sslKeystoreTypeProperty);
 
 // There are legal states in some use cases for null KeyManager or 
TrustManager.
-// But if a user wanna specify one, location and password are 
required.
+// But if a user wanna specify one, location is required. Password 
defaults to empty string if it is not
+// specified by the user.
 
-if (keyStoreLocationProp == null && keyStorePasswordProp == null) {
+if (keyStoreLocationProp.isEmpty()) {
 LOG.warn(getSslKeystoreLocationProperty() + " not specified");
 } else {
-if (keyStoreLocationProp == null) {
-throw new 
SSLContextException(getSslKeystoreLocationProperty() + " not specified");
-}
-if (keyStorePasswordProp == null) {
-throw new 
SSLContextException(getSslKeystorePasswdProperty() + " not specified");
-}
 try {
+StoreFileType keyStoreType = 
StoreFileType.fromPropertyValue(keyStoreTypeProp);
 keyManagers = new KeyManager[]{
-createKeyManager(keyStoreLocationProp, 
keyStorePasswordProp)};
+createKeyManager(keyStoreLocationProp, 
keyStorePasswordProp, keyStoreType)};
 } catch (KeyManagerException keyManagerException) {
 throw new SSLContextException("Failed to create 
KeyManager", keyManagerException);
+} catch (IllegalArgumentException e) {
+throw new SSLContextException("Bad value for " + 
sslKeystoreTypeProperty + ": " + keyStoreTypeProp, e);
 }
 }
 
-String trustStoreLocationProp = 
config.getProperty(sslTruststoreLocationProperty);
-String trustStorePasswordProp = 
config.getProperty(sslTruststorePasswdProperty);
+String trustStoreLocationProp = 
config.getProperty(sslTruststoreLocationProperty, "");
--- End diff --

See above


---


[GitHub] zookeeper pull request #678: ZOOKEEPER-3173: Quorum TLS - support PEM trust/...

2018-10-29 Thread ivmaykov
Github user ivmaykov commented on a diff in the pull request:

https://github.com/apache/zookeeper/pull/678#discussion_r229011934
  
--- Diff: 
zookeeper-server/src/main/java/org/apache/zookeeper/common/X509Util.java ---
@@ -79,12 +82,56 @@
 "TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256"
 };
 
+/**
+ * This enum represents the file type of a KeyStore or TrustStore. 
Currently, JKS (java keystore) and PEM types
+ * are supported.
+ */
+public enum StoreFileType {
+JKS(".jks"), PEM(".pem");
+
+private final String defaultFileExtension;
+
+StoreFileType(String defaultFileExtension) {
+this.defaultFileExtension = defaultFileExtension;
+}
+
+/**
+ * The property string that specifies that a key store or trust 
store should use this store file type.
+ */
+public String getPropertyValue() {
+return this.name();
+}
+
+/**
+ * The file extension that is associated with this file type.
+ */
+public String getDefaultFileExtension() {
+return defaultFileExtension;
+}
+
+/**
+ * Converts a property value to a StoreFileType enum. If the 
property value is not set or is empty, returns
+ * null.
+ * @param prop the property value.
+ * @return the StoreFileType.
+ * @throws IllegalArgumentException if the property value is not 
"JKS", "PEM", or empty/null.
+ */
+public static StoreFileType fromPropertyValue(String prop) {
+if (prop == null || prop.length() == 0) {
+return null;
+}
+return StoreFileType.valueOf(prop.toUpperCase());
+}
+}
+
 private String sslProtocolProperty = getConfigPrefix() + "protocol";
 private String cipherSuitesProperty = getConfigPrefix() + 
"ciphersuites";
 private String sslKeystoreLocationProperty = getConfigPrefix() + 
"keyStore.location";
 private String sslKeystorePasswdProperty = getConfigPrefix() + 
"keyStore.password";
+private String sslKeystoreTypeProperty = getConfigPrefix() + 
"keyStore.type";
--- End diff --

I think it makes sense, if someone puts their JKS key in a file that they 
name "foobar.key" or something non-standard, we can still support it if they 
explicitly set the store type option. Most people will probably use the default 
extensions and leave this option unset.


---


[GitHub] zookeeper pull request #678: ZOOKEEPER-3173: Quorum TLS - support PEM trust/...

2018-10-29 Thread ivmaykov
Github user ivmaykov commented on a diff in the pull request:

https://github.com/apache/zookeeper/pull/678#discussion_r229011448
  
--- Diff: 
zookeeper-server/src/main/java/org/apache/zookeeper/common/X509Util.java ---
@@ -167,47 +222,50 @@ public SSLContext createSSLContext(ZKConfig config) 
throws SSLContextException {
 KeyManager[] keyManagers = null;
 TrustManager[] trustManagers = null;
 
-String keyStoreLocationProp = 
config.getProperty(sslKeystoreLocationProperty);
-String keyStorePasswordProp = 
config.getProperty(sslKeystorePasswdProperty);
+String keyStoreLocationProp = 
config.getProperty(sslKeystoreLocationProperty, "");
--- End diff --

Since empty string is not a valid keystore type, I treat null value and 
empty string values equivalently. Doing it this way simplifies the check below 
(only need to check for empty string instead of checking both null and empty).


---


[GitHub] zookeeper pull request #678: ZOOKEEPER-3173: Quorum TLS - support PEM trust/...

2018-10-29 Thread anmolnar
Github user anmolnar commented on a diff in the pull request:

https://github.com/apache/zookeeper/pull/678#discussion_r228957739
  
--- Diff: 
zookeeper-server/src/main/java/org/apache/zookeeper/common/X509Util.java ---
@@ -167,47 +222,50 @@ public SSLContext createSSLContext(ZKConfig config) 
throws SSLContextException {
 KeyManager[] keyManagers = null;
 TrustManager[] trustManagers = null;
 
-String keyStoreLocationProp = 
config.getProperty(sslKeystoreLocationProperty);
-String keyStorePasswordProp = 
config.getProperty(sslKeystorePasswdProperty);
+String keyStoreLocationProp = 
config.getProperty(sslKeystoreLocationProperty, "");
--- End diff --

Why do you need an empty string default value instead of checking for null?


---


[GitHub] zookeeper pull request #678: ZOOKEEPER-3173: Quorum TLS - support PEM trust/...

2018-10-29 Thread anmolnar
Github user anmolnar commented on a diff in the pull request:

https://github.com/apache/zookeeper/pull/678#discussion_r228963670
  
--- Diff: 
zookeeper-server/src/main/java/org/apache/zookeeper/util/PemReader.java ---
@@ -0,0 +1,224 @@
+/*
+ * Licensed 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.util;
+
+import javax.crypto.Cipher;
+import javax.crypto.EncryptedPrivateKeyInfo;
+import javax.crypto.SecretKey;
+import javax.crypto.SecretKeyFactory;
+import javax.crypto.spec.PBEKeySpec;
+import javax.security.auth.x500.X500Principal;
+
+import java.io.ByteArrayInputStream;
+import java.io.File;
+import java.io.IOException;
+import java.nio.charset.StandardCharsets;
+import java.nio.file.Files;
+import java.security.GeneralSecurityException;
+import java.security.KeyFactory;
+import java.security.KeyStore;
+import java.security.KeyStoreException;
+import java.security.PrivateKey;
+import java.security.PublicKey;
+import java.security.cert.Certificate;
+import java.security.cert.CertificateException;
+import java.security.cert.CertificateFactory;
+import java.security.cert.X509Certificate;
+import java.security.spec.InvalidKeySpecException;
+import java.security.spec.PKCS8EncodedKeySpec;
+import java.security.spec.X509EncodedKeySpec;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Optional;
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
+
+import static java.util.Base64.getMimeDecoder;
+import static java.util.regex.Pattern.CASE_INSENSITIVE;
+import static javax.crypto.Cipher.DECRYPT_MODE;
+
+/**
+ * Note: this class is copied from io.airlift.security.pem.PemReader (see
+ * 
https://github.com/airlift/airlift/blob/master/security/src/main/java/io/airlift/security/pem/PemReader.java)
 with
--- End diff --

You could be right, I'm not sure what's the implication of this. @hanm must 
be able to advise on this.
BouncyCastle library also having some PEM reader logic, but not sure how 
useful it is here.



---


[GitHub] zookeeper pull request #678: ZOOKEEPER-3173: Quorum TLS - support PEM trust/...

2018-10-29 Thread anmolnar
Github user anmolnar commented on a diff in the pull request:

https://github.com/apache/zookeeper/pull/678#discussion_r228958388
  
--- Diff: 
zookeeper-server/src/main/java/org/apache/zookeeper/common/X509Util.java ---
@@ -79,12 +82,56 @@
 "TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256"
 };
 
+/**
+ * This enum represents the file type of a KeyStore or TrustStore. 
Currently, JKS (java keystore) and PEM types
+ * are supported.
+ */
+public enum StoreFileType {
+JKS(".jks"), PEM(".pem");
+
+private final String defaultFileExtension;
+
+StoreFileType(String defaultFileExtension) {
+this.defaultFileExtension = defaultFileExtension;
+}
+
+/**
+ * The property string that specifies that a key store or trust 
store should use this store file type.
+ */
+public String getPropertyValue() {
+return this.name();
+}
+
+/**
+ * The file extension that is associated with this file type.
+ */
+public String getDefaultFileExtension() {
+return defaultFileExtension;
+}
+
+/**
+ * Converts a property value to a StoreFileType enum. If the 
property value is not set or is empty, returns
+ * null.
+ * @param prop the property value.
+ * @return the StoreFileType.
+ * @throws IllegalArgumentException if the property value is not 
"JKS", "PEM", or empty/null.
+ */
+public static StoreFileType fromPropertyValue(String prop) {
+if (prop == null || prop.length() == 0) {
+return null;
+}
+return StoreFileType.valueOf(prop.toUpperCase());
+}
+}
+
 private String sslProtocolProperty = getConfigPrefix() + "protocol";
 private String cipherSuitesProperty = getConfigPrefix() + 
"ciphersuites";
 private String sslKeystoreLocationProperty = getConfigPrefix() + 
"keyStore.location";
 private String sslKeystorePasswdProperty = getConfigPrefix() + 
"keyStore.password";
+private String sslKeystoreTypeProperty = getConfigPrefix() + 
"keyStore.type";
--- End diff --

Do we need the ability to override the keystore type that we otherwise 
detect from the file extension?


---


[GitHub] zookeeper pull request #678: ZOOKEEPER-3173: Quorum TLS - support PEM trust/...

2018-10-29 Thread anmolnar
Github user anmolnar commented on a diff in the pull request:

https://github.com/apache/zookeeper/pull/678#discussion_r228958680
  
--- Diff: 
zookeeper-server/src/main/java/org/apache/zookeeper/common/X509Util.java ---
@@ -167,47 +222,50 @@ public SSLContext createSSLContext(ZKConfig config) 
throws SSLContextException {
 KeyManager[] keyManagers = null;
 TrustManager[] trustManagers = null;
 
-String keyStoreLocationProp = 
config.getProperty(sslKeystoreLocationProperty);
-String keyStorePasswordProp = 
config.getProperty(sslKeystorePasswdProperty);
+String keyStoreLocationProp = 
config.getProperty(sslKeystoreLocationProperty, "");
+String keyStorePasswordProp = 
config.getProperty(sslKeystorePasswdProperty, "");
+String keyStoreTypeProp = 
config.getProperty(sslKeystoreTypeProperty);
 
 // There are legal states in some use cases for null KeyManager or 
TrustManager.
-// But if a user wanna specify one, location and password are 
required.
+// But if a user wanna specify one, location is required. Password 
defaults to empty string if it is not
+// specified by the user.
 
-if (keyStoreLocationProp == null && keyStorePasswordProp == null) {
+if (keyStoreLocationProp.isEmpty()) {
 LOG.warn(getSslKeystoreLocationProperty() + " not specified");
 } else {
-if (keyStoreLocationProp == null) {
-throw new 
SSLContextException(getSslKeystoreLocationProperty() + " not specified");
-}
-if (keyStorePasswordProp == null) {
-throw new 
SSLContextException(getSslKeystorePasswdProperty() + " not specified");
-}
 try {
+StoreFileType keyStoreType = 
StoreFileType.fromPropertyValue(keyStoreTypeProp);
 keyManagers = new KeyManager[]{
-createKeyManager(keyStoreLocationProp, 
keyStorePasswordProp)};
+createKeyManager(keyStoreLocationProp, 
keyStorePasswordProp, keyStoreType)};
 } catch (KeyManagerException keyManagerException) {
 throw new SSLContextException("Failed to create 
KeyManager", keyManagerException);
+} catch (IllegalArgumentException e) {
+throw new SSLContextException("Bad value for " + 
sslKeystoreTypeProperty + ": " + keyStoreTypeProp, e);
 }
 }
 
-String trustStoreLocationProp = 
config.getProperty(sslTruststoreLocationProperty);
-String trustStorePasswordProp = 
config.getProperty(sslTruststorePasswdProperty);
+String trustStoreLocationProp = 
config.getProperty(sslTruststoreLocationProperty, "");
--- End diff --

Same here. Previously it was checked against null value, why have you 
changed that?


---


[GitHub] zookeeper pull request #678: ZOOKEEPER-3173: Quorum TLS - support PEM trust/...

2018-10-29 Thread anmolnar
Github user anmolnar commented on a diff in the pull request:

https://github.com/apache/zookeeper/pull/678#discussion_r228961395
  
--- Diff: 
zookeeper-server/src/main/java/org/apache/zookeeper/common/X509Util.java ---
@@ -360,4 +476,26 @@ private void configureSSLServerSocket(SSLServerSocket 
sslServerSocket) {
 LOG.debug("Using Java8-optimized cipher suites for Java version 
{}", javaVersion);
 return DEFAULT_CIPHERS_JAVA8;
 }
+
+/**
+ * Detects the type of KeyStore / TrustStore file from the file 
extension. If the file name ends with
+ * ".jks", returns StoreFileType.JKS. If the file name 
ends with ".pem", returns
+ * StoreFileType.PEM. Otherwise, throws an IOException.
+ * @param filename the filename of the key store or trust store file.
+ * @return a StoreFileType.
+ * @throws IOException if the filename does not end with ".jks" or 
".pem".
+ */
+public static StoreFileType detectStoreFileTypeFromFileExtension(File 
filename) throws IOException {
--- End diff --

nit: this can be private
nit: Apache Commons IO library has `FileNameUtils.getExtensions(String 
filename)` doing pretty much the same

This file type detection logic is good. Additionally, given that you're 
refactoring this to Factory pattern anyway, you could also do probing with the 
concrete implementations if file type cannot be detected from extension.


---


ZooKeeper_branch35_jdk8 - Build # 1173 - Still Failing

2018-10-29 Thread Apache Jenkins Server
See https://builds.apache.org/job/ZooKeeper_branch35_jdk8/1173/

###
## LAST 60 LINES OF THE CONSOLE 
###
[...truncated 108.48 KB...]
[junit] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 
4.188 sec, Thread: 1, Class: 
org.apache.zookeeper.test.SaslAuthMissingClientConfigTest
[junit] Running org.apache.zookeeper.test.SaslSuperUserTest in thread 4
[junit] Running org.apache.zookeeper.test.SaslClientTest in thread 3
[junit] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 
0.556 sec, Thread: 3, Class: org.apache.zookeeper.test.SaslClientTest
[junit] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 
5.008 sec, Thread: 4, Class: org.apache.zookeeper.test.SaslSuperUserTest
[junit] Running org.apache.zookeeper.test.ServerCnxnTest in thread 1
[junit] Running org.apache.zookeeper.test.SessionInvalidationTest in thread 
3
[junit] Running org.apache.zookeeper.test.SessionTest in thread 4
[junit] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 
5.965 sec, Thread: 1, Class: org.apache.zookeeper.test.ServerCnxnTest
[junit] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 
4.267 sec, Thread: 3, Class: org.apache.zookeeper.test.SessionInvalidationTest
[junit] Running org.apache.zookeeper.test.SessionTimeoutTest in thread 1
[junit] Running org.apache.zookeeper.test.SessionTrackerCheckTest in thread 
3
[junit] Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 
0.863 sec, Thread: 3, Class: org.apache.zookeeper.test.SessionTrackerCheckTest
[junit] Tests run: 4, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 
6.21 sec, Thread: 1, Class: org.apache.zookeeper.test.SessionTimeoutTest
[junit] Running org.apache.zookeeper.test.SessionUpgradeTest in thread 3
[junit] Running org.apache.zookeeper.test.StandaloneTest in thread 1
[junit] Tests run: 5, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 
18.094 sec, Thread: 4, Class: org.apache.zookeeper.test.SessionTest
[junit] Tests run: 4, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 
6.179 sec, Thread: 1, Class: org.apache.zookeeper.test.StandaloneTest
[junit] Running org.apache.zookeeper.test.StatTest in thread 4
[junit] Running org.apache.zookeeper.test.StaticHostProviderTest in thread 1
[junit] Tests run: 4, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 7 
sec, Thread: 4, Class: org.apache.zookeeper.test.StatTest
[junit] Running org.apache.zookeeper.test.StringUtilTest in thread 4
[junit] Tests run: 26, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 
9.288 sec, Thread: 1, Class: org.apache.zookeeper.test.StaticHostProviderTest
[junit] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 
0.628 sec, Thread: 4, Class: org.apache.zookeeper.test.StringUtilTest
[junit] Running org.apache.zookeeper.test.SyncCallTest in thread 1
[junit] Running org.apache.zookeeper.test.TruncateTest in thread 4
[junit] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 
5.966 sec, Thread: 1, Class: org.apache.zookeeper.test.SyncCallTest
[junit] Running org.apache.zookeeper.test.WatchEventWhenAutoResetTest in 
thread 1
[junit] Tests run: 3, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 
13.969 sec, Thread: 4, Class: org.apache.zookeeper.test.TruncateTest
[junit] Tests run: 4, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 
45.061 sec, Thread: 3, Class: org.apache.zookeeper.test.SessionUpgradeTest
[junit] Running org.apache.zookeeper.test.WatchedEventTest in thread 4
[junit] Tests run: 4, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 
0.474 sec, Thread: 4, Class: org.apache.zookeeper.test.WatchedEventTest
[junit] Running org.apache.zookeeper.test.WatcherFuncTest in thread 3
[junit] Running org.apache.zookeeper.test.WatcherTest in thread 4
[junit] Tests run: 6, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 
8.963 sec, Thread: 3, Class: org.apache.zookeeper.test.WatcherFuncTest
[junit] Running org.apache.zookeeper.test.X509AuthTest in thread 3
[junit] Tests run: 3, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 
0.409 sec, Thread: 3, Class: org.apache.zookeeper.test.X509AuthTest
[junit] Running org.apache.zookeeper.test.ZkDatabaseCorruptionTest in 
thread 3
[junit] Tests run: 4, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 
35.229 sec, Thread: 1, Class: 
org.apache.zookeeper.test.WatchEventWhenAutoResetTest
[junit] Running org.apache.zookeeper.test.ZooKeeperQuotaTest in thread 1
[junit] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 
6.809 sec, Thread: 1, Class: org.apache.zookeeper.test.ZooKeeperQuotaTest
[junit] Running org.apache.jute.BinaryInputArchiveTest in thread 1
[junit] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 

[jira] [Created] (ZOOKEEPER-3184) Use the same method to generate website as documentation

2018-10-29 Thread Tamas Penzes (JIRA)
Tamas Penzes created ZOOKEEPER-3184:
---

 Summary: Use the same method to generate website as documentation
 Key: ZOOKEEPER-3184
 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-3184
 Project: ZooKeeper
  Issue Type: Sub-task
Reporter: Tamas Penzes
Assignee: Tamas Penzes


We should use the same method to generate website as we do the documentation.

This way we would get rid of Jekyll and would not need to install anything on 
the build machines.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[GitHub] zookeeper pull request #673: [ZOOKEEPER-3177] Refactor request throttle logi...

2018-10-29 Thread tumativ
Github user tumativ commented on a diff in the pull request:

https://github.com/apache/zookeeper/pull/673#discussion_r228896991
  
--- Diff: 
zookeeper-server/src/main/java/org/apache/zookeeper/server/ServerCnxn.java ---
@@ -68,8 +68,39 @@
 
 private volatile boolean stale = false;
 
+AtomicLong outstandingCount = new AtomicLong();
+
+/** The ZooKeeperServer for this connection. May be null if the server
+ * is not currently serving requests (for example if the server is not
+ * an active quorum participant.
+ */
+final ZooKeeperServer zkServer;
+
+public ServerCnxn(final ZooKeeperServer zkServer) {
+this.zkServer = zkServer;
+}
+
 abstract int getSessionTimeout();
 
+public void incrOutstandingAndCheckThrottle(RequestHeader h) {
+if (h.getXid() <= 0) {
+return;
+}
+if (zkServer.shouldThrottle(outstandingCount.incrementAndGet())) {
+disableRecv(false);
+}
+}
+
+// will be called from zkServer.processPacket
+public void decrOutstandingAndCheckThrottle(ReplyHeader h) {
--- End diff --

I see adding multiple responsibilities into one unit like incrementing or 
decrementing outstanding requests, checking the throttle and disabling/enabling 
receive. They should always go together and sit together. The criteria of 
disabling Recieve/ enabling can be changed at any time, not only based on the 
just outstanding requests and throttle. It can also depend on other attributes 
of the system. Why do not we inject the strategy into the server? One of the 
strategies can be based on outstanding request and throttle. What do you think 
exposing function like "canProcessRequest" which can internally check 
strategies and respond?


---


ZooKeeper_branch34_openjdk8 - Build # 103 - Still Failing

2018-10-29 Thread Apache Jenkins Server
See https://builds.apache.org/job/ZooKeeper_branch34_openjdk8/103/

###
## LAST 60 LINES OF THE CONSOLE 
###
[...truncated 43.29 KB...]
[junit] Running org.apache.zookeeper.test.SaslAuthFailDesignatedClientTest
[junit] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 
1.342 sec
[junit] Running org.apache.zookeeper.test.SaslAuthFailNotifyTest
[junit] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 
0.548 sec
[junit] Running org.apache.zookeeper.test.SaslAuthFailTest
[junit] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 
0.636 sec
[junit] Running org.apache.zookeeper.test.SaslAuthMissingClientConfigTest
[junit] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 
0.548 sec
[junit] Running org.apache.zookeeper.test.SaslClientTest
[junit] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 
0.077 sec
[junit] Running org.apache.zookeeper.test.SessionInvalidationTest
[junit] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 
0.686 sec
[junit] Running org.apache.zookeeper.test.SessionTest
[junit] Tests run: 5, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 
11.203 sec
[junit] Running org.apache.zookeeper.test.SessionTimeoutTest
[junit] Tests run: 4, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 
0.867 sec
[junit] Running org.apache.zookeeper.test.StandaloneTest
[junit] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 
0.93 sec
[junit] Running org.apache.zookeeper.test.StatTest
[junit] Tests run: 4, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 
0.889 sec
[junit] Running org.apache.zookeeper.test.StaticHostProviderTest
[junit] Tests run: 13, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 
1.794 sec
[junit] Running org.apache.zookeeper.test.SyncCallTest
[junit] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 
0.68 sec
[junit] Running org.apache.zookeeper.test.TruncateTest
[junit] Tests run: 3, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 
11.497 sec
[junit] Running org.apache.zookeeper.test.UpgradeTest
[junit] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 
0.89 sec
[junit] Running org.apache.zookeeper.test.WatchedEventTest
[junit] Tests run: 4, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 
0.086 sec
[junit] Running org.apache.zookeeper.test.WatcherFuncTest
[junit] Tests run: 6, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 
1.357 sec
[junit] Running org.apache.zookeeper.test.WatcherTest
[junit] Tests run: 7, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 
31.251 sec
[junit] Running org.apache.zookeeper.test.ZkDatabaseCorruptionTest
[junit] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 
12.09 sec
[junit] Running org.apache.zookeeper.test.ZooKeeperQuotaTest
[junit] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 
0.696 sec
[junit] Running org.apache.jute.BinaryInputArchiveTest
[junit] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 
0.08 sec

fail.build.on.test.failure:

BUILD FAILED
/home/jenkins/jenkins-slave/workspace/ZooKeeper_branch34_openjdk8/build.xml:1426:
 The following error occurred while executing this line:
/home/jenkins/jenkins-slave/workspace/ZooKeeper_branch34_openjdk8/build.xml:1429:
 Tests failed!

Total time: 39 minutes 57 seconds
Build step 'Invoke Ant' marked build as failure
Archiving artifacts
Setting OPENJDK_8_ON_UBUNTU_ONLY__HOME=/usr/lib/jvm/java-8-openjdk-amd64/
Recording test results
Setting OPENJDK_8_ON_UBUNTU_ONLY__HOME=/usr/lib/jvm/java-8-openjdk-amd64/
Setting OPENJDK_8_ON_UBUNTU_ONLY__HOME=/usr/lib/jvm/java-8-openjdk-amd64/
Setting OPENJDK_8_ON_UBUNTU_ONLY__HOME=/usr/lib/jvm/java-8-openjdk-amd64/
Email was triggered for: Failure - Any
Sending email for trigger: Failure - Any
Setting OPENJDK_8_ON_UBUNTU_ONLY__HOME=/usr/lib/jvm/java-8-openjdk-amd64/
Setting OPENJDK_8_ON_UBUNTU_ONLY__HOME=/usr/lib/jvm/java-8-openjdk-amd64/



###
## FAILED TESTS (if any) 
##
1 tests failed.
FAILED:  
org.apache.zookeeper.server.quorum.QuorumPeerMainTest.testNewFollowerRestartAfterNewEpoch

Error Message:
Waiting too long

Stack Trace:
java.lang.RuntimeException: Waiting too long
at 
org.apache.zookeeper.server.quorum.QuorumPeerMainTest.waitForAll(QuorumPeerMainTest.java:449)
at 
org.apache.zookeeper.server.quorum.QuorumPeerMainTest.waitForAll(QuorumPeerMainTest.java:439)
at 
org.apache.zookeeper.server.quorum.QuorumPeerMainTest.LaunchServers(QuorumPeerMainTest.java:547)
at