ZooKeeper
  1. ZooKeeper
  2. ZOOKEEPER-1091

when the chrootPath of ClientCnxn is not null and the Watches of zooKeeper is not null and the method primeConnection(SelectionKey k) of ClientCnxn Occurred again for some reason ,then the wrong watcher clientPath is sended to server

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Critical Critical
    • Resolution: Duplicate
    • Affects Version/s: 3.3.3
    • Fix Version/s: 3.4.0
    • Component/s: java client
    • Labels:
      None
    • Environment:

      Linux version 2.6.18-194.el5 (mockbuild@builder10.centos.org) (gcc version 4.1.2 20080704 (Red Hat 4.1.2-48)) #1 SMP Fri Apr 2 14:58:14 EDT 2010

      Description

      if the chrootPath of ClientCnxn is not null and the Watches of zooKeeper is not null; and then for some reason(like zookeeper server stop and start), the zookeeper client will primeConnection to server again and tell server the watcher path,but the path is wrong,it show be serverpath but not clientpath;if the wrong watcher clientPath is sended to server,
      the exception will occurr, the exceptions:

      2011-06-10 04:33:16,935 [pool-2-thread-30-SendThread(DB1-6:2181)] WARN org.apache.zookeeper.ClientCnxn - Session 0x5302c4403a30232 for server DB1-6/192.168.1.6:2181, unexpected error, closing socket connection and attempting reconnect
      java.lang.StringIndexOutOfBoundsException: String index out of range: -6
      at java.lang.String.substring(String.java:1937)
      at java.lang.String.substring(String.java:1904)
      at org.apache.zookeeper.ClientCnxn$SendThread.readResponse(ClientCnxn.java:794)
      at org.apache.zookeeper.ClientCnxn$SendThread.doIO(ClientCnxn.java:881)
      at org.apache.zookeeper.ClientCnxn$SendThread.run(ClientCnxn.java:1130)

        Activity

          People

          • Assignee:
            Unassigned
            Reporter:
            zhangyouming
          • Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Time Tracking

              Estimated:
              Original Estimate - 1h
              1h
              Remaining:
              Remaining Estimate - 1h
              1h
              Logged:
              Time Spent - Not Specified
              Not Specified

                Development