You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@zookeeper.apache.org by "Flavio Paiva Junqueira (JIRA)" <ji...@apache.org> on 2008/06/27 10:17:46 UTC

[jira] Created: (ZOOKEEPER-57) Connection times out when idle

Connection times out when idle
------------------------------

                 Key: ZOOKEEPER-57
                 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-57
             Project: Zookeeper
          Issue Type: Bug
          Components: java client
            Reporter: Flavio Paiva Junqueira


I have observed several connection timeouts with one single client, during periods of inactivity. From reports of other users, it seems that others are observing a similar issue. 

In my case, tickTime is 2000, and the client sets session timeout to be 10000. Client and servers are on different sites. I suspect there is something wrong with the mechanism that issues ping messages.  

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (ZOOKEEPER-57) Connection times out when idle

Posted by "Flavio Paiva Junqueira (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/ZOOKEEPER-57?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12608880#action_12608880 ] 

Flavio Paiva Junqueira commented on ZOOKEEPER-57:
-------------------------------------------------

I have added some logging, and I've been able to figure out that there are consecutive calls to sendPing right before the client session gets expired, but there are no subsequent calls to doIO() to send the ping packet.

> Connection times out when idle
> ------------------------------
>
>                 Key: ZOOKEEPER-57
>                 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-57
>             Project: Zookeeper
>          Issue Type: Bug
>          Components: java client
>            Reporter: Flavio Paiva Junqueira
>
> I have observed several connection timeouts with one single client, during periods of inactivity. From reports of other users, it seems that others are observing a similar issue. 
> In my case, tickTime is 2000, and the client sets session timeout to be 10000. Client and servers are on different sites. I suspect there is something wrong with the mechanism that issues ping messages.  

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (ZOOKEEPER-57) Connection times out when idle

Posted by "Flavio Paiva Junqueira (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/ZOOKEEPER-57?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12609868#action_12609868 ] 

Flavio Paiva Junqueira commented on ZOOKEEPER-57:
-------------------------------------------------

It seems to me that your logs are mixed. I can see some messages from a zookeeper server as well in the first snippet. Are you writing all your logs to the same shared device?

Because rc = -1 in one of the error messages, it looks like the server has shut down the socket. Are there any messages on the server logs around this time:

     2008-07-01 06:07:25,641

that indicate why that happened?

When you got those time out messages, was the client (or clients) idle? If possible, could describe a little more your setup?

> Connection times out when idle
> ------------------------------
>
>                 Key: ZOOKEEPER-57
>                 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-57
>             Project: Zookeeper
>          Issue Type: Bug
>          Components: java client
>            Reporter: Flavio Paiva Junqueira
>
> I have observed several connection timeouts with one single client, during periods of inactivity. From reports of other users, it seems that others are observing a similar issue. 
> In my case, tickTime is 2000, and the client sets session timeout to be 10000. Client and servers are on different sites. I suspect there is something wrong with the mechanism that issues ping messages.  

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (ZOOKEEPER-57) Connection times out when idle

Posted by "Flavio Paiva Junqueira (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/ZOOKEEPER-57?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12608991#action_12608991 ] 

Flavio Paiva Junqueira commented on ZOOKEEPER-57:
-------------------------------------------------

I've been able to verify that in my setup doIO() is actually called fine after a call to sendPing. However, it seems that in doIO(), the call to sockKey.isReadable() is returning false, and that's why the generated pings are not being sent. 

Because doIO is called from SendThread.run(), the following predicate must be true:

     ((k.readyOps() & (SelectionKey.OP_READ | SelectionKey.OP_WRITE)) != 0)

but because sockKey.isReadable() returns false, it seems that one of the two is  happening:

   1- k != sockKey
   2- (k.readyOps() & SelectionKey.OP_WRITE) != 0

>From the code, it doesn't look like we have "1", so it leaves us with "2". This is still not conclusive, so I'll keep investigating.
   

> Connection times out when idle
> ------------------------------
>
>                 Key: ZOOKEEPER-57
>                 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-57
>             Project: Zookeeper
>          Issue Type: Bug
>          Components: java client
>            Reporter: Flavio Paiva Junqueira
>
> I have observed several connection timeouts with one single client, during periods of inactivity. From reports of other users, it seems that others are observing a similar issue. 
> In my case, tickTime is 2000, and the client sets session timeout to be 10000. Client and servers are on different sites. I suspect there is something wrong with the mechanism that issues ping messages.  

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (ZOOKEEPER-57) Connection times out when idle

Posted by "Flavio Paiva Junqueira (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/ZOOKEEPER-57?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12609067#action_12609067 ] 

Flavio Paiva Junqueira commented on ZOOKEEPER-57:
-------------------------------------------------

I have added messages to keep track of what is going on with the server the client is connected to:

2008-06-28 21:02:44,406 - WARN  [NIOServerCxn.Factory:NIOServerCnxn@269] - Doing IO
2008-06-28 21:02:44,406 - WARN  [NIOServerCxn.Factory:NIOServerCnxn@275] - Socket is readable
2008-06-28 21:02:44,406 - WARN  [NIOServerCxn.Factory:NIOServerCnxn@269] - Doing IO
2008-06-28 21:02:44,406 - WARN  [NIOServerCxn.Factory:NIOServerCnxn@275] - Socket is readable
2008-06-28 21:02:44,406 - WARN  [NIOServerCxn.Factory:NIOServerCnxn@269] - Doing IO
2008-06-28 21:02:44,407 - WARN  [NIOServerCxn.Factory:NIOServerCnxn@300] - Socket is writable
2008-06-28 21:02:54,100 - WARN  [NIOServerCxn.Factory:NIOServerCnxn@269] - Doing IO
2008-06-28 21:02:54,100 - WARN  [NIOServerCxn.Factory:NIOServerCnxn@275] - Socket is readable
2008-06-28 21:02:54,100 - WARN  [NIOServerCxn.Factory:NIOServerCnxn@269] - Doing IO
2008-06-28 21:02:54,100 - WARN  [NIOServerCxn.Factory:NIOServerCnxn@275] - Socket is readable
2008-06-28 21:02:54,100 - WARN  [NIOServerCxn.Factory:NIOServerCnxn@269] - Doing IO
2008-06-28 21:02:54,100 - WARN  [NIOServerCxn.Factory:NIOServerCnxn@275] - Socket is readable
2008-06-28 21:02:54,100 - WARN  [NIOServerCxn.Factory:NIOServerCnxn@269] - Doing IO
2008-06-28 21:02:54,100 - WARN  [NIOServerCxn.Factory:NIOServerCnxn@275] - Socket is readable
2008-06-28 21:02:54,101 - WARN  [NIOServerCxn.Factory:NIOServerCnxn@300] - Socket is writable
2008-06-28 21:02:54,101 - WARN  [NIOServerCxn.Factory:NIOServerCnxn@269] - Doing IO
2008-06-28 21:02:54,101 - WARN  [NIOServerCxn.Factory:NIOServerCnxn@275] - Socket is readable

If we follow the timestamps, we see that there has been a gap of 10s between calls to doIO(). Before that,  the server was sending pings regularly every 3s. Also, from my client log messages, this corresponds to the time that the client times out, and so this gap is the cause of the time out on my client. Interestingly, once the client disconnects from the first server, it reconnects to another server, and the same happens a few minutes later:

2008-06-28 21:06:32,110 -  WARN  - [NIOServerCxn.Factory:NIOServerCnxn@269] - Doing IO
2008-06-28 21:06:32,110 -  WARN  - [NIOServerCxn.Factory:NIOServerCnxn@300] - Socket is writable
2008-06-28 21:06:46,516 -  WARN  - [NIOServerCxn.Factory:NIOServerCnxn@269] - Doing IO
2008-06-28 21:06:46,516 -  WARN  - [NIOServerCxn.Factory:NIOServerCnxn@275] - Socket is readable
2008-06-28 21:06:46,516 -  WARN  - [NIOServerCxn.Factory:NIOServerCnxn@269] - Doing IO
2008-06-28 21:06:46,517 -  WARN  - [NIOServerCxn.Factory:NIOServerCnxn@275] - Socket is readable

Now the gap is roughly 14s, though.

> Connection times out when idle
> ------------------------------
>
>                 Key: ZOOKEEPER-57
>                 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-57
>             Project: Zookeeper
>          Issue Type: Bug
>          Components: java client
>            Reporter: Flavio Paiva Junqueira
>
> I have observed several connection timeouts with one single client, during periods of inactivity. From reports of other users, it seems that others are observing a similar issue. 
> In my case, tickTime is 2000, and the client sets session timeout to be 10000. Client and servers are on different sites. I suspect there is something wrong with the mechanism that issues ping messages.  

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (ZOOKEEPER-57) Connection times out when idle

Posted by "Flavio Paiva Junqueira (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/ZOOKEEPER-57?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12608888#action_12608888 ] 

Flavio Paiva Junqueira commented on ZOOKEEPER-57:
-------------------------------------------------

I'm trying to reproduce it with new log messages this time. The main issue is that it takes time to generate the problem. 

> Connection times out when idle
> ------------------------------
>
>                 Key: ZOOKEEPER-57
>                 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-57
>             Project: Zookeeper
>          Issue Type: Bug
>          Components: java client
>            Reporter: Flavio Paiva Junqueira
>
> I have observed several connection timeouts with one single client, during periods of inactivity. From reports of other users, it seems that others are observing a similar issue. 
> In my case, tickTime is 2000, and the client sets session timeout to be 10000. Client and servers are on different sites. I suspect there is something wrong with the mechanism that issues ping messages.  

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (ZOOKEEPER-57) Connection times out when idle

Posted by "Benjamin Reed (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/ZOOKEEPER-57?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12608886#action_12608886 ] 

Benjamin Reed commented on ZOOKEEPER-57:
----------------------------------------

It would be interesting to see the state of the ready selector keys when the selector returns after calling sendPing. The only way I can see doIO getting skipped is if the OP_CONNECT is still set.

> Connection times out when idle
> ------------------------------
>
>                 Key: ZOOKEEPER-57
>                 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-57
>             Project: Zookeeper
>          Issue Type: Bug
>          Components: java client
>            Reporter: Flavio Paiva Junqueira
>
> I have observed several connection timeouts with one single client, during periods of inactivity. From reports of other users, it seems that others are observing a similar issue. 
> In my case, tickTime is 2000, and the client sets session timeout to be 10000. Client and servers are on different sites. I suspect there is something wrong with the mechanism that issues ping messages.  

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (ZOOKEEPER-57) Connection times out when idle

Posted by "Flavio Paiva Junqueira (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/ZOOKEEPER-57?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12609001#action_12609001 ] 

Flavio Paiva Junqueira commented on ZOOKEEPER-57:
-------------------------------------------------

The socket is writable but not readable.

> Connection times out when idle
> ------------------------------
>
>                 Key: ZOOKEEPER-57
>                 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-57
>             Project: Zookeeper
>          Issue Type: Bug
>          Components: java client
>            Reporter: Flavio Paiva Junqueira
>
> I have observed several connection timeouts with one single client, during periods of inactivity. From reports of other users, it seems that others are observing a similar issue. 
> In my case, tickTime is 2000, and the client sets session timeout to be 10000. Client and servers are on different sites. I suspect there is something wrong with the mechanism that issues ping messages.  

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (ZOOKEEPER-57) Connection times out when idle

Posted by "Johannes Zillmann (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/ZOOKEEPER-57?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12609829#action_12609829 ] 

Johannes Zillmann commented on ZOOKEEPER-57:
--------------------------------------------

Might be related, we're observing the following on the client side of a running zookeeper system:

{noformat} 
2008-07-01 05:16:12,643 WARN com.yahoo.zookeeper.server.NIOServerCnxn: Creating new session 11ade8d31110000
2008-07-01 05:16:12,686 WARN com.yahoo.zookeeper.server.NIOServerCnxn: Finished init of 11ade8d31110000: true
2008-07-01 05:16:13,646 WARN com.yahoo.zookeeper.server.ZooKeeperServer: Trying to connect to hadoop.host/100.211.8.204:2181
2008-07-01 05:16:13,647 WARN com.yahoo.zookeeper.server.ZooKeeperServer: Priming connection to java.nio.channels.SocketChannel[connected local=/100.211.8.204:40166 remote=hadoop.host/100.211.8.204:2181]
2008-07-01 05:16:13,651 WARN com.yahoo.zookeeper.server.NIOServerCnxn: Connected to /100.211.8.204:40166 lastZxid 0
2008-07-01 05:16:13,652 WARN com.yahoo.zookeeper.serhadoop.hostver.NIOServerCnxn: Creating new session 11ade8d31110001
2008-07-01 05:16:13,665 WARN com.yahoo.zookeeper.server.NIOServerCnxn: Finished init of 11ade8d31110001: true
2008-07-01 05:16:24,002 WARN com.yahoo.zookeeper.server.SessionTrackerImpl: Expiring 11ad84b6b650001
2008-07-01 05:16:24,002 WARN com.yahoo.zookeeper.server.SessionTrackerImpl: Expiring 11ad84b6b650000
2008-07-01 05:16:24,003 WARN com.yahoo.zookeeper.server.PrepRequestProcessor: Processed session termination request for id: 11ad84b6b650001
2008-07-01 05:16:24,003 WARN com.yahoo.zookeeper.server.PrepRequestProcessor: Processed session termination request for id: 11ad84b6b650000
2008-07-01 05:16:42,140 WARN com.yahoo.zookeeper.server.ZooKeeperServer: Trying to connect to hadoop.host/100.211.8.204:2181
2008-07-01 05:16:42,160 WARN com.yahoo.zookeeper.server.ZooKeeperServer: Priming connection to java.nio.channels.SocketChannel[connected local=/100.211.8.204:45830 remote=hadoop.host/100.211.8.204:2181]
2008-07-01 05:16:43,480 INFO org.apache.hadoop.ipc.metrics.RpcMetrics: Initializing RPC Metrics with hostName=Node, port=50000
2008-07-01 05:16:46,953 INFO org.apache.hadoop.ipc.Server: IPC Server Responder: starting
2008-07-01 05:16:46,955 INFO org.apache.hadoop.ipc.Server: IPC Server listener on 50000: starting
2008-07-01 05:16:46,955 INFO org.apache.hadoop.ipc.Server: IPC Server handler 0 on 50000: starting
2008-07-01 06:07:25,641 WARN com.yahoo.zookeeper.server.ZooKeeperServer: Closing:
java.io.IOException: Read error rc = -1 java.nio.DirectByteBuffer[pos=0 lim=4 cap=4]
        at com.yahoo.zookeeper.ClientCnxn$SendThread.doIO(ClientCnxn.java:484)
        at com.yahoo.zookeeper.ClientCnxn$SendThread.run(ClientCnxn.java:705)
2008-07-01 06:07:27,775 WARN com.yahoo.zookeeper.server.ZooKeeperServer: Trying to connect to hadoop.host/100.211.8.204:2181
2008-07-01 06:07:27,775 WARN com.yahoo.zookeeper.server.ZooKeeperServer: Priming connection to java.nio.channels.SocketChannel[connected local=/100.211.8.207:47535 remote=hadoop.host/100.211.8.204:2181]
2008-07-01 06:07:27,776 WARN com.yahoo.zookeeper.server.ZooKeeperServer: Closing:
java.io.IOException: Session Expired
        at com.yahoo.zookeeper.ClientCnxn$SendThread.readConnectResult(ClientCnxn.java:406)
        at com.yahoo.zookeeper.ClientCnxn$SendThread.doIO(ClientCnxn.java:492)
        at com.yahoo.zookeeper.ClientCnxn$SendThread.run(ClientCnxn.java:705)
2008-07-01 06:07:33,294 ERROR com.yahoo.zookeeper.server.ZooKeeperServer: from EventThread
java.lang.RuntimeException: Unable to re subscribe to child change notification for: /katta/node-to-shard/hadoop1.host:50000
        at net.sf.katta.zk.ZKClient.process(ZKClient.java:364)
        at com.yahoo.zookeeper.ClientCnxn$EventThread.run(ClientCnxn.java:264)
Caused by: com.yahoo.zookeeper.KeeperException: KeeperErrorCode = SessionExpired
        at com.yahoo.zookeeper.ZooKeeper.getChildren(ZooKeeper.java:634)
        at net.sf.katta.zk.ZKClient.process(ZKClient.java:359)
        ... 1 more 
{noformat} 

At the same time on the server side you can see:
{noformat} 
2008-07-01 05:16:24,002 WARN com.yahoo.zookeeper.server.SessionTrackerImpl: Expiring 11ad84b6b650001
2008-07-01 05:16:24,002 WARN com.yahoo.zookeeper.server.SessionTrackerImpl: Expiring 11ad84b6b650000
2008-07-01 05:16:24,003 WARN com.yahoo.zookeeper.server.PrepRequestProcessor: Processed session termination request for id: 11ad84b6b650001
2008-07-01 05:16:24,003 WARN com.yahoo.zookeeper.server.PrepRequestProcessor: Processed session termination request for id: 11ad84b6b650000
{noformat} 

Some hours later this is in the server logs. Don't know if its related...
{noformat} 
2008-07-01 15:52:59,798 WARN com.yahoo.zookeeper.server.ZooKeeperServer: Closing: 
java.io.IOException: TIMED OUT
        at com.yahoo.zookeeper.ClientCnxn$SendThread.run(ClientCnxn.java:666)
2008-07-01 15:52:59,798 WARN com.yahoo.zookeeper.server.ZooKeeperServer: Closing: 
java.io.IOException: TIMED OUT
        at com.yahoo.zookeeper.ClientCnxn$SendThread.run(ClientCnxn.java:666)
{noformat} 


> Connection times out when idle
> ------------------------------
>
>                 Key: ZOOKEEPER-57
>                 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-57
>             Project: Zookeeper
>          Issue Type: Bug
>          Components: java client
>            Reporter: Flavio Paiva Junqueira
>
> I have observed several connection timeouts with one single client, during periods of inactivity. From reports of other users, it seems that others are observing a similar issue. 
> In my case, tickTime is 2000, and the client sets session timeout to be 10000. Client and servers are on different sites. I suspect there is something wrong with the mechanism that issues ping messages.  

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Assigned: (ZOOKEEPER-57) Connection times out when idle

Posted by "Flavio Paiva Junqueira (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/ZOOKEEPER-57?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Flavio Paiva Junqueira reassigned ZOOKEEPER-57:
-----------------------------------------------

    Assignee: Flavio Paiva Junqueira

> Connection times out when idle
> ------------------------------
>
>                 Key: ZOOKEEPER-57
>                 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-57
>             Project: Zookeeper
>          Issue Type: Bug
>          Components: java client
>            Reporter: Flavio Paiva Junqueira
>            Assignee: Flavio Paiva Junqueira
>
> I have observed several connection timeouts with one single client, during periods of inactivity. From reports of other users, it seems that others are observing a similar issue. 
> In my case, tickTime is 2000, and the client sets session timeout to be 10000. Client and servers are on different sites. I suspect there is something wrong with the mechanism that issues ping messages.  

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Resolved: (ZOOKEEPER-57) Connection times out when idle

Posted by "Flavio Paiva Junqueira (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/ZOOKEEPER-57?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Flavio Paiva Junqueira resolved ZOOKEEPER-57.
---------------------------------------------

    Resolution: Invalid

It seems that cause of this problem to one of our users was some networking issue, and we couldn't point out to any problem with ZooKeeper, so I'm closing it for now.

> Connection times out when idle
> ------------------------------
>
>                 Key: ZOOKEEPER-57
>                 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-57
>             Project: Zookeeper
>          Issue Type: Bug
>          Components: java client
>            Reporter: Flavio Paiva Junqueira
>            Assignee: Flavio Paiva Junqueira
>
> I have observed several connection timeouts with one single client, during periods of inactivity. From reports of other users, it seems that others are observing a similar issue. 
> In my case, tickTime is 2000, and the client sets session timeout to be 10000. Client and servers are on different sites. I suspect there is something wrong with the mechanism that issues ping messages.  

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Issue Comment Edited: (ZOOKEEPER-57) Connection times out when idle

Posted by "Flavio Paiva Junqueira (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/ZOOKEEPER-57?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12608991#action_12608991 ] 

fpj edited comment on ZOOKEEPER-57 at 6/28/08 3:15 AM:
--------------------------------------------------------------------------

I've been able to verify that in my setup doIO() is actually called fine after a call to sendPing. However, it seems that in doIO(), the call to sockKey.isReadable() is returning false, and pings are not being received. 

Because doIO is called from SendThread.run(), the following predicate must be true:

     ((k.readyOps() & (SelectionKey.OP_READ | SelectionKey.OP_WRITE)) != 0)

but because sockKey.isReadable() returns false, it seems that one of the two is  happening:

   1- k != sockKey
   2- (k.readyOps() & SelectionKey.OP_WRITE) != 0

>From the code, it doesn't look like we have "1", so it leaves us with "2". This is still not conclusive, so I'll keep investigating.
   

      was (Author: fpj):
    I've been able to verify that in my setup doIO() is actually called fine after a call to sendPing. However, it seems that in doIO(), the call to sockKey.isReadable() is returning false, and that's why the generated pings are not being sent. 

Because doIO is called from SendThread.run(), the following predicate must be true:

     ((k.readyOps() & (SelectionKey.OP_READ | SelectionKey.OP_WRITE)) != 0)

but because sockKey.isReadable() returns false, it seems that one of the two is  happening:

   1- k != sockKey
   2- (k.readyOps() & SelectionKey.OP_WRITE) != 0

>From the code, it doesn't look like we have "1", so it leaves us with "2". This is still not conclusive, so I'll keep investigating.
   
  
> Connection times out when idle
> ------------------------------
>
>                 Key: ZOOKEEPER-57
>                 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-57
>             Project: Zookeeper
>          Issue Type: Bug
>          Components: java client
>            Reporter: Flavio Paiva Junqueira
>
> I have observed several connection timeouts with one single client, during periods of inactivity. From reports of other users, it seems that others are observing a similar issue. 
> In my case, tickTime is 2000, and the client sets session timeout to be 10000. Client and servers are on different sites. I suspect there is something wrong with the mechanism that issues ping messages.  

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Issue Comment Edited: (ZOOKEEPER-57) Connection times out when idle

Posted by "Flavio Paiva Junqueira (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/ZOOKEEPER-57?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12664414#action_12664414 ] 

fpj edited comment on ZOOKEEPER-57 at 1/16/09 12:44 AM:
---------------------------------------------------------------------------

It seems that what was causing this problem to one of our users was some networking issue, and we couldn't point out to any problem with ZooKeeper, so I'm closing it for now.

      was (Author: fpj):
    It seems that cause of this problem to one of our users was some networking issue, and we couldn't point out to any problem with ZooKeeper, so I'm closing it for now.
  
> Connection times out when idle
> ------------------------------
>
>                 Key: ZOOKEEPER-57
>                 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-57
>             Project: Zookeeper
>          Issue Type: Bug
>          Components: java client
>            Reporter: Flavio Paiva Junqueira
>            Assignee: Flavio Paiva Junqueira
>
> I have observed several connection timeouts with one single client, during periods of inactivity. From reports of other users, it seems that others are observing a similar issue. 
> In my case, tickTime is 2000, and the client sets session timeout to be 10000. Client and servers are on different sites. I suspect there is something wrong with the mechanism that issues ping messages.  

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.