Details

    • Type: Improvement Improvement
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 3.2.1
    • Fix Version/s: 3.3.0
    • Component/s: None
    • Labels:
    • Hadoop Flags:
      Reviewed

      Description

      As discussed during the 10/23 meeting, some messages in the java client logs are mixing up terms from different levels. For example:

      2009-10-14 15:12:43,566 WARN org.apache.zookeeper.ClientCnxn: Exception closing session 0x1244f619478000d to sun.nio.ch.SelectionKeyImpl@15e32c4
      java.io.IOException: Session Expired
         at org.apache.zookeeper.ClientCnxn$SendThread.readConnectResult(ClientCnxn.java:589)
         at org.apache.zookeeper.ClientCnxn$SendThread.doIO(ClientCnxn.java:709)
         at org.apache.zookeeper.ClientCnxn$SendThread.run(ClientCnxn.java:945)
      

      Which session are we talking about in the first line? Now I know that it's a network-related session and not the ZK one, but I've seen many of our users getting confused over those lines.

        Issue Links

          Activity

          Hide
          Patrick Hunt added a comment -

          Hm, I want to make sure I understand your issues. There is only one session here - the zk client session. there's also a network connection (the socket) btw client/server.

          this message is (should be) saying that the zk client lib attempted to re-connect to the server but the client's ZK session has already expired on the server (timeout exceeded, ephemerals cleaned up, etc...) and the ZK session is no longer valid (ie the client needs to create a new session)

          I'm happy to make this better (can't be much worse) but I want to make sure I grok your request.

          If this log message said something like

          2009-10-29 14:25:54,023 - INFO ClientCnxn - Unable to reconnect to ZooKeeper service, session 0x124a265d8b20001 has expired

          would that be better? (notice info level since it's not really an error condition.)

          your client watcher code is getting (in both cases) the watcher event that notifies it of the session expiration, this is a log by the client library code capturing the event.

          better? suggestions?

          Show
          Patrick Hunt added a comment - Hm, I want to make sure I understand your issues. There is only one session here - the zk client session. there's also a network connection (the socket) btw client/server. this message is (should be) saying that the zk client lib attempted to re-connect to the server but the client's ZK session has already expired on the server (timeout exceeded, ephemerals cleaned up, etc...) and the ZK session is no longer valid (ie the client needs to create a new session) I'm happy to make this better (can't be much worse) but I want to make sure I grok your request. If this log message said something like 2009-10-29 14:25:54,023 - INFO ClientCnxn - Unable to reconnect to ZooKeeper service, session 0x124a265d8b20001 has expired would that be better? (notice info level since it's not really an error condition.) your client watcher code is getting (in both cases) the watcher event that notifies it of the session expiration, this is a log by the client library code capturing the event. better? suggestions?
          Hide
          Jean-Daniel Cryans added a comment -

          +1 I like the INFO level and better message.

          I guess something like this would show a different message?

          09/10/16 15:14:02 WARN zookeeper.ClientCnxn: Exception closing session 0x1245f6866060002 to sun.nio.ch.SelectionKeyImpl@12efcfe
          java.io.IOException: TIMED OUT
                 at org.apache.zookeeper.ClientCnxn$SendThread.run(ClientCnxn.java:906)
          
          Show
          Jean-Daniel Cryans added a comment - +1 I like the INFO level and better message. I guess something like this would show a different message? 09/10/16 15:14:02 WARN zookeeper.ClientCnxn: Exception closing session 0x1245f6866060002 to sun.nio.ch.SelectionKeyImpl@12efcfe java.io.IOException: TIMED OUT at org.apache.zookeeper.ClientCnxn$SendThread.run(ClientCnxn.java:906)
          Hide
          Patrick Hunt added a comment -

          currently I have changed it to this

          2009-10-29 19:53:27,788 - INFO - Client session timed out, have not heard from server in 20001ms for sessionid 0x124a391a9620001, closing socket connection and attempting reconnect

          as part of a patch that I'm working on that will attempt to improve the client/server session establishment messages

          Show
          Patrick Hunt added a comment - currently I have changed it to this 2009-10-29 19:53:27,788 - INFO - Client session timed out, have not heard from server in 20001ms for sessionid 0x124a391a9620001, closing socket connection and attempting reconnect as part of a patch that I'm working on that will attempt to improve the client/server session establishment messages
          Hide
          Jean-Daniel Cryans added a comment -

          +1 that's excellent.

          Show
          Jean-Daniel Cryans added a comment - +1 that's excellent.
          Hide
          Patrick Hunt added a comment -

          ZOOKEEPER-558 patch includes this issue (same general area)

          Please review the patch for 558 ASAP and provide any feedback there if you notice issues.

          Show
          Patrick Hunt added a comment - ZOOKEEPER-558 patch includes this issue (same general area) Please review the patch for 558 ASAP and provide any feedback there if you notice issues.
          Hide
          Patrick Hunt added a comment -

          Fixed as part of ZOOKEEPER-558

          Show
          Patrick Hunt added a comment - Fixed as part of ZOOKEEPER-558

            People

            • Assignee:
              Patrick Hunt
              Reporter:
              Jean-Daniel Cryans
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development