You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@zookeeper.apache.org by Timothy Ehlers <eh...@gmail.com> on 2014/11/06 17:36:01 UTC

how do i have more connections than maxClientCnxns?

# max number of client connections
maxClientCnxns=1024

ssh zk-server-number1-champion-server-of-servering-1.mydomain.net 'netstat
-a |grep EST |wc -l'
1554

???



-- 
Tim Ehlers

Re: how do i have more connections than maxClientCnxns?

Posted by "Jürgen Wagner (DVT)" <ju...@devoteam.com>.
Well, looks like you have then multiple clients connecting to this
Zookeeper instance. The documentation says:

maxClientCnxns

    (No Java system property)

    Limits the number of concurrent connections (at the socket level)
    that *a single client, identified by IP address*, may make to a
    single member of the ZooKeeper ensemble. This is used to prevent
    certain classes of DoS attacks, including file descriptor
    exhaustion. The default is 60. Setting this to 0 entirely removes
    the limit on concurrent connections.


So, for a single client (IP address), 1024 would be the maximum. If you
have several clients connecting, the actual value could  be a multiple
(1024 times the number of unique IP addresses). You may want to check in
the netstat -an what the IP addresses of the clients are and count them
by client.

Cheers,
--Jürgen

On 06.11.2014 20:46, Timothy Ehlers wrote:
>  echo mntr |nc zk-server-number1-champion-server-of-servering-1.mydomain.net
> 2181 |grep num_alive
> zk_num_alive_connections        1540
>
> And again to verify the setting:
>  grep maxClien /etc/zookeeper/zoo.cfg
> maxClientCnxns=1024
>
>


Re: how do i have more connections than maxClientCnxns?

Posted by Timothy Ehlers <eh...@gmail.com>.
 echo mntr |nc zk-server-number1-champion-server-of-servering-1.mydomain.net
2181 |grep num_alive
zk_num_alive_connections        1540

And again to verify the setting:
 grep maxClien /etc/zookeeper/zoo.cfg
maxClientCnxns=1024




On Thu, Nov 6, 2014 at 12:52 PM, "Jürgen Wagner (DVT)" <
juergen.wagner@devoteam.com> wrote:

>  Tim, the netstat -a will list all connections that are established,
> including the ssh session and those of any other services. You could check
> for ESTABLISHED connections that use the Zookeeper port, e.g., 2181 on the
> remote side:
>
> % netstat -an | sed '/^.*:2181[ ][ ]*ESTABLISHED.*/!d' | wc -l
>
> However, why not ask Zookeeper itself?
>
> % echo mntr | nc localhost 2181
> [...]
> zk_num_alive_connections        138
> [...]
> %
>
> On 06.11.2014 19:37, Timothy Ehlers wrote:
>
> The grep is for established connections. Is there a better way to check
> active connections?
> On Nov 6, 2014 10:53 AM, Jürgen Wagner (DVT) <ju...@devoteam.com> <ju...@devoteam.com>
> wrote:
>
>
>   Hello Timothy,
>   your count probably includes lingering connections. How many are really
> active?
>
> Best regards,
> --Jürgen
>
> On 06.11.2014 17:36, Timothy Ehlers wrote:
>
> # max number of client connections
> maxClientCnxns=1024
>
> ssh zk-server-number1-champion-server-of-servering-1.mydomain.net 'netstat
> -a |grep EST |wc -l'
> 1554
>
> ???
>
>
>
>
>
>
> --
>
> Mit freundlichen Grüßen/Kind regards/Cordialement vôtre/Atentamente/С
> уважением
> *i.A. Jürgen Wagner*
> Head of Competence Center "Intelligence"
> & Senior Cloud Consultant
>
> Devoteam GmbH, Industriestr. 3, 70565 Stuttgart, Germany
> Phone: +49 6151 868-8725, Fax: +49 711 13353-53, Mobile: +49 171 864 1543
> E-Mail: juergen.wagner@devoteam.com, URL: www.devoteam.de
> ------------------------------
> Managing Board: Jürgen Hatzipantelis (CEO)
> Address of Record: 64331 Weiterstadt, Germany; Commercial Register:
> Amtsgericht Darmstadt HRB 6450; Tax Number: DE 172 993 071
>
>
>
>
>
>
> --
>
> Mit freundlichen Grüßen/Kind regards/Cordialement vôtre/Atentamente/С
> уважением
> *i.A. Jürgen Wagner*
> Head of Competence Center "Intelligence"
> & Senior Cloud Consultant
>
> Devoteam GmbH, Industriestr. 3, 70565 Stuttgart, Germany
> Phone: +49 6151 868-8725, Fax: +49 711 13353-53, Mobile: +49 171 864 1543
> E-Mail: juergen.wagner@devoteam.com, URL: www.devoteam.de
> ------------------------------
> Managing Board: Jürgen Hatzipantelis (CEO)
> Address of Record: 64331 Weiterstadt, Germany; Commercial Register:
> Amtsgericht Darmstadt HRB 6450; Tax Number: DE 172 993 071
>
>
>


-- 
Tim Ehlers

Re: how do i have more connections than maxClientCnxns?

Posted by "Jürgen Wagner (DVT)" <ju...@devoteam.com>.
Tim, the netstat -a will list all connections that are established,
including the ssh session and those of any other services. You could
check for ESTABLISHED connections that use the Zookeeper port, e.g.,
2181 on the remote side:

% netstat -an | sed '/^.*:2181[ ][ ]*ESTABLISHED.*/!d' | wc -l

However, why not ask Zookeeper itself?

% echo mntr | nc localhost 2181
[...]
zk_num_alive_connections        138
[...]
%

On 06.11.2014 19:37, Timothy Ehlers wrote:
> The grep is for established connections. Is there a better way to check
> active connections?
> On Nov 6, 2014 10:53 AM, Jürgen Wagner (DVT) <ju...@devoteam.com>
> wrote:
>
>>  Hello Timothy,
>>   your count probably includes lingering connections. How many are really
>> active?
>>
>> Best regards,
>> --Jürgen
>>
>> On 06.11.2014 17:36, Timothy Ehlers wrote:
>>
>> # max number of client connections
>> maxClientCnxns=1024
>>
>> ssh zk-server-number1-champion-server-of-servering-1.mydomain.net 'netstat
>> -a |grep EST |wc -l'
>> 1554
>>
>> ???
>>
>>
>>
>>
>>
>>
>> --
>>
>> Mit freundlichen Grüßen/Kind regards/Cordialement vôtre/Atentamente/С
>> уважением
>> *i.A. Jürgen Wagner*
>> Head of Competence Center "Intelligence"
>> & Senior Cloud Consultant
>>
>> Devoteam GmbH, Industriestr. 3, 70565 Stuttgart, Germany
>> Phone: +49 6151 868-8725, Fax: +49 711 13353-53, Mobile: +49 171 864 1543
>> E-Mail: juergen.wagner@devoteam.com, URL: www.devoteam.de
>> ------------------------------
>> Managing Board: Jürgen Hatzipantelis (CEO)
>> Address of Record: 64331 Weiterstadt, Germany; Commercial Register:
>> Amtsgericht Darmstadt HRB 6450; Tax Number: DE 172 993 071
>>
>>
>>


-- 

Mit freundlichen Grüßen/Kind regards/Cordialement vôtre/Atentamente/С
уважением
*i.A. Jürgen Wagner*
Head of Competence Center "Intelligence"
& Senior Cloud Consultant

Devoteam GmbH, Industriestr. 3, 70565 Stuttgart, Germany
Phone: +49 6151 868-8725, Fax: +49 711 13353-53, Mobile: +49 171 864 1543
E-Mail: juergen.wagner@devoteam.com
<ma...@devoteam.com>, URL: www.devoteam.de
<http://www.devoteam.de/>

------------------------------------------------------------------------
Managing Board: Jürgen Hatzipantelis (CEO)
Address of Record: 64331 Weiterstadt, Germany; Commercial Register:
Amtsgericht Darmstadt HRB 6450; Tax Number: DE 172 993 071



Re: how do i have more connections than maxClientCnxns?

Posted by Timothy Ehlers <eh...@gmail.com>.
The grep is for established connections. Is there a better way to check
active connections?
On Nov 6, 2014 10:53 AM, Jürgen Wagner (DVT) <ju...@devoteam.com>
wrote:

>  Hello Timothy,
>   your count probably includes lingering connections. How many are really
> active?
>
> Best regards,
> --Jürgen
>
> On 06.11.2014 17:36, Timothy Ehlers wrote:
>
> # max number of client connections
> maxClientCnxns=1024
>
> ssh zk-server-number1-champion-server-of-servering-1.mydomain.net 'netstat
> -a |grep EST |wc -l'
> 1554
>
> ???
>
>
>
>
>
>
> --
>
> Mit freundlichen Grüßen/Kind regards/Cordialement vôtre/Atentamente/С
> уважением
> *i.A. Jürgen Wagner*
> Head of Competence Center "Intelligence"
> & Senior Cloud Consultant
>
> Devoteam GmbH, Industriestr. 3, 70565 Stuttgart, Germany
> Phone: +49 6151 868-8725, Fax: +49 711 13353-53, Mobile: +49 171 864 1543
> E-Mail: juergen.wagner@devoteam.com, URL: www.devoteam.de
> ------------------------------
> Managing Board: Jürgen Hatzipantelis (CEO)
> Address of Record: 64331 Weiterstadt, Germany; Commercial Register:
> Amtsgericht Darmstadt HRB 6450; Tax Number: DE 172 993 071
>
>
>

Re: how do i have more connections than maxClientCnxns?

Posted by "Jürgen Wagner (DVT)" <ju...@devoteam.com>.
Hello Timothy,
  your count probably includes lingering connections. How many are
really active?

Best regards,
--Jürgen

On 06.11.2014 17:36, Timothy Ehlers wrote:
> # max number of client connections
> maxClientCnxns=1024
>
> ssh zk-server-number1-champion-server-of-servering-1.mydomain.net 'netstat
> -a |grep EST |wc -l'
> 1554
>
> ???
>
>
>


-- 

Mit freundlichen Grüßen/Kind regards/Cordialement vôtre/Atentamente/С
уважением
*i.A. Jürgen Wagner*
Head of Competence Center "Intelligence"
& Senior Cloud Consultant

Devoteam GmbH, Industriestr. 3, 70565 Stuttgart, Germany
Phone: +49 6151 868-8725, Fax: +49 711 13353-53, Mobile: +49 171 864 1543
E-Mail: juergen.wagner@devoteam.com
<ma...@devoteam.com>, URL: www.devoteam.de
<http://www.devoteam.de/>

------------------------------------------------------------------------
Managing Board: Jürgen Hatzipantelis (CEO)
Address of Record: 64331 Weiterstadt, Germany; Commercial Register:
Amtsgericht Darmstadt HRB 6450; Tax Number: DE 172 993 071