You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@zookeeper.apache.org by nileader <ni...@gmail.com> on 2011/11/28 12:11:13 UTC

Any command zookeeper administrator can use to close or reject client connetion with ip level?

Any command zookeeper administrator can use to close or reject client
connetion with ip level?

Re: Any command zookeeper administrator can use to close or reject client connetion with ip level?

Posted by Camille Fournier <ca...@apache.org>.
Not that I'm aware. It's annoying because you could use an
AuthenticationProvider to reject most commands from a client, but that
can't prevent it from connecting. If the client doesn't ever call
addAuth, you don't have a hook in to close it.

C

On Mon, Nov 28, 2011 at 6:11 AM, nileader <ni...@gmail.com> wrote:
> Any command zookeeper administrator can use to close or reject client
> connetion with ip level?
>

Re: Any command zookeeper administrator can use to close or reject client connetion with ip level?

Posted by Mahadev Konar <ma...@hortonworks.com>.
There isnt any such option in ZK as of right now. Should be very easy
to add one. Interested?

mahadev

On Tue, Nov 29, 2011 at 4:11 PM, nileader <ni...@gmail.com> wrote:
> Ok, Thanks. I will use.In other words, now, we can only use
> 'maxClientCnxns' to limit the request of one ip.
> Throuth the docs(
> http://zookeeper.apache.org/doc/r3.3.3/zookeeperAdmin.html#sc_configuration),
> i know that 'maxClientCnxns' is the limit for a single client, identified
> by IP address. So, how can i limit the total connections of zookeeper
> server. I mean all client total.
>
>
> --nileader@gmail.com

Re: Any command zookeeper administrator can use to close or reject client connetion with ip level?

Posted by Neha Narkhede <ne...@gmail.com>.
Thanks ! Filed https://issues.apache.org/jira/browse/ZOOKEEPER-1321 to
track this.

Thanks,
Neha


On Tue, Dec 6, 2011 at 11:19 AM, Patrick Hunt <ph...@apache.org> wrote:

> It must have come up in conversation, I can't find it in jira. Feel
> free to enter one.
>
> Yes, it would be useful to have insight into the number of connections
> currently to a server as a summary in srvr & mntr, currently you can
> only get it by running "stat" and counting the result. That's alot of
> work for the server to do just to get connection count.
>
> Additionally it would be good to have some stats on how things are
> changing over time. ie new/lost connections in the last 5/10/15
> seconds/minutes or somesuch. However this is best left to the
> monitoring system itself.
>
> Patrick
>
> On Tue, Dec 6, 2011 at 11:04 AM, Neha Narkhede <ne...@gmail.com>
> wrote:
> > Patrick,
> >
> >>> There have been a couple recent jiras on this - capturing a
> > count of the number of connections in "srvr" comes to mind.
> >
> > Are you referring to adding another entry for
> > "number_of_client_connections" to both JMX and srvr/mntr ?
> >
> > Please can you point me to a JIRA, if one exists ?
> >
> > Thanks,
> > Neha
> >
> > On Tue, Dec 6, 2011 at 10:52 AM, Patrick Hunt <ph...@apache.org> wrote:
> >
> >> Please add both jmx and 4lw, I think this would be useful for
> >> operators. There have been a couple recent jiras on this - capturing a
> >> count of the number of connections in "srvr" comes to mind. This would
> >> be useful summary there as well (in addition to being in stat and
> >> mntr).
> >>
> >> Patrick
> >>
> >> On Tue, Dec 6, 2011 at 10:13 AM, Neha Narkhede <neha.narkhede@gmail.com
> >
> >> wrote:
> >> > Well, the point is to monitor and alert on it. So maybe a JMX bean or
> one
> >> > of the 4-letter commands would be reasonable.
> >> >
> >> > Thanks,
> >> > Neha
> >> >
> >> > On Tue, Dec 6, 2011 at 10:07 AM, Ted Dunning <te...@gmail.com>
> >> wrote:
> >> >
> >> >> Look at the logs?
> >> >>
> >> >> On Tue, Dec 6, 2011 at 9:59 AM, Neha Narkhede <
> neha.narkhede@gmail.com
> >> >> >wrote:
> >> >>
> >> >> > Also, a related question is being able to monitor the number of
> >> >> disconnect
> >> >> > operations on a client. This is generally indicative of a client
> going
> >> >> > through large number of GC and hence disconnecting way too often
> from
> >> a
> >> >> > zookeeper cluster. What is a good way of monitoring this ?
> >> >> >
> >> >>
> >>
>

Re: Any command zookeeper administrator can use to close or reject client connetion with ip level?

Posted by Patrick Hunt <ph...@apache.org>.
It must have come up in conversation, I can't find it in jira. Feel
free to enter one.

Yes, it would be useful to have insight into the number of connections
currently to a server as a summary in srvr & mntr, currently you can
only get it by running "stat" and counting the result. That's alot of
work for the server to do just to get connection count.

Additionally it would be good to have some stats on how things are
changing over time. ie new/lost connections in the last 5/10/15
seconds/minutes or somesuch. However this is best left to the
monitoring system itself.

Patrick

On Tue, Dec 6, 2011 at 11:04 AM, Neha Narkhede <ne...@gmail.com> wrote:
> Patrick,
>
>>> There have been a couple recent jiras on this - capturing a
> count of the number of connections in "srvr" comes to mind.
>
> Are you referring to adding another entry for
> "number_of_client_connections" to both JMX and srvr/mntr ?
>
> Please can you point me to a JIRA, if one exists ?
>
> Thanks,
> Neha
>
> On Tue, Dec 6, 2011 at 10:52 AM, Patrick Hunt <ph...@apache.org> wrote:
>
>> Please add both jmx and 4lw, I think this would be useful for
>> operators. There have been a couple recent jiras on this - capturing a
>> count of the number of connections in "srvr" comes to mind. This would
>> be useful summary there as well (in addition to being in stat and
>> mntr).
>>
>> Patrick
>>
>> On Tue, Dec 6, 2011 at 10:13 AM, Neha Narkhede <ne...@gmail.com>
>> wrote:
>> > Well, the point is to monitor and alert on it. So maybe a JMX bean or one
>> > of the 4-letter commands would be reasonable.
>> >
>> > Thanks,
>> > Neha
>> >
>> > On Tue, Dec 6, 2011 at 10:07 AM, Ted Dunning <te...@gmail.com>
>> wrote:
>> >
>> >> Look at the logs?
>> >>
>> >> On Tue, Dec 6, 2011 at 9:59 AM, Neha Narkhede <neha.narkhede@gmail.com
>> >> >wrote:
>> >>
>> >> > Also, a related question is being able to monitor the number of
>> >> disconnect
>> >> > operations on a client. This is generally indicative of a client going
>> >> > through large number of GC and hence disconnecting way too often from
>> a
>> >> > zookeeper cluster. What is a good way of monitoring this ?
>> >> >
>> >>
>>

Re: Any command zookeeper administrator can use to close or reject client connetion with ip level?

Posted by Neha Narkhede <ne...@gmail.com>.
Patrick,

>> There have been a couple recent jiras on this - capturing a
count of the number of connections in "srvr" comes to mind.

Are you referring to adding another entry for
"number_of_client_connections" to both JMX and srvr/mntr ?

Please can you point me to a JIRA, if one exists ?

Thanks,
Neha

On Tue, Dec 6, 2011 at 10:52 AM, Patrick Hunt <ph...@apache.org> wrote:

> Please add both jmx and 4lw, I think this would be useful for
> operators. There have been a couple recent jiras on this - capturing a
> count of the number of connections in "srvr" comes to mind. This would
> be useful summary there as well (in addition to being in stat and
> mntr).
>
> Patrick
>
> On Tue, Dec 6, 2011 at 10:13 AM, Neha Narkhede <ne...@gmail.com>
> wrote:
> > Well, the point is to monitor and alert on it. So maybe a JMX bean or one
> > of the 4-letter commands would be reasonable.
> >
> > Thanks,
> > Neha
> >
> > On Tue, Dec 6, 2011 at 10:07 AM, Ted Dunning <te...@gmail.com>
> wrote:
> >
> >> Look at the logs?
> >>
> >> On Tue, Dec 6, 2011 at 9:59 AM, Neha Narkhede <neha.narkhede@gmail.com
> >> >wrote:
> >>
> >> > Also, a related question is being able to monitor the number of
> >> disconnect
> >> > operations on a client. This is generally indicative of a client going
> >> > through large number of GC and hence disconnecting way too often from
> a
> >> > zookeeper cluster. What is a good way of monitoring this ?
> >> >
> >>
>

Re: Any command zookeeper administrator can use to close or reject client connetion with ip level?

Posted by Patrick Hunt <ph...@apache.org>.
Please add both jmx and 4lw, I think this would be useful for
operators. There have been a couple recent jiras on this - capturing a
count of the number of connections in "srvr" comes to mind. This would
be useful summary there as well (in addition to being in stat and
mntr).

Patrick

On Tue, Dec 6, 2011 at 10:13 AM, Neha Narkhede <ne...@gmail.com> wrote:
> Well, the point is to monitor and alert on it. So maybe a JMX bean or one
> of the 4-letter commands would be reasonable.
>
> Thanks,
> Neha
>
> On Tue, Dec 6, 2011 at 10:07 AM, Ted Dunning <te...@gmail.com> wrote:
>
>> Look at the logs?
>>
>> On Tue, Dec 6, 2011 at 9:59 AM, Neha Narkhede <neha.narkhede@gmail.com
>> >wrote:
>>
>> > Also, a related question is being able to monitor the number of
>> disconnect
>> > operations on a client. This is generally indicative of a client going
>> > through large number of GC and hence disconnecting way too often from a
>> > zookeeper cluster. What is a good way of monitoring this ?
>> >
>>

Re: Any command zookeeper administrator can use to close or reject client connetion with ip level?

Posted by Neha Narkhede <ne...@gmail.com>.
Well, the point is to monitor and alert on it. So maybe a JMX bean or one
of the 4-letter commands would be reasonable.

Thanks,
Neha

On Tue, Dec 6, 2011 at 10:07 AM, Ted Dunning <te...@gmail.com> wrote:

> Look at the logs?
>
> On Tue, Dec 6, 2011 at 9:59 AM, Neha Narkhede <neha.narkhede@gmail.com
> >wrote:
>
> > Also, a related question is being able to monitor the number of
> disconnect
> > operations on a client. This is generally indicative of a client going
> > through large number of GC and hence disconnecting way too often from a
> > zookeeper cluster. What is a good way of monitoring this ?
> >
>

Re: Any command zookeeper administrator can use to close or reject client connetion with ip level?

Posted by Ted Dunning <te...@gmail.com>.
Look at the logs?

On Tue, Dec 6, 2011 at 9:59 AM, Neha Narkhede <ne...@gmail.com>wrote:

> Also, a related question is being able to monitor the number of disconnect
> operations on a client. This is generally indicative of a client going
> through large number of GC and hence disconnecting way too often from a
> zookeeper cluster. What is a good way of monitoring this ?
>

Re: Any command zookeeper administrator can use to close or reject client connetion with ip level?

Posted by Neha Narkhede <ne...@gmail.com>.
>> So, how can i limit the total connections of zookeeper
server. I mean all client total.

+1

Also, a related question is being able to monitor the number of disconnect
operations on a client. This is generally indicative of a client going
through large number of GC and hence disconnecting way too often from a
zookeeper cluster. What is a good way of monitoring this ?

Thanks,
Neha


On Wed, Nov 30, 2011 at 9:54 AM, Patrick Hunt <ph...@apache.org> wrote:

> iptables can do this for you today easily. We had a discussion on dev@
> recently that's related to this - how to handle the ZK server file
> handles ulimit. Setting the default for this feature based on
> available ulimit would be nice.
>
> Patrick
>
> On Tue, Nov 29, 2011 at 4:11 PM, nileader <ni...@gmail.com> wrote:
> > Ok, Thanks. I will use.In other words, now, we can only use
> > 'maxClientCnxns' to limit the request of one ip.
> > Throuth the docs(
> >
> http://zookeeper.apache.org/doc/r3.3.3/zookeeperAdmin.html#sc_configuration
> ),
> > i know that 'maxClientCnxns' is the limit for a single client, identified
> > by IP address. So, how can i limit the total connections of zookeeper
> > server. I mean all client total.
> >
> >
> > --nileader@gmail.com
>

Re: Any command zookeeper administrator can use to close or reject client connetion with ip level?

Posted by Patrick Hunt <ph...@apache.org>.
iptables can do this for you today easily. We had a discussion on dev@
recently that's related to this - how to handle the ZK server file
handles ulimit. Setting the default for this feature based on
available ulimit would be nice.

Patrick

On Tue, Nov 29, 2011 at 4:11 PM, nileader <ni...@gmail.com> wrote:
> Ok, Thanks. I will use.In other words, now, we can only use
> 'maxClientCnxns' to limit the request of one ip.
> Throuth the docs(
> http://zookeeper.apache.org/doc/r3.3.3/zookeeperAdmin.html#sc_configuration),
> i know that 'maxClientCnxns' is the limit for a single client, identified
> by IP address. So, how can i limit the total connections of zookeeper
> server. I mean all client total.
>
>
> --nileader@gmail.com

Re: Any command zookeeper administrator can use to close or reject client connetion with ip level?

Posted by nileader <ni...@gmail.com>.
Ok, Thanks. I will use.In other words, now, we can only use
'maxClientCnxns' to limit the request of one ip.
Throuth the docs(
http://zookeeper.apache.org/doc/r3.3.3/zookeeperAdmin.html#sc_configuration),
i know that 'maxClientCnxns' is the limit for a single client, identified
by IP address. So, how can i limit the total connections of zookeeper
server. I mean all client total.


--nileader@gmail.com

Re: Any command zookeeper administrator can use to close or reject client connetion with ip level?

Posted by Patrick Hunt <ph...@apache.org>.
iptables is very flexible. There's even this which I think is pretty
amazing (rate limit new connections):
https://access.redhat.com/kb/docs/DOC-18730

On Mon, Nov 28, 2011 at 3:11 AM, nileader <ni...@gmail.com> wrote:
> Any command zookeeper administrator can use to close or reject client
> connetion with ip level?