You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@bookkeeper.apache.org by "surendra singh lilhore (JIRA)" <ji...@apache.org> on 2012/05/08 11:51:51 UTC

[jira] [Created] (BOOKKEEPER-242) Bookkeeper not able to connect other zookeeper when shutdown the zookeeper server where the BK has connected.

surendra singh lilhore created BOOKKEEPER-242:
-------------------------------------------------

             Summary: Bookkeeper not able to connect other zookeeper when shutdown the zookeeper server where the BK has connected.
                 Key: BOOKKEEPER-242
                 URL: https://issues.apache.org/jira/browse/BOOKKEEPER-242
             Project: Bookkeeper
          Issue Type: Bug
          Components: bookkeeper-server
    Affects Versions: 4.0.0
            Reporter: surendra singh lilhore


Scenario : 
1. Start three zookeeper cluster.
2. start three bookKeeper.
3. shutdown zookeeper server where bookkeeper has connected.

Expected Result:
bookkeeper should be able to connect other zookeeper

Actual Result :
All three bookkeepers retry to connect zookeeper node which has been shutdown.



BookKeeper log for Retry :
{noformat)
2012-04-25 13:35:15,319 - WARN  [main-EventThread:Bookie$2@456] - ZK client has been disconnected to the ZK server!
2012-04-25 13:35:17,194 - INFO  [main-SendThread(HOST-10-18-40-91:2181):ClientCnxn$SendThread@933] - Opening socket connection to server HOST-10-18-40-91/10.18.40.91:2181
2012-04-25 13:35:17,196 - WARN  [main-SendThread(HOST-10-18-40-91:2181):ClientCnxn$SendThread@1063] - Session 0x136e87b50ce0002 for server null, unexpected error, closing socket connection and attempting reconnect
java.net.ConnectException: Connection refused
	at sun.nio.ch.SocketChannelImpl.checkConnect(Native Method)
	at sun.nio.ch.SocketChannelImpl.finishConnect(SocketChannelImpl.java:567)
	at org.apache.zookeeper.ClientCnxnSocketNIO.doTransport(ClientCnxnSocketNIO.java:264)
	at org.apache.zookeeper.ClientCnxn$SendThread.run(ClientCnxn.java:1041)
2012-04-25 13:35:19,125 - INFO  [main-SendThread(HOST-10-18-40-91:2181):ClientCnxn$SendThread@933] - Opening socket connection to server HOST-10-18-40-91/10.18.40.91:2181
2012-04-25 13:35:19,126 - WARN  [main-SendThread(HOST-10-18-40-91:2181):ClientCnxn$SendThread@1063] - Session 0x136e87b50ce0002 for server null, unexpected error, closing socket connection and attempting reconnect
java.net.ConnectException: Connection refused
	at sun.nio.ch.SocketChannelImpl.checkConnect(Native Method)
	at sun.nio.ch.SocketChannelImpl.finishConnect(SocketChannelImpl.java:567)
	at org.apache.zookeeper.ClientCnxnSocketNIO.doTransport(ClientCnxnSocketNIO.java:264)
	at org.apache.zookeeper.ClientCnxn$SendThread.run(ClientCnxn.java:1041)
2012-04-25 13:35:20,276 - INFO  [main-SendThread(HOST-10-18-40-91:2181):ClientCnxn$SendThread@933] - Opening socket connection to server HOST-10-18-40-91/10.18.40.91:2181
2012-04-25 13:35:20,277 - WARN  [main-SendThread(HOST-10-18-40-91:2181):ClientCnxn$SendThread@1063] - Session 0x136e87b50ce0002 for server null, unexpected error, closing socket connection and attempting reconnect
java.net.ConnectException: Connection refused
	at sun.nio.ch.SocketChannelImpl.checkConnect(Native Method)
	at sun.nio.ch.SocketChannelImpl.finishConnect(SocketChannelImpl.java:567)
	at org.apache.zookeeper.ClientCnxnSocketNIO.doTransport(ClientCnxnSocketNIO.java:264)
	at org.apache.zookeeper.ClientCnxn$SendThread.run(ClientCnxn.java:1041)

{noformat}

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (BOOKKEEPER-242) Bookkeeper not able to connect other zookeeper when shutdown the zookeeper server where the BK has connected.

Posted by "Sijie Guo (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/BOOKKEEPER-242?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Sijie Guo updated BOOKKEEPER-242:
---------------------------------

    Attachment: BK-242.diff_v2

attach a new patch addressed Ivan and Rakesh's suggestion. thanks all.
                
> Bookkeeper not able to connect other zookeeper when shutdown the zookeeper server where the BK has connected.
> -------------------------------------------------------------------------------------------------------------
>
>                 Key: BOOKKEEPER-242
>                 URL: https://issues.apache.org/jira/browse/BOOKKEEPER-242
>             Project: Bookkeeper
>          Issue Type: Bug
>          Components: bookkeeper-server
>    Affects Versions: 4.0.0
>            Reporter: surendra singh lilhore
>            Assignee: Sijie Guo
>            Priority: Blocker
>             Fix For: 4.1.0
>
>         Attachments: BK-242.diff, BK-242.diff_v2
>
>
> Scenario : 
> 1. Start three zookeeper cluster.
> 2. start three bookKeeper.
> 3. shutdown zookeeper server where bookkeeper has connected.
> Expected Result:
> bookkeeper should be able to connect other zookeeper
> Actual Result :
> All three bookkeepers retry to connect zookeeper node which has been shutdown.
> BookKeeper log for Retry :
> {noformat} 
> 2012-04-25 13:35:15,319 - WARN  [main-EventThread:Bookie$2@456] - ZK client has been disconnected to the ZK server!
> 2012-04-25 13:35:17,194 - INFO  [main-SendThread(HOST-10-18-40-91:2181):ClientCnxn$SendThread@933] - Opening socket connection to server HOST-10-18-40-91/10.18.40.91:2181
> 2012-04-25 13:35:17,196 - WARN  [main-SendThread(HOST-10-18-40-91:2181):ClientCnxn$SendThread@1063] - Session 0x136e87b50ce0002 for server null, unexpected error, closing socket connection and attempting reconnect
> java.net.ConnectException: Connection refused
> 	at sun.nio.ch.SocketChannelImpl.checkConnect(Native Method)
> 	at sun.nio.ch.SocketChannelImpl.finishConnect(SocketChannelImpl.java:567)
> 	at org.apache.zookeeper.ClientCnxnSocketNIO.doTransport(ClientCnxnSocketNIO.java:264)
> 	at org.apache.zookeeper.ClientCnxn$SendThread.run(ClientCnxn.java:1041)
> 2012-04-25 13:35:19,125 - INFO  [main-SendThread(HOST-10-18-40-91:2181):ClientCnxn$SendThread@933] - Opening socket connection to server HOST-10-18-40-91/10.18.40.91:2181
> 2012-04-25 13:35:19,126 - WARN  [main-SendThread(HOST-10-18-40-91:2181):ClientCnxn$SendThread@1063] - Session 0x136e87b50ce0002 for server null, unexpected error, closing socket connection and attempting reconnect
> java.net.ConnectException: Connection refused
> 	at sun.nio.ch.SocketChannelImpl.checkConnect(Native Method)
> 	at sun.nio.ch.SocketChannelImpl.finishConnect(SocketChannelImpl.java:567)
> 	at org.apache.zookeeper.ClientCnxnSocketNIO.doTransport(ClientCnxnSocketNIO.java:264)
> 	at org.apache.zookeeper.ClientCnxn$SendThread.run(ClientCnxn.java:1041)
> 2012-04-25 13:35:20,276 - INFO  [main-SendThread(HOST-10-18-40-91:2181):ClientCnxn$SendThread@933] - Opening socket connection to server HOST-10-18-40-91/10.18.40.91:2181
> 2012-04-25 13:35:20,277 - WARN  [main-SendThread(HOST-10-18-40-91:2181):ClientCnxn$SendThread@1063] - Session 0x136e87b50ce0002 for server null, unexpected error, closing socket connection and attempting reconnect
> java.net.ConnectException: Connection refused
> 	at sun.nio.ch.SocketChannelImpl.checkConnect(Native Method)
> 	at sun.nio.ch.SocketChannelImpl.finishConnect(SocketChannelImpl.java:567)
> 	at org.apache.zookeeper.ClientCnxnSocketNIO.doTransport(ClientCnxnSocketNIO.java:264)
> 	at org.apache.zookeeper.ClientCnxn$SendThread.run(ClientCnxn.java:1041)
> {noformat} 

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (BOOKKEEPER-242) Bookkeeper not able to connect other zookeeper when shutdown the zookeeper server where the BK has connected.

Posted by "Ivan Kelly (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/BOOKKEEPER-242?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13270558#comment-13270558 ] 

Ivan Kelly commented on BOOKKEEPER-242:
---------------------------------------

This is very similar to BOOKKEEPER-171[1].

I suggest we use the first Rakesh is suggesting, but instead of manually doing the string stuff, use StringUtils#join [2]. Internally the client configuration should store the list as a String[]

[1] https://github.com/apache/bookkeeper/commit/3defe9e5110472da995789b5ae14c286f58f1293
[2] http://commons.apache.org/lang/api-2.5/org/apache/commons/lang/StringUtils.html
                
> Bookkeeper not able to connect other zookeeper when shutdown the zookeeper server where the BK has connected.
> -------------------------------------------------------------------------------------------------------------
>
>                 Key: BOOKKEEPER-242
>                 URL: https://issues.apache.org/jira/browse/BOOKKEEPER-242
>             Project: Bookkeeper
>          Issue Type: Bug
>          Components: bookkeeper-server
>    Affects Versions: 4.0.0
>            Reporter: surendra singh lilhore
>            Assignee: Sijie Guo
>             Fix For: 4.1.0
>
>         Attachments: BK-242.diff
>
>
> Scenario : 
> 1. Start three zookeeper cluster.
> 2. start three bookKeeper.
> 3. shutdown zookeeper server where bookkeeper has connected.
> Expected Result:
> bookkeeper should be able to connect other zookeeper
> Actual Result :
> All three bookkeepers retry to connect zookeeper node which has been shutdown.
> BookKeeper log for Retry :
> {noformat} 
> 2012-04-25 13:35:15,319 - WARN  [main-EventThread:Bookie$2@456] - ZK client has been disconnected to the ZK server!
> 2012-04-25 13:35:17,194 - INFO  [main-SendThread(HOST-10-18-40-91:2181):ClientCnxn$SendThread@933] - Opening socket connection to server HOST-10-18-40-91/10.18.40.91:2181
> 2012-04-25 13:35:17,196 - WARN  [main-SendThread(HOST-10-18-40-91:2181):ClientCnxn$SendThread@1063] - Session 0x136e87b50ce0002 for server null, unexpected error, closing socket connection and attempting reconnect
> java.net.ConnectException: Connection refused
> 	at sun.nio.ch.SocketChannelImpl.checkConnect(Native Method)
> 	at sun.nio.ch.SocketChannelImpl.finishConnect(SocketChannelImpl.java:567)
> 	at org.apache.zookeeper.ClientCnxnSocketNIO.doTransport(ClientCnxnSocketNIO.java:264)
> 	at org.apache.zookeeper.ClientCnxn$SendThread.run(ClientCnxn.java:1041)
> 2012-04-25 13:35:19,125 - INFO  [main-SendThread(HOST-10-18-40-91:2181):ClientCnxn$SendThread@933] - Opening socket connection to server HOST-10-18-40-91/10.18.40.91:2181
> 2012-04-25 13:35:19,126 - WARN  [main-SendThread(HOST-10-18-40-91:2181):ClientCnxn$SendThread@1063] - Session 0x136e87b50ce0002 for server null, unexpected error, closing socket connection and attempting reconnect
> java.net.ConnectException: Connection refused
> 	at sun.nio.ch.SocketChannelImpl.checkConnect(Native Method)
> 	at sun.nio.ch.SocketChannelImpl.finishConnect(SocketChannelImpl.java:567)
> 	at org.apache.zookeeper.ClientCnxnSocketNIO.doTransport(ClientCnxnSocketNIO.java:264)
> 	at org.apache.zookeeper.ClientCnxn$SendThread.run(ClientCnxn.java:1041)
> 2012-04-25 13:35:20,276 - INFO  [main-SendThread(HOST-10-18-40-91:2181):ClientCnxn$SendThread@933] - Opening socket connection to server HOST-10-18-40-91/10.18.40.91:2181
> 2012-04-25 13:35:20,277 - WARN  [main-SendThread(HOST-10-18-40-91:2181):ClientCnxn$SendThread@1063] - Session 0x136e87b50ce0002 for server null, unexpected error, closing socket connection and attempting reconnect
> java.net.ConnectException: Connection refused
> 	at sun.nio.ch.SocketChannelImpl.checkConnect(Native Method)
> 	at sun.nio.ch.SocketChannelImpl.finishConnect(SocketChannelImpl.java:567)
> 	at org.apache.zookeeper.ClientCnxnSocketNIO.doTransport(ClientCnxnSocketNIO.java:264)
> 	at org.apache.zookeeper.ClientCnxn$SendThread.run(ClientCnxn.java:1041)
> {noformat} 

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (BOOKKEEPER-242) Bookkeeper not able to connect other zookeeper when shutdown the zookeeper server where the BK has connected.

Posted by "Ivan Kelly (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/BOOKKEEPER-242?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Ivan Kelly updated BOOKKEEPER-242:
----------------------------------

    Priority: Blocker  (was: Major)

Making this a blocker as it seriously affects availability.
                
> Bookkeeper not able to connect other zookeeper when shutdown the zookeeper server where the BK has connected.
> -------------------------------------------------------------------------------------------------------------
>
>                 Key: BOOKKEEPER-242
>                 URL: https://issues.apache.org/jira/browse/BOOKKEEPER-242
>             Project: Bookkeeper
>          Issue Type: Bug
>          Components: bookkeeper-server
>    Affects Versions: 4.0.0
>            Reporter: surendra singh lilhore
>            Assignee: Sijie Guo
>            Priority: Blocker
>             Fix For: 4.1.0
>
>         Attachments: BK-242.diff
>
>
> Scenario : 
> 1. Start three zookeeper cluster.
> 2. start three bookKeeper.
> 3. shutdown zookeeper server where bookkeeper has connected.
> Expected Result:
> bookkeeper should be able to connect other zookeeper
> Actual Result :
> All three bookkeepers retry to connect zookeeper node which has been shutdown.
> BookKeeper log for Retry :
> {noformat} 
> 2012-04-25 13:35:15,319 - WARN  [main-EventThread:Bookie$2@456] - ZK client has been disconnected to the ZK server!
> 2012-04-25 13:35:17,194 - INFO  [main-SendThread(HOST-10-18-40-91:2181):ClientCnxn$SendThread@933] - Opening socket connection to server HOST-10-18-40-91/10.18.40.91:2181
> 2012-04-25 13:35:17,196 - WARN  [main-SendThread(HOST-10-18-40-91:2181):ClientCnxn$SendThread@1063] - Session 0x136e87b50ce0002 for server null, unexpected error, closing socket connection and attempting reconnect
> java.net.ConnectException: Connection refused
> 	at sun.nio.ch.SocketChannelImpl.checkConnect(Native Method)
> 	at sun.nio.ch.SocketChannelImpl.finishConnect(SocketChannelImpl.java:567)
> 	at org.apache.zookeeper.ClientCnxnSocketNIO.doTransport(ClientCnxnSocketNIO.java:264)
> 	at org.apache.zookeeper.ClientCnxn$SendThread.run(ClientCnxn.java:1041)
> 2012-04-25 13:35:19,125 - INFO  [main-SendThread(HOST-10-18-40-91:2181):ClientCnxn$SendThread@933] - Opening socket connection to server HOST-10-18-40-91/10.18.40.91:2181
> 2012-04-25 13:35:19,126 - WARN  [main-SendThread(HOST-10-18-40-91:2181):ClientCnxn$SendThread@1063] - Session 0x136e87b50ce0002 for server null, unexpected error, closing socket connection and attempting reconnect
> java.net.ConnectException: Connection refused
> 	at sun.nio.ch.SocketChannelImpl.checkConnect(Native Method)
> 	at sun.nio.ch.SocketChannelImpl.finishConnect(SocketChannelImpl.java:567)
> 	at org.apache.zookeeper.ClientCnxnSocketNIO.doTransport(ClientCnxnSocketNIO.java:264)
> 	at org.apache.zookeeper.ClientCnxn$SendThread.run(ClientCnxn.java:1041)
> 2012-04-25 13:35:20,276 - INFO  [main-SendThread(HOST-10-18-40-91:2181):ClientCnxn$SendThread@933] - Opening socket connection to server HOST-10-18-40-91/10.18.40.91:2181
> 2012-04-25 13:35:20,277 - WARN  [main-SendThread(HOST-10-18-40-91:2181):ClientCnxn$SendThread@1063] - Session 0x136e87b50ce0002 for server null, unexpected error, closing socket connection and attempting reconnect
> java.net.ConnectException: Connection refused
> 	at sun.nio.ch.SocketChannelImpl.checkConnect(Native Method)
> 	at sun.nio.ch.SocketChannelImpl.finishConnect(SocketChannelImpl.java:567)
> 	at org.apache.zookeeper.ClientCnxnSocketNIO.doTransport(ClientCnxnSocketNIO.java:264)
> 	at org.apache.zookeeper.ClientCnxn$SendThread.run(ClientCnxn.java:1041)
> {noformat} 

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (BOOKKEEPER-242) Bookkeeper not able to connect other zookeeper when shutdown the zookeeper server where the BK has connected.

Posted by "Ivan Kelly (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/BOOKKEEPER-242?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13270561#comment-13270561 ] 

Ivan Kelly commented on BOOKKEEPER-242:
---------------------------------------

Ah, i hadn't spotted there was already a patch. Could you change it to use StringUtils#join. I'll push it in then.
                
> Bookkeeper not able to connect other zookeeper when shutdown the zookeeper server where the BK has connected.
> -------------------------------------------------------------------------------------------------------------
>
>                 Key: BOOKKEEPER-242
>                 URL: https://issues.apache.org/jira/browse/BOOKKEEPER-242
>             Project: Bookkeeper
>          Issue Type: Bug
>          Components: bookkeeper-server
>    Affects Versions: 4.0.0
>            Reporter: surendra singh lilhore
>            Assignee: Sijie Guo
>            Priority: Blocker
>             Fix For: 4.1.0
>
>         Attachments: BK-242.diff
>
>
> Scenario : 
> 1. Start three zookeeper cluster.
> 2. start three bookKeeper.
> 3. shutdown zookeeper server where bookkeeper has connected.
> Expected Result:
> bookkeeper should be able to connect other zookeeper
> Actual Result :
> All three bookkeepers retry to connect zookeeper node which has been shutdown.
> BookKeeper log for Retry :
> {noformat} 
> 2012-04-25 13:35:15,319 - WARN  [main-EventThread:Bookie$2@456] - ZK client has been disconnected to the ZK server!
> 2012-04-25 13:35:17,194 - INFO  [main-SendThread(HOST-10-18-40-91:2181):ClientCnxn$SendThread@933] - Opening socket connection to server HOST-10-18-40-91/10.18.40.91:2181
> 2012-04-25 13:35:17,196 - WARN  [main-SendThread(HOST-10-18-40-91:2181):ClientCnxn$SendThread@1063] - Session 0x136e87b50ce0002 for server null, unexpected error, closing socket connection and attempting reconnect
> java.net.ConnectException: Connection refused
> 	at sun.nio.ch.SocketChannelImpl.checkConnect(Native Method)
> 	at sun.nio.ch.SocketChannelImpl.finishConnect(SocketChannelImpl.java:567)
> 	at org.apache.zookeeper.ClientCnxnSocketNIO.doTransport(ClientCnxnSocketNIO.java:264)
> 	at org.apache.zookeeper.ClientCnxn$SendThread.run(ClientCnxn.java:1041)
> 2012-04-25 13:35:19,125 - INFO  [main-SendThread(HOST-10-18-40-91:2181):ClientCnxn$SendThread@933] - Opening socket connection to server HOST-10-18-40-91/10.18.40.91:2181
> 2012-04-25 13:35:19,126 - WARN  [main-SendThread(HOST-10-18-40-91:2181):ClientCnxn$SendThread@1063] - Session 0x136e87b50ce0002 for server null, unexpected error, closing socket connection and attempting reconnect
> java.net.ConnectException: Connection refused
> 	at sun.nio.ch.SocketChannelImpl.checkConnect(Native Method)
> 	at sun.nio.ch.SocketChannelImpl.finishConnect(SocketChannelImpl.java:567)
> 	at org.apache.zookeeper.ClientCnxnSocketNIO.doTransport(ClientCnxnSocketNIO.java:264)
> 	at org.apache.zookeeper.ClientCnxn$SendThread.run(ClientCnxn.java:1041)
> 2012-04-25 13:35:20,276 - INFO  [main-SendThread(HOST-10-18-40-91:2181):ClientCnxn$SendThread@933] - Opening socket connection to server HOST-10-18-40-91/10.18.40.91:2181
> 2012-04-25 13:35:20,277 - WARN  [main-SendThread(HOST-10-18-40-91:2181):ClientCnxn$SendThread@1063] - Session 0x136e87b50ce0002 for server null, unexpected error, closing socket connection and attempting reconnect
> java.net.ConnectException: Connection refused
> 	at sun.nio.ch.SocketChannelImpl.checkConnect(Native Method)
> 	at sun.nio.ch.SocketChannelImpl.finishConnect(SocketChannelImpl.java:567)
> 	at org.apache.zookeeper.ClientCnxnSocketNIO.doTransport(ClientCnxnSocketNIO.java:264)
> 	at org.apache.zookeeper.ClientCnxn$SendThread.run(ClientCnxn.java:1041)
> {noformat} 

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (BOOKKEEPER-242) Bookkeeper not able to connect other zookeeper when shutdown the zookeeper server where the BK has connected.

Posted by "Rakesh R (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/BOOKKEEPER-242?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13270361#comment-13270361 ] 

Rakesh R commented on BOOKKEEPER-242:
-------------------------------------

@Sijie
*getString(ZK_SERVERS, null); is returning only the first server ip:port and ignoring values after the comma*

Say, configured as zkServers=zk1:2181,zk2:2181,zk3:2181
In ServerConfiguration, it is using getString(ZK_SERVERS, null) and returning only the first zk1:2181 and the same is passing to the ZK client. Here it is missing the other two 'zk2:2181,zk3:2181' values.
                
> Bookkeeper not able to connect other zookeeper when shutdown the zookeeper server where the BK has connected.
> -------------------------------------------------------------------------------------------------------------
>
>                 Key: BOOKKEEPER-242
>                 URL: https://issues.apache.org/jira/browse/BOOKKEEPER-242
>             Project: Bookkeeper
>          Issue Type: Bug
>          Components: bookkeeper-server
>    Affects Versions: 4.0.0
>            Reporter: surendra singh lilhore
>
> Scenario : 
> 1. Start three zookeeper cluster.
> 2. start three bookKeeper.
> 3. shutdown zookeeper server where bookkeeper has connected.
> Expected Result:
> bookkeeper should be able to connect other zookeeper
> Actual Result :
> All three bookkeepers retry to connect zookeeper node which has been shutdown.
> BookKeeper log for Retry :
> {noformat} 
> 2012-04-25 13:35:15,319 - WARN  [main-EventThread:Bookie$2@456] - ZK client has been disconnected to the ZK server!
> 2012-04-25 13:35:17,194 - INFO  [main-SendThread(HOST-10-18-40-91:2181):ClientCnxn$SendThread@933] - Opening socket connection to server HOST-10-18-40-91/10.18.40.91:2181
> 2012-04-25 13:35:17,196 - WARN  [main-SendThread(HOST-10-18-40-91:2181):ClientCnxn$SendThread@1063] - Session 0x136e87b50ce0002 for server null, unexpected error, closing socket connection and attempting reconnect
> java.net.ConnectException: Connection refused
> 	at sun.nio.ch.SocketChannelImpl.checkConnect(Native Method)
> 	at sun.nio.ch.SocketChannelImpl.finishConnect(SocketChannelImpl.java:567)
> 	at org.apache.zookeeper.ClientCnxnSocketNIO.doTransport(ClientCnxnSocketNIO.java:264)
> 	at org.apache.zookeeper.ClientCnxn$SendThread.run(ClientCnxn.java:1041)
> 2012-04-25 13:35:19,125 - INFO  [main-SendThread(HOST-10-18-40-91:2181):ClientCnxn$SendThread@933] - Opening socket connection to server HOST-10-18-40-91/10.18.40.91:2181
> 2012-04-25 13:35:19,126 - WARN  [main-SendThread(HOST-10-18-40-91:2181):ClientCnxn$SendThread@1063] - Session 0x136e87b50ce0002 for server null, unexpected error, closing socket connection and attempting reconnect
> java.net.ConnectException: Connection refused
> 	at sun.nio.ch.SocketChannelImpl.checkConnect(Native Method)
> 	at sun.nio.ch.SocketChannelImpl.finishConnect(SocketChannelImpl.java:567)
> 	at org.apache.zookeeper.ClientCnxnSocketNIO.doTransport(ClientCnxnSocketNIO.java:264)
> 	at org.apache.zookeeper.ClientCnxn$SendThread.run(ClientCnxn.java:1041)
> 2012-04-25 13:35:20,276 - INFO  [main-SendThread(HOST-10-18-40-91:2181):ClientCnxn$SendThread@933] - Opening socket connection to server HOST-10-18-40-91/10.18.40.91:2181
> 2012-04-25 13:35:20,277 - WARN  [main-SendThread(HOST-10-18-40-91:2181):ClientCnxn$SendThread@1063] - Session 0x136e87b50ce0002 for server null, unexpected error, closing socket connection and attempting reconnect
> java.net.ConnectException: Connection refused
> 	at sun.nio.ch.SocketChannelImpl.checkConnect(Native Method)
> 	at sun.nio.ch.SocketChannelImpl.finishConnect(SocketChannelImpl.java:567)
> 	at org.apache.zookeeper.ClientCnxnSocketNIO.doTransport(ClientCnxnSocketNIO.java:264)
> 	at org.apache.zookeeper.ClientCnxn$SendThread.run(ClientCnxn.java:1041)
> {noformat} 

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (BOOKKEEPER-242) Bookkeeper not able to connect other zookeeper when shutdown the zookeeper server where the BK has connected.

Posted by "Sijie Guo (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/BOOKKEEPER-242?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13270490#comment-13270490 ] 

Sijie Guo commented on BOOKKEEPER-242:
--------------------------------------

@Rakesh

Got it. Thanks for pointing out this issue.
                
> Bookkeeper not able to connect other zookeeper when shutdown the zookeeper server where the BK has connected.
> -------------------------------------------------------------------------------------------------------------
>
>                 Key: BOOKKEEPER-242
>                 URL: https://issues.apache.org/jira/browse/BOOKKEEPER-242
>             Project: Bookkeeper
>          Issue Type: Bug
>          Components: bookkeeper-server
>    Affects Versions: 4.0.0
>            Reporter: surendra singh lilhore
>
> Scenario : 
> 1. Start three zookeeper cluster.
> 2. start three bookKeeper.
> 3. shutdown zookeeper server where bookkeeper has connected.
> Expected Result:
> bookkeeper should be able to connect other zookeeper
> Actual Result :
> All three bookkeepers retry to connect zookeeper node which has been shutdown.
> BookKeeper log for Retry :
> {noformat} 
> 2012-04-25 13:35:15,319 - WARN  [main-EventThread:Bookie$2@456] - ZK client has been disconnected to the ZK server!
> 2012-04-25 13:35:17,194 - INFO  [main-SendThread(HOST-10-18-40-91:2181):ClientCnxn$SendThread@933] - Opening socket connection to server HOST-10-18-40-91/10.18.40.91:2181
> 2012-04-25 13:35:17,196 - WARN  [main-SendThread(HOST-10-18-40-91:2181):ClientCnxn$SendThread@1063] - Session 0x136e87b50ce0002 for server null, unexpected error, closing socket connection and attempting reconnect
> java.net.ConnectException: Connection refused
> 	at sun.nio.ch.SocketChannelImpl.checkConnect(Native Method)
> 	at sun.nio.ch.SocketChannelImpl.finishConnect(SocketChannelImpl.java:567)
> 	at org.apache.zookeeper.ClientCnxnSocketNIO.doTransport(ClientCnxnSocketNIO.java:264)
> 	at org.apache.zookeeper.ClientCnxn$SendThread.run(ClientCnxn.java:1041)
> 2012-04-25 13:35:19,125 - INFO  [main-SendThread(HOST-10-18-40-91:2181):ClientCnxn$SendThread@933] - Opening socket connection to server HOST-10-18-40-91/10.18.40.91:2181
> 2012-04-25 13:35:19,126 - WARN  [main-SendThread(HOST-10-18-40-91:2181):ClientCnxn$SendThread@1063] - Session 0x136e87b50ce0002 for server null, unexpected error, closing socket connection and attempting reconnect
> java.net.ConnectException: Connection refused
> 	at sun.nio.ch.SocketChannelImpl.checkConnect(Native Method)
> 	at sun.nio.ch.SocketChannelImpl.finishConnect(SocketChannelImpl.java:567)
> 	at org.apache.zookeeper.ClientCnxnSocketNIO.doTransport(ClientCnxnSocketNIO.java:264)
> 	at org.apache.zookeeper.ClientCnxn$SendThread.run(ClientCnxn.java:1041)
> 2012-04-25 13:35:20,276 - INFO  [main-SendThread(HOST-10-18-40-91:2181):ClientCnxn$SendThread@933] - Opening socket connection to server HOST-10-18-40-91/10.18.40.91:2181
> 2012-04-25 13:35:20,277 - WARN  [main-SendThread(HOST-10-18-40-91:2181):ClientCnxn$SendThread@1063] - Session 0x136e87b50ce0002 for server null, unexpected error, closing socket connection and attempting reconnect
> java.net.ConnectException: Connection refused
> 	at sun.nio.ch.SocketChannelImpl.checkConnect(Native Method)
> 	at sun.nio.ch.SocketChannelImpl.finishConnect(SocketChannelImpl.java:567)
> 	at org.apache.zookeeper.ClientCnxnSocketNIO.doTransport(ClientCnxnSocketNIO.java:264)
> 	at org.apache.zookeeper.ClientCnxn$SendThread.run(ClientCnxn.java:1041)
> {noformat} 

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (BOOKKEEPER-242) Bookkeeper not able to connect other zookeeper when shutdown the zookeeper server where the BK has connected.

Posted by "surendra singh lilhore (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/BOOKKEEPER-242?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

surendra singh lilhore updated BOOKKEEPER-242:
----------------------------------------------

    Description: 
Scenario : 
1. Start three zookeeper cluster.
2. start three bookKeeper.
3. shutdown zookeeper server where bookkeeper has connected.

Expected Result:
bookkeeper should be able to connect other zookeeper

Actual Result :
All three bookkeepers retry to connect zookeeper node which has been shutdown.



BookKeeper log for Retry :

{noformat} 
2012-04-25 13:35:15,319 - WARN  [main-EventThread:Bookie$2@456] - ZK client has been disconnected to the ZK server!
2012-04-25 13:35:17,194 - INFO  [main-SendThread(HOST-10-18-40-91:2181):ClientCnxn$SendThread@933] - Opening socket connection to server HOST-10-18-40-91/10.18.40.91:2181
2012-04-25 13:35:17,196 - WARN  [main-SendThread(HOST-10-18-40-91:2181):ClientCnxn$SendThread@1063] - Session 0x136e87b50ce0002 for server null, unexpected error, closing socket connection and attempting reconnect
java.net.ConnectException: Connection refused
	at sun.nio.ch.SocketChannelImpl.checkConnect(Native Method)
	at sun.nio.ch.SocketChannelImpl.finishConnect(SocketChannelImpl.java:567)
	at org.apache.zookeeper.ClientCnxnSocketNIO.doTransport(ClientCnxnSocketNIO.java:264)
	at org.apache.zookeeper.ClientCnxn$SendThread.run(ClientCnxn.java:1041)
2012-04-25 13:35:19,125 - INFO  [main-SendThread(HOST-10-18-40-91:2181):ClientCnxn$SendThread@933] - Opening socket connection to server HOST-10-18-40-91/10.18.40.91:2181
2012-04-25 13:35:19,126 - WARN  [main-SendThread(HOST-10-18-40-91:2181):ClientCnxn$SendThread@1063] - Session 0x136e87b50ce0002 for server null, unexpected error, closing socket connection and attempting reconnect
java.net.ConnectException: Connection refused
	at sun.nio.ch.SocketChannelImpl.checkConnect(Native Method)
	at sun.nio.ch.SocketChannelImpl.finishConnect(SocketChannelImpl.java:567)
	at org.apache.zookeeper.ClientCnxnSocketNIO.doTransport(ClientCnxnSocketNIO.java:264)
	at org.apache.zookeeper.ClientCnxn$SendThread.run(ClientCnxn.java:1041)
2012-04-25 13:35:20,276 - INFO  [main-SendThread(HOST-10-18-40-91:2181):ClientCnxn$SendThread@933] - Opening socket connection to server HOST-10-18-40-91/10.18.40.91:2181
2012-04-25 13:35:20,277 - WARN  [main-SendThread(HOST-10-18-40-91:2181):ClientCnxn$SendThread@1063] - Session 0x136e87b50ce0002 for server null, unexpected error, closing socket connection and attempting reconnect
java.net.ConnectException: Connection refused
	at sun.nio.ch.SocketChannelImpl.checkConnect(Native Method)
	at sun.nio.ch.SocketChannelImpl.finishConnect(SocketChannelImpl.java:567)
	at org.apache.zookeeper.ClientCnxnSocketNIO.doTransport(ClientCnxnSocketNIO.java:264)
	at org.apache.zookeeper.ClientCnxn$SendThread.run(ClientCnxn.java:1041)

{noformat} 

  was:
Scenario : 
1. Start three zookeeper cluster.
2. start three bookKeeper.
3. shutdown zookeeper server where bookkeeper has connected.

Expected Result:
bookkeeper should be able to connect other zookeeper

Actual Result :
All three bookkeepers retry to connect zookeeper node which has been shutdown.



BookKeeper log for Retry :
{noformat)
2012-04-25 13:35:15,319 - WARN  [main-EventThread:Bookie$2@456] - ZK client has been disconnected to the ZK server!
2012-04-25 13:35:17,194 - INFO  [main-SendThread(HOST-10-18-40-91:2181):ClientCnxn$SendThread@933] - Opening socket connection to server HOST-10-18-40-91/10.18.40.91:2181
2012-04-25 13:35:17,196 - WARN  [main-SendThread(HOST-10-18-40-91:2181):ClientCnxn$SendThread@1063] - Session 0x136e87b50ce0002 for server null, unexpected error, closing socket connection and attempting reconnect
java.net.ConnectException: Connection refused
	at sun.nio.ch.SocketChannelImpl.checkConnect(Native Method)
	at sun.nio.ch.SocketChannelImpl.finishConnect(SocketChannelImpl.java:567)
	at org.apache.zookeeper.ClientCnxnSocketNIO.doTransport(ClientCnxnSocketNIO.java:264)
	at org.apache.zookeeper.ClientCnxn$SendThread.run(ClientCnxn.java:1041)
2012-04-25 13:35:19,125 - INFO  [main-SendThread(HOST-10-18-40-91:2181):ClientCnxn$SendThread@933] - Opening socket connection to server HOST-10-18-40-91/10.18.40.91:2181
2012-04-25 13:35:19,126 - WARN  [main-SendThread(HOST-10-18-40-91:2181):ClientCnxn$SendThread@1063] - Session 0x136e87b50ce0002 for server null, unexpected error, closing socket connection and attempting reconnect
java.net.ConnectException: Connection refused
	at sun.nio.ch.SocketChannelImpl.checkConnect(Native Method)
	at sun.nio.ch.SocketChannelImpl.finishConnect(SocketChannelImpl.java:567)
	at org.apache.zookeeper.ClientCnxnSocketNIO.doTransport(ClientCnxnSocketNIO.java:264)
	at org.apache.zookeeper.ClientCnxn$SendThread.run(ClientCnxn.java:1041)
2012-04-25 13:35:20,276 - INFO  [main-SendThread(HOST-10-18-40-91:2181):ClientCnxn$SendThread@933] - Opening socket connection to server HOST-10-18-40-91/10.18.40.91:2181
2012-04-25 13:35:20,277 - WARN  [main-SendThread(HOST-10-18-40-91:2181):ClientCnxn$SendThread@1063] - Session 0x136e87b50ce0002 for server null, unexpected error, closing socket connection and attempting reconnect
java.net.ConnectException: Connection refused
	at sun.nio.ch.SocketChannelImpl.checkConnect(Native Method)
	at sun.nio.ch.SocketChannelImpl.finishConnect(SocketChannelImpl.java:567)
	at org.apache.zookeeper.ClientCnxnSocketNIO.doTransport(ClientCnxnSocketNIO.java:264)
	at org.apache.zookeeper.ClientCnxn$SendThread.run(ClientCnxn.java:1041)

{noformat}

    
> Bookkeeper not able to connect other zookeeper when shutdown the zookeeper server where the BK has connected.
> -------------------------------------------------------------------------------------------------------------
>
>                 Key: BOOKKEEPER-242
>                 URL: https://issues.apache.org/jira/browse/BOOKKEEPER-242
>             Project: Bookkeeper
>          Issue Type: Bug
>          Components: bookkeeper-server
>    Affects Versions: 4.0.0
>            Reporter: surendra singh lilhore
>
> Scenario : 
> 1. Start three zookeeper cluster.
> 2. start three bookKeeper.
> 3. shutdown zookeeper server where bookkeeper has connected.
> Expected Result:
> bookkeeper should be able to connect other zookeeper
> Actual Result :
> All three bookkeepers retry to connect zookeeper node which has been shutdown.
> BookKeeper log for Retry :
> {noformat} 
> 2012-04-25 13:35:15,319 - WARN  [main-EventThread:Bookie$2@456] - ZK client has been disconnected to the ZK server!
> 2012-04-25 13:35:17,194 - INFO  [main-SendThread(HOST-10-18-40-91:2181):ClientCnxn$SendThread@933] - Opening socket connection to server HOST-10-18-40-91/10.18.40.91:2181
> 2012-04-25 13:35:17,196 - WARN  [main-SendThread(HOST-10-18-40-91:2181):ClientCnxn$SendThread@1063] - Session 0x136e87b50ce0002 for server null, unexpected error, closing socket connection and attempting reconnect
> java.net.ConnectException: Connection refused
> 	at sun.nio.ch.SocketChannelImpl.checkConnect(Native Method)
> 	at sun.nio.ch.SocketChannelImpl.finishConnect(SocketChannelImpl.java:567)
> 	at org.apache.zookeeper.ClientCnxnSocketNIO.doTransport(ClientCnxnSocketNIO.java:264)
> 	at org.apache.zookeeper.ClientCnxn$SendThread.run(ClientCnxn.java:1041)
> 2012-04-25 13:35:19,125 - INFO  [main-SendThread(HOST-10-18-40-91:2181):ClientCnxn$SendThread@933] - Opening socket connection to server HOST-10-18-40-91/10.18.40.91:2181
> 2012-04-25 13:35:19,126 - WARN  [main-SendThread(HOST-10-18-40-91:2181):ClientCnxn$SendThread@1063] - Session 0x136e87b50ce0002 for server null, unexpected error, closing socket connection and attempting reconnect
> java.net.ConnectException: Connection refused
> 	at sun.nio.ch.SocketChannelImpl.checkConnect(Native Method)
> 	at sun.nio.ch.SocketChannelImpl.finishConnect(SocketChannelImpl.java:567)
> 	at org.apache.zookeeper.ClientCnxnSocketNIO.doTransport(ClientCnxnSocketNIO.java:264)
> 	at org.apache.zookeeper.ClientCnxn$SendThread.run(ClientCnxn.java:1041)
> 2012-04-25 13:35:20,276 - INFO  [main-SendThread(HOST-10-18-40-91:2181):ClientCnxn$SendThread@933] - Opening socket connection to server HOST-10-18-40-91/10.18.40.91:2181
> 2012-04-25 13:35:20,277 - WARN  [main-SendThread(HOST-10-18-40-91:2181):ClientCnxn$SendThread@1063] - Session 0x136e87b50ce0002 for server null, unexpected error, closing socket connection and attempting reconnect
> java.net.ConnectException: Connection refused
> 	at sun.nio.ch.SocketChannelImpl.checkConnect(Native Method)
> 	at sun.nio.ch.SocketChannelImpl.finishConnect(SocketChannelImpl.java:567)
> 	at org.apache.zookeeper.ClientCnxnSocketNIO.doTransport(ClientCnxnSocketNIO.java:264)
> 	at org.apache.zookeeper.ClientCnxn$SendThread.run(ClientCnxn.java:1041)
> {noformat} 

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (BOOKKEEPER-242) Bookkeeper not able to connect other zookeeper when shutdown the zookeeper server where the BK has connected.

Posted by "Rakesh R (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/BOOKKEEPER-242?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13270344#comment-13270344 ] 

Rakesh R commented on BOOKKEEPER-242:
-------------------------------------

ServerConfiguration is a type of 'org.apache.commons.configuration.CompositeConfiguration' and for parsing the list of comma separated values, we need to use config.getStringArray() or config.getList(). 

But it is using getString() and I think that is the reason not retrying to the cluster when the connected ZK is down. From the logs, its trying only HOST-10-18-40-91/10.18.40.91:2181

{noformat}
    public String getZkServers() {
        return getString(ZK_SERVERS, null);
    }
{noformat}


-Rakesh
                
> Bookkeeper not able to connect other zookeeper when shutdown the zookeeper server where the BK has connected.
> -------------------------------------------------------------------------------------------------------------
>
>                 Key: BOOKKEEPER-242
>                 URL: https://issues.apache.org/jira/browse/BOOKKEEPER-242
>             Project: Bookkeeper
>          Issue Type: Bug
>          Components: bookkeeper-server
>    Affects Versions: 4.0.0
>            Reporter: surendra singh lilhore
>
> Scenario : 
> 1. Start three zookeeper cluster.
> 2. start three bookKeeper.
> 3. shutdown zookeeper server where bookkeeper has connected.
> Expected Result:
> bookkeeper should be able to connect other zookeeper
> Actual Result :
> All three bookkeepers retry to connect zookeeper node which has been shutdown.
> BookKeeper log for Retry :
> {noformat} 
> 2012-04-25 13:35:15,319 - WARN  [main-EventThread:Bookie$2@456] - ZK client has been disconnected to the ZK server!
> 2012-04-25 13:35:17,194 - INFO  [main-SendThread(HOST-10-18-40-91:2181):ClientCnxn$SendThread@933] - Opening socket connection to server HOST-10-18-40-91/10.18.40.91:2181
> 2012-04-25 13:35:17,196 - WARN  [main-SendThread(HOST-10-18-40-91:2181):ClientCnxn$SendThread@1063] - Session 0x136e87b50ce0002 for server null, unexpected error, closing socket connection and attempting reconnect
> java.net.ConnectException: Connection refused
> 	at sun.nio.ch.SocketChannelImpl.checkConnect(Native Method)
> 	at sun.nio.ch.SocketChannelImpl.finishConnect(SocketChannelImpl.java:567)
> 	at org.apache.zookeeper.ClientCnxnSocketNIO.doTransport(ClientCnxnSocketNIO.java:264)
> 	at org.apache.zookeeper.ClientCnxn$SendThread.run(ClientCnxn.java:1041)
> 2012-04-25 13:35:19,125 - INFO  [main-SendThread(HOST-10-18-40-91:2181):ClientCnxn$SendThread@933] - Opening socket connection to server HOST-10-18-40-91/10.18.40.91:2181
> 2012-04-25 13:35:19,126 - WARN  [main-SendThread(HOST-10-18-40-91:2181):ClientCnxn$SendThread@1063] - Session 0x136e87b50ce0002 for server null, unexpected error, closing socket connection and attempting reconnect
> java.net.ConnectException: Connection refused
> 	at sun.nio.ch.SocketChannelImpl.checkConnect(Native Method)
> 	at sun.nio.ch.SocketChannelImpl.finishConnect(SocketChannelImpl.java:567)
> 	at org.apache.zookeeper.ClientCnxnSocketNIO.doTransport(ClientCnxnSocketNIO.java:264)
> 	at org.apache.zookeeper.ClientCnxn$SendThread.run(ClientCnxn.java:1041)
> 2012-04-25 13:35:20,276 - INFO  [main-SendThread(HOST-10-18-40-91:2181):ClientCnxn$SendThread@933] - Opening socket connection to server HOST-10-18-40-91/10.18.40.91:2181
> 2012-04-25 13:35:20,277 - WARN  [main-SendThread(HOST-10-18-40-91:2181):ClientCnxn$SendThread@1063] - Session 0x136e87b50ce0002 for server null, unexpected error, closing socket connection and attempting reconnect
> java.net.ConnectException: Connection refused
> 	at sun.nio.ch.SocketChannelImpl.checkConnect(Native Method)
> 	at sun.nio.ch.SocketChannelImpl.finishConnect(SocketChannelImpl.java:567)
> 	at org.apache.zookeeper.ClientCnxnSocketNIO.doTransport(ClientCnxnSocketNIO.java:264)
> 	at org.apache.zookeeper.ClientCnxn$SendThread.run(ClientCnxn.java:1041)
> {noformat} 

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (BOOKKEEPER-242) Bookkeeper not able to connect other zookeeper when shutdown the zookeeper server where the BK has connected.

Posted by "Hudson (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/BOOKKEEPER-242?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13271217#comment-13271217 ] 

Hudson commented on BOOKKEEPER-242:
-----------------------------------

Integrated in bookkeeper-trunk #497 (See [https://builds.apache.org/job/bookkeeper-trunk/497/])
    BOOKKEEPER-242: Bookkeeper not able to connect other zookeeper when shutdown the zookeeper server where the BK has connected. (sijie & rakeshr via ivank) (Revision 1335973)

     Result = SUCCESS
ivank : 
Files : 
* /zookeeper/bookkeeper/trunk/CHANGES.txt
* /zookeeper/bookkeeper/trunk/bookkeeper-server/src/main/java/org/apache/bookkeeper/conf/ClientConfiguration.java
* /zookeeper/bookkeeper/trunk/bookkeeper-server/src/main/java/org/apache/bookkeeper/conf/ServerConfiguration.java
* /zookeeper/bookkeeper/trunk/bookkeeper-server/src/test/java/org/apache/bookkeeper/test/ConfigurationTest.java

                
> Bookkeeper not able to connect other zookeeper when shutdown the zookeeper server where the BK has connected.
> -------------------------------------------------------------------------------------------------------------
>
>                 Key: BOOKKEEPER-242
>                 URL: https://issues.apache.org/jira/browse/BOOKKEEPER-242
>             Project: Bookkeeper
>          Issue Type: Bug
>          Components: bookkeeper-server
>    Affects Versions: 4.0.0
>            Reporter: surendra singh lilhore
>            Assignee: Sijie Guo
>            Priority: Blocker
>             Fix For: 4.1.0
>
>         Attachments: BK-242.diff, BK-242.diff_v2
>
>
> Scenario : 
> 1. Start three zookeeper cluster.
> 2. start three bookKeeper.
> 3. shutdown zookeeper server where bookkeeper has connected.
> Expected Result:
> bookkeeper should be able to connect other zookeeper
> Actual Result :
> All three bookkeepers retry to connect zookeeper node which has been shutdown.
> BookKeeper log for Retry :
> {noformat} 
> 2012-04-25 13:35:15,319 - WARN  [main-EventThread:Bookie$2@456] - ZK client has been disconnected to the ZK server!
> 2012-04-25 13:35:17,194 - INFO  [main-SendThread(HOST-10-18-40-91:2181):ClientCnxn$SendThread@933] - Opening socket connection to server HOST-10-18-40-91/10.18.40.91:2181
> 2012-04-25 13:35:17,196 - WARN  [main-SendThread(HOST-10-18-40-91:2181):ClientCnxn$SendThread@1063] - Session 0x136e87b50ce0002 for server null, unexpected error, closing socket connection and attempting reconnect
> java.net.ConnectException: Connection refused
> 	at sun.nio.ch.SocketChannelImpl.checkConnect(Native Method)
> 	at sun.nio.ch.SocketChannelImpl.finishConnect(SocketChannelImpl.java:567)
> 	at org.apache.zookeeper.ClientCnxnSocketNIO.doTransport(ClientCnxnSocketNIO.java:264)
> 	at org.apache.zookeeper.ClientCnxn$SendThread.run(ClientCnxn.java:1041)
> 2012-04-25 13:35:19,125 - INFO  [main-SendThread(HOST-10-18-40-91:2181):ClientCnxn$SendThread@933] - Opening socket connection to server HOST-10-18-40-91/10.18.40.91:2181
> 2012-04-25 13:35:19,126 - WARN  [main-SendThread(HOST-10-18-40-91:2181):ClientCnxn$SendThread@1063] - Session 0x136e87b50ce0002 for server null, unexpected error, closing socket connection and attempting reconnect
> java.net.ConnectException: Connection refused
> 	at sun.nio.ch.SocketChannelImpl.checkConnect(Native Method)
> 	at sun.nio.ch.SocketChannelImpl.finishConnect(SocketChannelImpl.java:567)
> 	at org.apache.zookeeper.ClientCnxnSocketNIO.doTransport(ClientCnxnSocketNIO.java:264)
> 	at org.apache.zookeeper.ClientCnxn$SendThread.run(ClientCnxn.java:1041)
> 2012-04-25 13:35:20,276 - INFO  [main-SendThread(HOST-10-18-40-91:2181):ClientCnxn$SendThread@933] - Opening socket connection to server HOST-10-18-40-91/10.18.40.91:2181
> 2012-04-25 13:35:20,277 - WARN  [main-SendThread(HOST-10-18-40-91:2181):ClientCnxn$SendThread@1063] - Session 0x136e87b50ce0002 for server null, unexpected error, closing socket connection and attempting reconnect
> java.net.ConnectException: Connection refused
> 	at sun.nio.ch.SocketChannelImpl.checkConnect(Native Method)
> 	at sun.nio.ch.SocketChannelImpl.finishConnect(SocketChannelImpl.java:567)
> 	at org.apache.zookeeper.ClientCnxnSocketNIO.doTransport(ClientCnxnSocketNIO.java:264)
> 	at org.apache.zookeeper.ClientCnxn$SendThread.run(ClientCnxn.java:1041)
> {noformat} 

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (BOOKKEEPER-242) Bookkeeper not able to connect other zookeeper when shutdown the zookeeper server where the BK has connected.

Posted by "Sijie Guo (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/BOOKKEEPER-242?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Sijie Guo updated BOOKKEEPER-242:
---------------------------------

    Attachment: BK-242.diff

attach a patch to fix getZkServers issue. thanks Rakesh for help.
                
> Bookkeeper not able to connect other zookeeper when shutdown the zookeeper server where the BK has connected.
> -------------------------------------------------------------------------------------------------------------
>
>                 Key: BOOKKEEPER-242
>                 URL: https://issues.apache.org/jira/browse/BOOKKEEPER-242
>             Project: Bookkeeper
>          Issue Type: Bug
>          Components: bookkeeper-server
>    Affects Versions: 4.0.0
>            Reporter: surendra singh lilhore
>             Fix For: 4.1.0
>
>         Attachments: BK-242.diff
>
>
> Scenario : 
> 1. Start three zookeeper cluster.
> 2. start three bookKeeper.
> 3. shutdown zookeeper server where bookkeeper has connected.
> Expected Result:
> bookkeeper should be able to connect other zookeeper
> Actual Result :
> All three bookkeepers retry to connect zookeeper node which has been shutdown.
> BookKeeper log for Retry :
> {noformat} 
> 2012-04-25 13:35:15,319 - WARN  [main-EventThread:Bookie$2@456] - ZK client has been disconnected to the ZK server!
> 2012-04-25 13:35:17,194 - INFO  [main-SendThread(HOST-10-18-40-91:2181):ClientCnxn$SendThread@933] - Opening socket connection to server HOST-10-18-40-91/10.18.40.91:2181
> 2012-04-25 13:35:17,196 - WARN  [main-SendThread(HOST-10-18-40-91:2181):ClientCnxn$SendThread@1063] - Session 0x136e87b50ce0002 for server null, unexpected error, closing socket connection and attempting reconnect
> java.net.ConnectException: Connection refused
> 	at sun.nio.ch.SocketChannelImpl.checkConnect(Native Method)
> 	at sun.nio.ch.SocketChannelImpl.finishConnect(SocketChannelImpl.java:567)
> 	at org.apache.zookeeper.ClientCnxnSocketNIO.doTransport(ClientCnxnSocketNIO.java:264)
> 	at org.apache.zookeeper.ClientCnxn$SendThread.run(ClientCnxn.java:1041)
> 2012-04-25 13:35:19,125 - INFO  [main-SendThread(HOST-10-18-40-91:2181):ClientCnxn$SendThread@933] - Opening socket connection to server HOST-10-18-40-91/10.18.40.91:2181
> 2012-04-25 13:35:19,126 - WARN  [main-SendThread(HOST-10-18-40-91:2181):ClientCnxn$SendThread@1063] - Session 0x136e87b50ce0002 for server null, unexpected error, closing socket connection and attempting reconnect
> java.net.ConnectException: Connection refused
> 	at sun.nio.ch.SocketChannelImpl.checkConnect(Native Method)
> 	at sun.nio.ch.SocketChannelImpl.finishConnect(SocketChannelImpl.java:567)
> 	at org.apache.zookeeper.ClientCnxnSocketNIO.doTransport(ClientCnxnSocketNIO.java:264)
> 	at org.apache.zookeeper.ClientCnxn$SendThread.run(ClientCnxn.java:1041)
> 2012-04-25 13:35:20,276 - INFO  [main-SendThread(HOST-10-18-40-91:2181):ClientCnxn$SendThread@933] - Opening socket connection to server HOST-10-18-40-91/10.18.40.91:2181
> 2012-04-25 13:35:20,277 - WARN  [main-SendThread(HOST-10-18-40-91:2181):ClientCnxn$SendThread@1063] - Session 0x136e87b50ce0002 for server null, unexpected error, closing socket connection and attempting reconnect
> java.net.ConnectException: Connection refused
> 	at sun.nio.ch.SocketChannelImpl.checkConnect(Native Method)
> 	at sun.nio.ch.SocketChannelImpl.finishConnect(SocketChannelImpl.java:567)
> 	at org.apache.zookeeper.ClientCnxnSocketNIO.doTransport(ClientCnxnSocketNIO.java:264)
> 	at org.apache.zookeeper.ClientCnxn$SendThread.run(ClientCnxn.java:1041)
> {noformat} 

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (BOOKKEEPER-242) Bookkeeper not able to connect other zookeeper when shutdown the zookeeper server where the BK has connected.

Posted by "Rakesh R (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/BOOKKEEPER-242?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13270520#comment-13270520 ] 

Rakesh R commented on BOOKKEEPER-242:
-------------------------------------

Hi Sijie, I have few suggestions:


*comment-1)* getStringArray() internally using getList() and preparing array of string. Instead can we directly use getList()?


*comment-2)*
{noformat}
+            sb.append(servers[i]);
+            if (i < servers.length - 1) {
+                sb.append(",");
+            }
{noformat}

instead of this can we use like, 

{noformat}
  if( sb.length() > 0 ){
     sb.append(",");
  }
  sb.append(servers[i]);
{noformat}

-Rakesh
                
> Bookkeeper not able to connect other zookeeper when shutdown the zookeeper server where the BK has connected.
> -------------------------------------------------------------------------------------------------------------
>
>                 Key: BOOKKEEPER-242
>                 URL: https://issues.apache.org/jira/browse/BOOKKEEPER-242
>             Project: Bookkeeper
>          Issue Type: Bug
>          Components: bookkeeper-server
>    Affects Versions: 4.0.0
>            Reporter: surendra singh lilhore
>            Assignee: Sijie Guo
>             Fix For: 4.1.0
>
>         Attachments: BK-242.diff
>
>
> Scenario : 
> 1. Start three zookeeper cluster.
> 2. start three bookKeeper.
> 3. shutdown zookeeper server where bookkeeper has connected.
> Expected Result:
> bookkeeper should be able to connect other zookeeper
> Actual Result :
> All three bookkeepers retry to connect zookeeper node which has been shutdown.
> BookKeeper log for Retry :
> {noformat} 
> 2012-04-25 13:35:15,319 - WARN  [main-EventThread:Bookie$2@456] - ZK client has been disconnected to the ZK server!
> 2012-04-25 13:35:17,194 - INFO  [main-SendThread(HOST-10-18-40-91:2181):ClientCnxn$SendThread@933] - Opening socket connection to server HOST-10-18-40-91/10.18.40.91:2181
> 2012-04-25 13:35:17,196 - WARN  [main-SendThread(HOST-10-18-40-91:2181):ClientCnxn$SendThread@1063] - Session 0x136e87b50ce0002 for server null, unexpected error, closing socket connection and attempting reconnect
> java.net.ConnectException: Connection refused
> 	at sun.nio.ch.SocketChannelImpl.checkConnect(Native Method)
> 	at sun.nio.ch.SocketChannelImpl.finishConnect(SocketChannelImpl.java:567)
> 	at org.apache.zookeeper.ClientCnxnSocketNIO.doTransport(ClientCnxnSocketNIO.java:264)
> 	at org.apache.zookeeper.ClientCnxn$SendThread.run(ClientCnxn.java:1041)
> 2012-04-25 13:35:19,125 - INFO  [main-SendThread(HOST-10-18-40-91:2181):ClientCnxn$SendThread@933] - Opening socket connection to server HOST-10-18-40-91/10.18.40.91:2181
> 2012-04-25 13:35:19,126 - WARN  [main-SendThread(HOST-10-18-40-91:2181):ClientCnxn$SendThread@1063] - Session 0x136e87b50ce0002 for server null, unexpected error, closing socket connection and attempting reconnect
> java.net.ConnectException: Connection refused
> 	at sun.nio.ch.SocketChannelImpl.checkConnect(Native Method)
> 	at sun.nio.ch.SocketChannelImpl.finishConnect(SocketChannelImpl.java:567)
> 	at org.apache.zookeeper.ClientCnxnSocketNIO.doTransport(ClientCnxnSocketNIO.java:264)
> 	at org.apache.zookeeper.ClientCnxn$SendThread.run(ClientCnxn.java:1041)
> 2012-04-25 13:35:20,276 - INFO  [main-SendThread(HOST-10-18-40-91:2181):ClientCnxn$SendThread@933] - Opening socket connection to server HOST-10-18-40-91/10.18.40.91:2181
> 2012-04-25 13:35:20,277 - WARN  [main-SendThread(HOST-10-18-40-91:2181):ClientCnxn$SendThread@1063] - Session 0x136e87b50ce0002 for server null, unexpected error, closing socket connection and attempting reconnect
> java.net.ConnectException: Connection refused
> 	at sun.nio.ch.SocketChannelImpl.checkConnect(Native Method)
> 	at sun.nio.ch.SocketChannelImpl.finishConnect(SocketChannelImpl.java:567)
> 	at org.apache.zookeeper.ClientCnxnSocketNIO.doTransport(ClientCnxnSocketNIO.java:264)
> 	at org.apache.zookeeper.ClientCnxn$SendThread.run(ClientCnxn.java:1041)
> {noformat} 

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (BOOKKEEPER-242) Bookkeeper not able to connect other zookeeper when shutdown the zookeeper server where the BK has connected.

Posted by "Sijie Guo (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/BOOKKEEPER-242?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13270353#comment-13270353 ] 

Sijie Guo commented on BOOKKEEPER-242:
--------------------------------------

@Rakesh

I don't think we need to parse the list of comma separated values. because, ZooKeeper client would handle it when constructing a ZooKeeper object. 

http://zookeeper.apache.org/doc/r3.4.3/api/org/apache/zookeeper/ZooKeeper.html#ZooKeeper(java.lang.String, int, org.apache.zookeeper.Watcher) 

@surendra

could you tell more about your configuration about ZK_SERVERS ?


                
> Bookkeeper not able to connect other zookeeper when shutdown the zookeeper server where the BK has connected.
> -------------------------------------------------------------------------------------------------------------
>
>                 Key: BOOKKEEPER-242
>                 URL: https://issues.apache.org/jira/browse/BOOKKEEPER-242
>             Project: Bookkeeper
>          Issue Type: Bug
>          Components: bookkeeper-server
>    Affects Versions: 4.0.0
>            Reporter: surendra singh lilhore
>
> Scenario : 
> 1. Start three zookeeper cluster.
> 2. start three bookKeeper.
> 3. shutdown zookeeper server where bookkeeper has connected.
> Expected Result:
> bookkeeper should be able to connect other zookeeper
> Actual Result :
> All three bookkeepers retry to connect zookeeper node which has been shutdown.
> BookKeeper log for Retry :
> {noformat} 
> 2012-04-25 13:35:15,319 - WARN  [main-EventThread:Bookie$2@456] - ZK client has been disconnected to the ZK server!
> 2012-04-25 13:35:17,194 - INFO  [main-SendThread(HOST-10-18-40-91:2181):ClientCnxn$SendThread@933] - Opening socket connection to server HOST-10-18-40-91/10.18.40.91:2181
> 2012-04-25 13:35:17,196 - WARN  [main-SendThread(HOST-10-18-40-91:2181):ClientCnxn$SendThread@1063] - Session 0x136e87b50ce0002 for server null, unexpected error, closing socket connection and attempting reconnect
> java.net.ConnectException: Connection refused
> 	at sun.nio.ch.SocketChannelImpl.checkConnect(Native Method)
> 	at sun.nio.ch.SocketChannelImpl.finishConnect(SocketChannelImpl.java:567)
> 	at org.apache.zookeeper.ClientCnxnSocketNIO.doTransport(ClientCnxnSocketNIO.java:264)
> 	at org.apache.zookeeper.ClientCnxn$SendThread.run(ClientCnxn.java:1041)
> 2012-04-25 13:35:19,125 - INFO  [main-SendThread(HOST-10-18-40-91:2181):ClientCnxn$SendThread@933] - Opening socket connection to server HOST-10-18-40-91/10.18.40.91:2181
> 2012-04-25 13:35:19,126 - WARN  [main-SendThread(HOST-10-18-40-91:2181):ClientCnxn$SendThread@1063] - Session 0x136e87b50ce0002 for server null, unexpected error, closing socket connection and attempting reconnect
> java.net.ConnectException: Connection refused
> 	at sun.nio.ch.SocketChannelImpl.checkConnect(Native Method)
> 	at sun.nio.ch.SocketChannelImpl.finishConnect(SocketChannelImpl.java:567)
> 	at org.apache.zookeeper.ClientCnxnSocketNIO.doTransport(ClientCnxnSocketNIO.java:264)
> 	at org.apache.zookeeper.ClientCnxn$SendThread.run(ClientCnxn.java:1041)
> 2012-04-25 13:35:20,276 - INFO  [main-SendThread(HOST-10-18-40-91:2181):ClientCnxn$SendThread@933] - Opening socket connection to server HOST-10-18-40-91/10.18.40.91:2181
> 2012-04-25 13:35:20,277 - WARN  [main-SendThread(HOST-10-18-40-91:2181):ClientCnxn$SendThread@1063] - Session 0x136e87b50ce0002 for server null, unexpected error, closing socket connection and attempting reconnect
> java.net.ConnectException: Connection refused
> 	at sun.nio.ch.SocketChannelImpl.checkConnect(Native Method)
> 	at sun.nio.ch.SocketChannelImpl.finishConnect(SocketChannelImpl.java:567)
> 	at org.apache.zookeeper.ClientCnxnSocketNIO.doTransport(ClientCnxnSocketNIO.java:264)
> 	at org.apache.zookeeper.ClientCnxn$SendThread.run(ClientCnxn.java:1041)
> {noformat} 

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (BOOKKEEPER-242) Bookkeeper not able to connect other zookeeper when shutdown the zookeeper server where the BK has connected.

Posted by "surendra singh lilhore (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/BOOKKEEPER-242?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13270376#comment-13270376 ] 

surendra singh lilhore commented on BOOKKEEPER-242:
---------------------------------------------------

Thanks for looking into this.

@Sijie
I have 3 ZK servers and configured like:
zkServers=10.18.40.155:2181,10.18.40.155:2182,10.18.40.155:2183

-Surendra
                
> Bookkeeper not able to connect other zookeeper when shutdown the zookeeper server where the BK has connected.
> -------------------------------------------------------------------------------------------------------------
>
>                 Key: BOOKKEEPER-242
>                 URL: https://issues.apache.org/jira/browse/BOOKKEEPER-242
>             Project: Bookkeeper
>          Issue Type: Bug
>          Components: bookkeeper-server
>    Affects Versions: 4.0.0
>            Reporter: surendra singh lilhore
>
> Scenario : 
> 1. Start three zookeeper cluster.
> 2. start three bookKeeper.
> 3. shutdown zookeeper server where bookkeeper has connected.
> Expected Result:
> bookkeeper should be able to connect other zookeeper
> Actual Result :
> All three bookkeepers retry to connect zookeeper node which has been shutdown.
> BookKeeper log for Retry :
> {noformat} 
> 2012-04-25 13:35:15,319 - WARN  [main-EventThread:Bookie$2@456] - ZK client has been disconnected to the ZK server!
> 2012-04-25 13:35:17,194 - INFO  [main-SendThread(HOST-10-18-40-91:2181):ClientCnxn$SendThread@933] - Opening socket connection to server HOST-10-18-40-91/10.18.40.91:2181
> 2012-04-25 13:35:17,196 - WARN  [main-SendThread(HOST-10-18-40-91:2181):ClientCnxn$SendThread@1063] - Session 0x136e87b50ce0002 for server null, unexpected error, closing socket connection and attempting reconnect
> java.net.ConnectException: Connection refused
> 	at sun.nio.ch.SocketChannelImpl.checkConnect(Native Method)
> 	at sun.nio.ch.SocketChannelImpl.finishConnect(SocketChannelImpl.java:567)
> 	at org.apache.zookeeper.ClientCnxnSocketNIO.doTransport(ClientCnxnSocketNIO.java:264)
> 	at org.apache.zookeeper.ClientCnxn$SendThread.run(ClientCnxn.java:1041)
> 2012-04-25 13:35:19,125 - INFO  [main-SendThread(HOST-10-18-40-91:2181):ClientCnxn$SendThread@933] - Opening socket connection to server HOST-10-18-40-91/10.18.40.91:2181
> 2012-04-25 13:35:19,126 - WARN  [main-SendThread(HOST-10-18-40-91:2181):ClientCnxn$SendThread@1063] - Session 0x136e87b50ce0002 for server null, unexpected error, closing socket connection and attempting reconnect
> java.net.ConnectException: Connection refused
> 	at sun.nio.ch.SocketChannelImpl.checkConnect(Native Method)
> 	at sun.nio.ch.SocketChannelImpl.finishConnect(SocketChannelImpl.java:567)
> 	at org.apache.zookeeper.ClientCnxnSocketNIO.doTransport(ClientCnxnSocketNIO.java:264)
> 	at org.apache.zookeeper.ClientCnxn$SendThread.run(ClientCnxn.java:1041)
> 2012-04-25 13:35:20,276 - INFO  [main-SendThread(HOST-10-18-40-91:2181):ClientCnxn$SendThread@933] - Opening socket connection to server HOST-10-18-40-91/10.18.40.91:2181
> 2012-04-25 13:35:20,277 - WARN  [main-SendThread(HOST-10-18-40-91:2181):ClientCnxn$SendThread@1063] - Session 0x136e87b50ce0002 for server null, unexpected error, closing socket connection and attempting reconnect
> java.net.ConnectException: Connection refused
> 	at sun.nio.ch.SocketChannelImpl.checkConnect(Native Method)
> 	at sun.nio.ch.SocketChannelImpl.finishConnect(SocketChannelImpl.java:567)
> 	at org.apache.zookeeper.ClientCnxnSocketNIO.doTransport(ClientCnxnSocketNIO.java:264)
> 	at org.apache.zookeeper.ClientCnxn$SendThread.run(ClientCnxn.java:1041)
> {noformat} 

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (BOOKKEEPER-242) Bookkeeper not able to connect other zookeeper when shutdown the zookeeper server where the BK has connected.

Posted by "Rakesh R (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/BOOKKEEPER-242?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13271089#comment-13271089 ] 

Rakesh R commented on BOOKKEEPER-242:
-------------------------------------

Yeah Ivan, StringUtils.join(servers, ',') would do the stuff and pretty simple.

Also, its good practise(improve readability) to provide message in test assertions like, assertEquals( message, expected, actual)
                
> Bookkeeper not able to connect other zookeeper when shutdown the zookeeper server where the BK has connected.
> -------------------------------------------------------------------------------------------------------------
>
>                 Key: BOOKKEEPER-242
>                 URL: https://issues.apache.org/jira/browse/BOOKKEEPER-242
>             Project: Bookkeeper
>          Issue Type: Bug
>          Components: bookkeeper-server
>    Affects Versions: 4.0.0
>            Reporter: surendra singh lilhore
>            Assignee: Sijie Guo
>            Priority: Blocker
>             Fix For: 4.1.0
>
>         Attachments: BK-242.diff
>
>
> Scenario : 
> 1. Start three zookeeper cluster.
> 2. start three bookKeeper.
> 3. shutdown zookeeper server where bookkeeper has connected.
> Expected Result:
> bookkeeper should be able to connect other zookeeper
> Actual Result :
> All three bookkeepers retry to connect zookeeper node which has been shutdown.
> BookKeeper log for Retry :
> {noformat} 
> 2012-04-25 13:35:15,319 - WARN  [main-EventThread:Bookie$2@456] - ZK client has been disconnected to the ZK server!
> 2012-04-25 13:35:17,194 - INFO  [main-SendThread(HOST-10-18-40-91:2181):ClientCnxn$SendThread@933] - Opening socket connection to server HOST-10-18-40-91/10.18.40.91:2181
> 2012-04-25 13:35:17,196 - WARN  [main-SendThread(HOST-10-18-40-91:2181):ClientCnxn$SendThread@1063] - Session 0x136e87b50ce0002 for server null, unexpected error, closing socket connection and attempting reconnect
> java.net.ConnectException: Connection refused
> 	at sun.nio.ch.SocketChannelImpl.checkConnect(Native Method)
> 	at sun.nio.ch.SocketChannelImpl.finishConnect(SocketChannelImpl.java:567)
> 	at org.apache.zookeeper.ClientCnxnSocketNIO.doTransport(ClientCnxnSocketNIO.java:264)
> 	at org.apache.zookeeper.ClientCnxn$SendThread.run(ClientCnxn.java:1041)
> 2012-04-25 13:35:19,125 - INFO  [main-SendThread(HOST-10-18-40-91:2181):ClientCnxn$SendThread@933] - Opening socket connection to server HOST-10-18-40-91/10.18.40.91:2181
> 2012-04-25 13:35:19,126 - WARN  [main-SendThread(HOST-10-18-40-91:2181):ClientCnxn$SendThread@1063] - Session 0x136e87b50ce0002 for server null, unexpected error, closing socket connection and attempting reconnect
> java.net.ConnectException: Connection refused
> 	at sun.nio.ch.SocketChannelImpl.checkConnect(Native Method)
> 	at sun.nio.ch.SocketChannelImpl.finishConnect(SocketChannelImpl.java:567)
> 	at org.apache.zookeeper.ClientCnxnSocketNIO.doTransport(ClientCnxnSocketNIO.java:264)
> 	at org.apache.zookeeper.ClientCnxn$SendThread.run(ClientCnxn.java:1041)
> 2012-04-25 13:35:20,276 - INFO  [main-SendThread(HOST-10-18-40-91:2181):ClientCnxn$SendThread@933] - Opening socket connection to server HOST-10-18-40-91/10.18.40.91:2181
> 2012-04-25 13:35:20,277 - WARN  [main-SendThread(HOST-10-18-40-91:2181):ClientCnxn$SendThread@1063] - Session 0x136e87b50ce0002 for server null, unexpected error, closing socket connection and attempting reconnect
> java.net.ConnectException: Connection refused
> 	at sun.nio.ch.SocketChannelImpl.checkConnect(Native Method)
> 	at sun.nio.ch.SocketChannelImpl.finishConnect(SocketChannelImpl.java:567)
> 	at org.apache.zookeeper.ClientCnxnSocketNIO.doTransport(ClientCnxnSocketNIO.java:264)
> 	at org.apache.zookeeper.ClientCnxn$SendThread.run(ClientCnxn.java:1041)
> {noformat} 

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira