You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@zookeeper.apache.org by GitBox <gi...@apache.org> on 2019/11/29 08:22:09 UTC

[GitHub] [zookeeper] symat opened a new pull request #1161: ZOOKEEPER-3633: AdminServer commands throw NPE when only secure client port is used

symat opened a new pull request #1161: ZOOKEEPER-3633: AdminServer commands throw NPE when only secure client port is used
URL: https://github.com/apache/zookeeper/pull/1161
 
 
   When only secureClientPort is defined in the config and there is no regular clientPort,
   then both the stat and the conf commands 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
   }
   ```

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services