You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@curator.apache.org by Benjamin Jaton <be...@gmail.com> on 2016/11/23 20:03:40 UTC
Curator and ReadOnly
Hello,
Before I open a new JIRA for this, I wanted to bring it up here first.
Basically the issue I'm seeing is that the read requests fail when
connecting to a read only ensemble.
I made a test for this using TestingCluster, but it requires to set
iptables rules in order to mimic a real (remote) read-only ensemble. The
test will do this:
1) start a TestingCluster
2) stop 2 of the 3 nodes
3) user has to run the iptables commands (specified in the logs)
4) a read request is issued every 3 seconds
All the read requests block for approx 2 minutes, then they all throw an
exception (ConnectionLoss).
I was wondering if other users were using Curator with a read only ensemble?
Thanks
Benjamin
Re: Curator and ReadOnly
Posted by Cameron McKenzie <mc...@gmail.com>.
Ok, thanks, can you raise a JIRA and attach your unit tests?
On Thu, Nov 24, 2016 at 9:33 AM, Benjamin Jaton <be...@gmail.com>
wrote:
> I have made a version of it using the ZK API explicitly and it does work.
>
> On Wed, Nov 23, 2016 at 2:15 PM, Cameron McKenzie <mc...@gmail.com>
> wrote:
>
>> Thanks. Is it possible to rerun the test using a raw ZookeeperClient
>> instead of a CuratorFramework?
>>
>> On Thu, Nov 24, 2016 at 9:14 AM, Benjamin Jaton <benjamin.jaton@gmail.com
>> > wrote:
>>
>>> $ telnet localhost 60422
>>> Trying 127.0.0.1...
>>> Connected to localhost.
>>> Escape character is '^]'.
>>> ruok
>>> imokConnection closed by foreign host.
>>>
>>>
>>> $ telnet localhost 60422
>>> Trying 127.0.0.1...
>>> Connected to localhost.
>>> Escape character is '^]'.
>>> mntr
>>> zk_version 3.5.2-alpha-1753710, built on 07/21/2016 16:24 GMT
>>> zk_avg_latency 0
>>> zk_max_latency 0
>>> zk_min_latency 0
>>> zk_packets_received 5
>>> zk_packets_sent 3
>>> zk_num_alive_connections 1
>>> zk_outstanding_requests 0
>>> zk_server_state read-only
>>> zk_znode_count 5
>>> zk_watch_count 0
>>> zk_ephemerals_count 0
>>> zk_approximate_data_size 230
>>> zk_open_file_descriptor_count 209
>>> zk_max_file_descriptor_count 4096
>>> Connection closed by foreign host.
>>>
>>>
>>> Using zkCli.sh:
>>> [zk: 127.0.0.1:60422(CONNECTEDREADONLY) 2] get /zookeeper/config
>>> server.1=localhost:38328:57583:participant;localhost:60422
>>> server.2=localhost:47018:39326:participant;localhost:53253
>>> server.3=localhost:50001:58560:participant;localhost:39508
>>> version=0
>>>
>>>
>>>
>>>
>>> On Wed, Nov 23, 2016 at 1:49 PM, Cameron McKenzie <
>>> cammckenzie@apache.org> wrote:
>>>
>>>> Can you connect via zkcli after you have shut down 2 of the servers in
>>>> the cluster? Just trying to establish whether the cluster is responsive.
>>>>
>>>> On Thu, Nov 24, 2016 at 8:41 AM, Benjamin Jaton <
>>>> benjamin.jaton@gmail.com> wrote:
>>>>
>>>>> I'm sorry I am using Curator 3.2.1 (not 2.7.1)
>>>>>
>>>>> On Wed, Nov 23, 2016 at 1:39 PM, Benjamin Jaton <
>>>>> benjamin.jaton@gmail.com> wrote:
>>>>>
>>>>>> Sure, I'm using Curator 2.7.1 and ZK 3.5.2-alpha.
>>>>>> I do set readonlymode.enabled in the code.
>>>>>>
>>>>>> Thanks
>>>>>> Benjamin
>>>>>>
>>>>>> On Wed, Nov 23, 2016 at 1:15 PM, Vadim <va...@ant.ee> wrote:
>>>>>>
>>>>>>> Benjamin,
>>>>>>>
>>>>>>> Can you specify Zookeeper version you use and whether you set
>>>>>>> up "*readonlymode.enabled*" to true? By default read-only mode for
>>>>>>> ZK server is disabled.
>>>>>>>
>>>>>>> Vadim.
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> On 2016-11-23 22:03, Benjamin Jaton wrote:
>>>>>>>
>>>>>>> Hello,
>>>>>>>
>>>>>>> Before I open a new JIRA for this, I wanted to bring it up here
>>>>>>> first.
>>>>>>>
>>>>>>> Basically the issue I'm seeing is that the read requests fail when
>>>>>>> connecting to a read only ensemble.
>>>>>>>
>>>>>>> I made a test for this using TestingCluster, but it requires to set
>>>>>>> iptables rules in order to mimic a real (remote) read-only ensemble. The
>>>>>>> test will do this:
>>>>>>> 1) start a TestingCluster
>>>>>>> 2) stop 2 of the 3 nodes
>>>>>>> 3) user has to run the iptables commands (specified in the logs)
>>>>>>> 4) a read request is issued every 3 seconds
>>>>>>>
>>>>>>> All the read requests block for approx 2 minutes, then they all
>>>>>>> throw an exception (ConnectionLoss).
>>>>>>>
>>>>>>> I was wondering if other users were using Curator with a read only
>>>>>>> ensemble?
>>>>>>>
>>>>>>> Thanks
>>>>>>> Benjamin
>>>>>>>
>>>>>>>
>>>>>>
>>>>>
>>>>
>>>
>>
>
Re: Curator and ReadOnly
Posted by Benjamin Jaton <be...@gmail.com>.
I have made a version of it using the ZK API explicitly and it does work.
On Wed, Nov 23, 2016 at 2:15 PM, Cameron McKenzie <mc...@gmail.com>
wrote:
> Thanks. Is it possible to rerun the test using a raw ZookeeperClient
> instead of a CuratorFramework?
>
> On Thu, Nov 24, 2016 at 9:14 AM, Benjamin Jaton <be...@gmail.com>
> wrote:
>
>> $ telnet localhost 60422
>> Trying 127.0.0.1...
>> Connected to localhost.
>> Escape character is '^]'.
>> ruok
>> imokConnection closed by foreign host.
>>
>>
>> $ telnet localhost 60422
>> Trying 127.0.0.1...
>> Connected to localhost.
>> Escape character is '^]'.
>> mntr
>> zk_version 3.5.2-alpha-1753710, built on 07/21/2016 16:24 GMT
>> zk_avg_latency 0
>> zk_max_latency 0
>> zk_min_latency 0
>> zk_packets_received 5
>> zk_packets_sent 3
>> zk_num_alive_connections 1
>> zk_outstanding_requests 0
>> zk_server_state read-only
>> zk_znode_count 5
>> zk_watch_count 0
>> zk_ephemerals_count 0
>> zk_approximate_data_size 230
>> zk_open_file_descriptor_count 209
>> zk_max_file_descriptor_count 4096
>> Connection closed by foreign host.
>>
>>
>> Using zkCli.sh:
>> [zk: 127.0.0.1:60422(CONNECTEDREADONLY) 2] get /zookeeper/config
>> server.1=localhost:38328:57583:participant;localhost:60422
>> server.2=localhost:47018:39326:participant;localhost:53253
>> server.3=localhost:50001:58560:participant;localhost:39508
>> version=0
>>
>>
>>
>>
>> On Wed, Nov 23, 2016 at 1:49 PM, Cameron McKenzie <cammckenzie@apache.org
>> > wrote:
>>
>>> Can you connect via zkcli after you have shut down 2 of the servers in
>>> the cluster? Just trying to establish whether the cluster is responsive.
>>>
>>> On Thu, Nov 24, 2016 at 8:41 AM, Benjamin Jaton <
>>> benjamin.jaton@gmail.com> wrote:
>>>
>>>> I'm sorry I am using Curator 3.2.1 (not 2.7.1)
>>>>
>>>> On Wed, Nov 23, 2016 at 1:39 PM, Benjamin Jaton <
>>>> benjamin.jaton@gmail.com> wrote:
>>>>
>>>>> Sure, I'm using Curator 2.7.1 and ZK 3.5.2-alpha.
>>>>> I do set readonlymode.enabled in the code.
>>>>>
>>>>> Thanks
>>>>> Benjamin
>>>>>
>>>>> On Wed, Nov 23, 2016 at 1:15 PM, Vadim <va...@ant.ee> wrote:
>>>>>
>>>>>> Benjamin,
>>>>>>
>>>>>> Can you specify Zookeeper version you use and whether you set
>>>>>> up "*readonlymode.enabled*" to true? By default read-only mode for
>>>>>> ZK server is disabled.
>>>>>>
>>>>>> Vadim.
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>> On 2016-11-23 22:03, Benjamin Jaton wrote:
>>>>>>
>>>>>> Hello,
>>>>>>
>>>>>> Before I open a new JIRA for this, I wanted to bring it up here first.
>>>>>>
>>>>>> Basically the issue I'm seeing is that the read requests fail when
>>>>>> connecting to a read only ensemble.
>>>>>>
>>>>>> I made a test for this using TestingCluster, but it requires to set
>>>>>> iptables rules in order to mimic a real (remote) read-only ensemble. The
>>>>>> test will do this:
>>>>>> 1) start a TestingCluster
>>>>>> 2) stop 2 of the 3 nodes
>>>>>> 3) user has to run the iptables commands (specified in the logs)
>>>>>> 4) a read request is issued every 3 seconds
>>>>>>
>>>>>> All the read requests block for approx 2 minutes, then they all throw
>>>>>> an exception (ConnectionLoss).
>>>>>>
>>>>>> I was wondering if other users were using Curator with a read only
>>>>>> ensemble?
>>>>>>
>>>>>> Thanks
>>>>>> Benjamin
>>>>>>
>>>>>>
>>>>>
>>>>
>>>
>>
>
Re: Curator and ReadOnly
Posted by Cameron McKenzie <mc...@gmail.com>.
Thanks. Is it possible to rerun the test using a raw ZookeeperClient
instead of a CuratorFramework?
On Thu, Nov 24, 2016 at 9:14 AM, Benjamin Jaton <be...@gmail.com>
wrote:
> $ telnet localhost 60422
> Trying 127.0.0.1...
> Connected to localhost.
> Escape character is '^]'.
> ruok
> imokConnection closed by foreign host.
>
>
> $ telnet localhost 60422
> Trying 127.0.0.1...
> Connected to localhost.
> Escape character is '^]'.
> mntr
> zk_version 3.5.2-alpha-1753710, built on 07/21/2016 16:24 GMT
> zk_avg_latency 0
> zk_max_latency 0
> zk_min_latency 0
> zk_packets_received 5
> zk_packets_sent 3
> zk_num_alive_connections 1
> zk_outstanding_requests 0
> zk_server_state read-only
> zk_znode_count 5
> zk_watch_count 0
> zk_ephemerals_count 0
> zk_approximate_data_size 230
> zk_open_file_descriptor_count 209
> zk_max_file_descriptor_count 4096
> Connection closed by foreign host.
>
>
> Using zkCli.sh:
> [zk: 127.0.0.1:60422(CONNECTEDREADONLY) 2] get /zookeeper/config
> server.1=localhost:38328:57583:participant;localhost:60422
> server.2=localhost:47018:39326:participant;localhost:53253
> server.3=localhost:50001:58560:participant;localhost:39508
> version=0
>
>
>
>
> On Wed, Nov 23, 2016 at 1:49 PM, Cameron McKenzie <ca...@apache.org>
> wrote:
>
>> Can you connect via zkcli after you have shut down 2 of the servers in
>> the cluster? Just trying to establish whether the cluster is responsive.
>>
>> On Thu, Nov 24, 2016 at 8:41 AM, Benjamin Jaton <benjamin.jaton@gmail.com
>> > wrote:
>>
>>> I'm sorry I am using Curator 3.2.1 (not 2.7.1)
>>>
>>> On Wed, Nov 23, 2016 at 1:39 PM, Benjamin Jaton <
>>> benjamin.jaton@gmail.com> wrote:
>>>
>>>> Sure, I'm using Curator 2.7.1 and ZK 3.5.2-alpha.
>>>> I do set readonlymode.enabled in the code.
>>>>
>>>> Thanks
>>>> Benjamin
>>>>
>>>> On Wed, Nov 23, 2016 at 1:15 PM, Vadim <va...@ant.ee> wrote:
>>>>
>>>>> Benjamin,
>>>>>
>>>>> Can you specify Zookeeper version you use and whether you set up
>>>>> "*readonlymode.enabled*" to true? By default read-only mode for ZK
>>>>> server is disabled.
>>>>>
>>>>> Vadim.
>>>>>
>>>>>
>>>>>
>>>>>
>>>>> On 2016-11-23 22:03, Benjamin Jaton wrote:
>>>>>
>>>>> Hello,
>>>>>
>>>>> Before I open a new JIRA for this, I wanted to bring it up here first.
>>>>>
>>>>> Basically the issue I'm seeing is that the read requests fail when
>>>>> connecting to a read only ensemble.
>>>>>
>>>>> I made a test for this using TestingCluster, but it requires to set
>>>>> iptables rules in order to mimic a real (remote) read-only ensemble. The
>>>>> test will do this:
>>>>> 1) start a TestingCluster
>>>>> 2) stop 2 of the 3 nodes
>>>>> 3) user has to run the iptables commands (specified in the logs)
>>>>> 4) a read request is issued every 3 seconds
>>>>>
>>>>> All the read requests block for approx 2 minutes, then they all throw
>>>>> an exception (ConnectionLoss).
>>>>>
>>>>> I was wondering if other users were using Curator with a read only
>>>>> ensemble?
>>>>>
>>>>> Thanks
>>>>> Benjamin
>>>>>
>>>>>
>>>>
>>>
>>
>
Re: Curator and ReadOnly
Posted by Benjamin Jaton <be...@gmail.com>.
$ telnet localhost 60422
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
ruok
imokConnection closed by foreign host.
$ telnet localhost 60422
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
mntr
zk_version 3.5.2-alpha-1753710, built on 07/21/2016 16:24 GMT
zk_avg_latency 0
zk_max_latency 0
zk_min_latency 0
zk_packets_received 5
zk_packets_sent 3
zk_num_alive_connections 1
zk_outstanding_requests 0
zk_server_state read-only
zk_znode_count 5
zk_watch_count 0
zk_ephemerals_count 0
zk_approximate_data_size 230
zk_open_file_descriptor_count 209
zk_max_file_descriptor_count 4096
Connection closed by foreign host.
Using zkCli.sh:
[zk: 127.0.0.1:60422(CONNECTEDREADONLY) 2] get /zookeeper/config
server.1=localhost:38328:57583:participant;localhost:60422
server.2=localhost:47018:39326:participant;localhost:53253
server.3=localhost:50001:58560:participant;localhost:39508
version=0
On Wed, Nov 23, 2016 at 1:49 PM, Cameron McKenzie <ca...@apache.org>
wrote:
> Can you connect via zkcli after you have shut down 2 of the servers in the
> cluster? Just trying to establish whether the cluster is responsive.
>
> On Thu, Nov 24, 2016 at 8:41 AM, Benjamin Jaton <be...@gmail.com>
> wrote:
>
>> I'm sorry I am using Curator 3.2.1 (not 2.7.1)
>>
>> On Wed, Nov 23, 2016 at 1:39 PM, Benjamin Jaton <benjamin.jaton@gmail.com
>> > wrote:
>>
>>> Sure, I'm using Curator 2.7.1 and ZK 3.5.2-alpha.
>>> I do set readonlymode.enabled in the code.
>>>
>>> Thanks
>>> Benjamin
>>>
>>> On Wed, Nov 23, 2016 at 1:15 PM, Vadim <va...@ant.ee> wrote:
>>>
>>>> Benjamin,
>>>>
>>>> Can you specify Zookeeper version you use and whether you set up "
>>>> *readonlymode.enabled*" to true? By default read-only mode for ZK
>>>> server is disabled.
>>>>
>>>> Vadim.
>>>>
>>>>
>>>>
>>>>
>>>> On 2016-11-23 22:03, Benjamin Jaton wrote:
>>>>
>>>> Hello,
>>>>
>>>> Before I open a new JIRA for this, I wanted to bring it up here first.
>>>>
>>>> Basically the issue I'm seeing is that the read requests fail when
>>>> connecting to a read only ensemble.
>>>>
>>>> I made a test for this using TestingCluster, but it requires to set
>>>> iptables rules in order to mimic a real (remote) read-only ensemble. The
>>>> test will do this:
>>>> 1) start a TestingCluster
>>>> 2) stop 2 of the 3 nodes
>>>> 3) user has to run the iptables commands (specified in the logs)
>>>> 4) a read request is issued every 3 seconds
>>>>
>>>> All the read requests block for approx 2 minutes, then they all throw
>>>> an exception (ConnectionLoss).
>>>>
>>>> I was wondering if other users were using Curator with a read only
>>>> ensemble?
>>>>
>>>> Thanks
>>>> Benjamin
>>>>
>>>>
>>>
>>
>
Re: Curator and ReadOnly
Posted by Cameron McKenzie <ca...@apache.org>.
Can you connect via zkcli after you have shut down 2 of the servers in the
cluster? Just trying to establish whether the cluster is responsive.
On Thu, Nov 24, 2016 at 8:41 AM, Benjamin Jaton <be...@gmail.com>
wrote:
> I'm sorry I am using Curator 3.2.1 (not 2.7.1)
>
> On Wed, Nov 23, 2016 at 1:39 PM, Benjamin Jaton <be...@gmail.com>
> wrote:
>
>> Sure, I'm using Curator 2.7.1 and ZK 3.5.2-alpha.
>> I do set readonlymode.enabled in the code.
>>
>> Thanks
>> Benjamin
>>
>> On Wed, Nov 23, 2016 at 1:15 PM, Vadim <va...@ant.ee> wrote:
>>
>>> Benjamin,
>>>
>>> Can you specify Zookeeper version you use and whether you set up "
>>> *readonlymode.enabled*" to true? By default read-only mode for ZK
>>> server is disabled.
>>>
>>> Vadim.
>>>
>>>
>>>
>>>
>>> On 2016-11-23 22:03, Benjamin Jaton wrote:
>>>
>>> Hello,
>>>
>>> Before I open a new JIRA for this, I wanted to bring it up here first.
>>>
>>> Basically the issue I'm seeing is that the read requests fail when
>>> connecting to a read only ensemble.
>>>
>>> I made a test for this using TestingCluster, but it requires to set
>>> iptables rules in order to mimic a real (remote) read-only ensemble. The
>>> test will do this:
>>> 1) start a TestingCluster
>>> 2) stop 2 of the 3 nodes
>>> 3) user has to run the iptables commands (specified in the logs)
>>> 4) a read request is issued every 3 seconds
>>>
>>> All the read requests block for approx 2 minutes, then they all throw an
>>> exception (ConnectionLoss).
>>>
>>> I was wondering if other users were using Curator with a read only
>>> ensemble?
>>>
>>> Thanks
>>> Benjamin
>>>
>>>
>>
>
Re: Curator and ReadOnly
Posted by Benjamin Jaton <be...@gmail.com>.
I'm sorry I am using Curator 3.2.1 (not 2.7.1)
On Wed, Nov 23, 2016 at 1:39 PM, Benjamin Jaton <be...@gmail.com>
wrote:
> Sure, I'm using Curator 2.7.1 and ZK 3.5.2-alpha.
> I do set readonlymode.enabled in the code.
>
> Thanks
> Benjamin
>
> On Wed, Nov 23, 2016 at 1:15 PM, Vadim <va...@ant.ee> wrote:
>
>> Benjamin,
>>
>> Can you specify Zookeeper version you use and whether you set up "
>> *readonlymode.enabled*" to true? By default read-only mode for ZK server
>> is disabled.
>>
>> Vadim.
>>
>>
>>
>>
>> On 2016-11-23 22:03, Benjamin Jaton wrote:
>>
>> Hello,
>>
>> Before I open a new JIRA for this, I wanted to bring it up here first.
>>
>> Basically the issue I'm seeing is that the read requests fail when
>> connecting to a read only ensemble.
>>
>> I made a test for this using TestingCluster, but it requires to set
>> iptables rules in order to mimic a real (remote) read-only ensemble. The
>> test will do this:
>> 1) start a TestingCluster
>> 2) stop 2 of the 3 nodes
>> 3) user has to run the iptables commands (specified in the logs)
>> 4) a read request is issued every 3 seconds
>>
>> All the read requests block for approx 2 minutes, then they all throw an
>> exception (ConnectionLoss).
>>
>> I was wondering if other users were using Curator with a read only
>> ensemble?
>>
>> Thanks
>> Benjamin
>>
>>
>
Re: Curator and ReadOnly
Posted by Benjamin Jaton <be...@gmail.com>.
Sure, I'm using Curator 2.7.1 and ZK 3.5.2-alpha.
I do set readonlymode.enabled in the code.
Thanks
Benjamin
On Wed, Nov 23, 2016 at 1:15 PM, Vadim <va...@ant.ee> wrote:
> Benjamin,
>
> Can you specify Zookeeper version you use and whether you set up "
> *readonlymode.enabled*" to true? By default read-only mode for ZK server
> is disabled.
>
> Vadim.
>
>
>
>
> On 2016-11-23 22:03, Benjamin Jaton wrote:
>
> Hello,
>
> Before I open a new JIRA for this, I wanted to bring it up here first.
>
> Basically the issue I'm seeing is that the read requests fail when
> connecting to a read only ensemble.
>
> I made a test for this using TestingCluster, but it requires to set
> iptables rules in order to mimic a real (remote) read-only ensemble. The
> test will do this:
> 1) start a TestingCluster
> 2) stop 2 of the 3 nodes
> 3) user has to run the iptables commands (specified in the logs)
> 4) a read request is issued every 3 seconds
>
> All the read requests block for approx 2 minutes, then they all throw an
> exception (ConnectionLoss).
>
> I was wondering if other users were using Curator with a read only
> ensemble?
>
> Thanks
> Benjamin
>
>
Re: Curator and ReadOnly
Posted by Vadim <va...@ant.ee>.
Benjamin,
Can you specify Zookeeper version you use and whether you set up
"READONLYMODE.ENABLED" to true? By default read-only mode for ZK server
is disabled.
Vadim.
On 2016-11-23 22:03, Benjamin Jaton wrote:
> Hello,
>
> Before I open a new JIRA for this, I wanted to bring it up here first.
>
> Basically the issue I'm seeing is that the read requests fail when connecting to a read only ensemble.
>
> I made a test for this using TestingCluster, but it requires to set iptables rules in order to mimic a real (remote) read-only ensemble. The test will do this:
> 1) start a TestingCluster
> 2) stop 2 of the 3 nodes
> 3) user has to run the iptables commands (specified in the logs)
> 4) a read request is issued every 3 seconds
>
> All the read requests block for approx 2 minutes, then they all throw an exception (ConnectionLoss).
>
> I was wondering if other users were using Curator with a read only ensemble?
>
> Thanks
> Benjamin