Uploaded image for project: 'ZooKeeper'
  1. ZooKeeper
  2. ZOOKEEPER-1325

Log maxClientCnxn warning in INFO level

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Minor
    • Resolution: Invalid
    • 3.3.3, 3.3.4, 3.4.0
    • None
    • server

    Description

      When Hbase client ZooKeeperWatcher gets ConnectionLossException (/hbase/rs or /hbase), it is very hard debug the ZK server log if ZK server has started using log4j INFO level.
      When maxClientCnxn limit is reached for a single client (at the socket level), it will be nice to log it in INFO level instead of WARN. It will help hbase clients (Region server, HMaster, and HBase cient lib) to debug the issue in production.

      3.4 - src/java/main/org/apache/zookeeper/server/NIOServerCnxnFactory.java 
      3.3.4 - src/java/main/org/apache/zookeeper/server/NIOServerCnxn.java
      
       public void run() {
              while (!ss.socket().isClosed()) {
                  try {
                              ...
                              ...
                      
                              if (maxClientCnxns > 0 && cnxncount >= maxClientCnxns){
                                  LOG.info("Too many connections from " + ia
                                           + " - max is " + maxClientCnxns );
                                  sc.close();
                              } 
                              ... 
          }
      
      

      Attachments

        Activity

          People

            Unassigned Unassigned
            mubarakseyed Mubarak Seyed
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: