ZooKeeper
  1. ZooKeeper
  2. ZOOKEEPER-1833 fix windows build
  3. ZOOKEEPER-1905

ZKClients are hitting KeeperException$ConnectionLossException due to wrong usage pattern

    Details

    • Type: Sub-task Sub-task
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Won't Fix
    • Affects Version/s: None
    • Fix Version/s: 3.4.7
    • Component/s: tests
    • Labels:
      None

      Description

      Since the ZooKeeper client connection establishment happens in async way, the client should wait for the 'KeeperState.SyncConnected' event before start performing any ops. Many tests are having this kind of wrong pattern.

      Reference:- Below stack trace taken from build https://builds.apache.org/job/ZooKeeper-3.4-WinVS2008_java/465/

          [junit] 2014-03-19 08:36:53,056 [myid:] - INFO  [main:JUnit4ZKTestRunner$LoggedInvokeMethod@62] - TEST METHOD FAILED testChecksums
          [junit] org.apache.zookeeper.KeeperException$ConnectionLossException: KeeperErrorCode = ConnectionLoss for /crctest- 942
          [junit] 	at org.apache.zookeeper.KeeperException.create(KeeperException.java:99)
          [junit] 	at org.apache.zookeeper.KeeperException.create(KeeperException.java:51)
          [junit] 	at org.apache.zookeeper.ZooKeeper.create(ZooKeeper.java:783)
          [junit] 	at org.apache.zookeeper.server.CRCTest.testChecksums(CRCTest.java:127)
      

        Issue Links

          Activity

          Hide
          Michi Mutsuzaki added a comment -

          Isn't the client supposed to queue requests while it's trying to connect to the server?

          Show
          Michi Mutsuzaki added a comment - Isn't the client supposed to queue requests while it's trying to connect to the server?
          Hide
          Rakesh R added a comment -

          Yes Michi Mutsuzaki , you are right. Unfortunately there was EndOfStreamException exception just above to it (I didn't notice) and casuing ConnectionLossException to all the pending queued packets(test client was continuously creating 2000 znodes). Probably this is due to machine problem and we couldn't do anything to this

              [junit] 2014-03-19 08:36:52,741 [myid:] - INFO  [main-SendThread(127.0.0.1:11221):ClientCnxn$SendThread@1098] - Unable to read additional data from server sessionid 0x144d97b67210000, likely server has closed socket, closing socket connection and attempting reconnect
          
              [junit] 2014-03-19 08:36:53,056 [myid:] - INFO  [main:JUnit4ZKTestRunner$LoggedInvokeMethod@62] - TEST METHOD FAILED testChecksums
              [junit] org.apache.zookeeper.KeeperException$ConnectionLossException: KeeperErrorCode = ConnectionLoss for /crctest- 942
              [junit] 	at org.apache.zookeeper.KeeperException.create(KeeperException.java:99)
              [junit] 	at org.apache.zookeeper.KeeperException.create(KeeperException.java:51)
              [junit] 	at org.apache.zookeeper.ZooKeeper.create(ZooKeeper.java:783)
          
          Show
          Rakesh R added a comment - Yes Michi Mutsuzaki , you are right. Unfortunately there was EndOfStreamException exception just above to it (I didn't notice) and casuing ConnectionLossException to all the pending queued packets(test client was continuously creating 2000 znodes). Probably this is due to machine problem and we couldn't do anything to this [junit] 2014-03-19 08:36:52,741 [myid:] - INFO [main-SendThread(127.0.0.1:11221):ClientCnxn$SendThread@1098] - Unable to read additional data from server sessionid 0x144d97b67210000, likely server has closed socket, closing socket connection and attempting reconnect [junit] 2014-03-19 08:36:53,056 [myid:] - INFO [main:JUnit4ZKTestRunner$LoggedInvokeMethod@62] - TEST METHOD FAILED testChecksums [junit] org.apache.zookeeper.KeeperException$ConnectionLossException: KeeperErrorCode = ConnectionLoss for /crctest- 942 [junit] at org.apache.zookeeper.KeeperException.create(KeeperException.java:99) [junit] at org.apache.zookeeper.KeeperException.create(KeeperException.java:51) [junit] at org.apache.zookeeper.ZooKeeper.create(ZooKeeper.java:783)
          Hide
          Rakesh R added a comment -

          I'm closing this issue, please see the above discussions. Please feel free to reopen if any comments. Thanks

          Show
          Rakesh R added a comment - I'm closing this issue, please see the above discussions. Please feel free to reopen if any comments. Thanks

            People

            • Assignee:
              Rakesh R
              Reporter:
              Rakesh R
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development