commit | 01e198aec9ceae52f160ddcf2e45cd234823e505 | [log] [tgz] |
---|---|---|
author | Mate Szalay-Beko <szalay.beko.mate@gmail.com> | Tue Dec 03 10:01:22 2019 +0100 |
committer | Norbert Kalmar <nkalmar@apache.org> | Tue Dec 03 10:01:22 2019 +0100 |
tree | 80a4e4bce4d1144eb194ae9ef7656468f643bad4 | |
parent | 815c8f2130b8b43e11abe52b226707f707a93581 [diff] |
ZOOKEEPER-3633: AdminServer commands throw NPE when only secure client port is used When only secureClientPort is defined in the config and there is no regular clientPort, then both the stat and the conf commands on the AdminServer result in 500 Server Error caused by NullPointerExceptions. The problem is that no serverCnxFactory is defined in the ZooKeeperServer in this case, we have only secureServerCnxnFactory. In the fix we return info about both the secure and unsecure connections. Example of the stat command output for secure-only configuration: ``` { "version" : "3.6.0-SNAPSHOT-8e8905069f4bff670c0492fe9e28ced0f86bca00, built on 11/29/2019 08:04 GMT", "read_only" : false, "server_stats" : { "packets_sent" : 1, "packets_received" : 1, "fsync_threshold_exceed_count" : 0, "client_response_stats" : { "last_buffer_size" : -1, "min_buffer_size" : -1, "max_buffer_size" : -1 }, "data_dir_size" : 671094270, "log_dir_size" : 671094270, "last_processed_zxid" : 20, "outstanding_requests" : 0, "server_state" : "standalone", "avg_latency" : 5.0, "max_latency" : 5, "min_latency" : 5, "num_alive_client_connections" : 1, "provider_null" : false, "uptime" : 15020 }, "client_response" : { "last_buffer_size" : -1, "min_buffer_size" : -1, "max_buffer_size" : -1 }, "node_count" : 6, "connections" : [ ], "secure_connections" : [ { "remote_socket_address" : "127.0.0.1:57276", "interest_ops" : 1, "outstanding_requests" : 0, "packets_received" : 1, "packets_sent" : 1 } ], "command" : "stats", "error" : null } ``` Author: Mate Szalay-Beko <szalay.beko.mate@gmail.com> Reviewers: Andor Molnar <andor@apache.org>, Enrico Olivelli <eolivelli@apache.org>, Norbert Kalmar <nkalmar@apache.org> Closes #1161 from symat/ZOOKEEPER-3633
For the latest information about Apache ZooKeeper, please visit our website at:
and our wiki, at:
https://cwiki.apache.org/confluence/display/ZOOKEEPER
Packaging/release artifacts
Either downloaded from https://zookeeper.apache.org/releases.html or found in zookeeper-assembly/target directory after building the project with maven.
apache-zookeeper-[version].tar.gz Contains all the source files which can be built by running: mvn clean install To generate an aggregated apidocs for zookeeper-server and zookeeper-jute: mvn javadoc:aggregate (generated files will be at target/site/apidocs) apache-zookeeper-[version]-bin.tar.gz Contains all the jar files required to run ZooKeeper Full documentation can also be found in the docs folder
As of version 3.5.5, the parent, zookeeper and zookeeper-jute artifacts are deployed to the central repository after the release is voted on and approved by the Apache ZooKeeper PMC:
https://repo1.maven.org/maven2/org/apache/zookeeper/zookeeper/
We always welcome new contributors to the project! See How to Contribute for details on how to submit patch through pull request and our contribution workflow.