Home | About | Sematext search-lucene.com search-hadoop.com
NEW: Monitor These Apps!
elasticsearch, apache solr, apache hbase, hadoop, redis, casssandra, amazon cloudwatch, mysql, memcached, apache kafka, apache zookeeper, apache storm, ubuntu, centOS, red hat, debian, puppet labs, java, senseiDB
 Search Hadoop and all its subprojects:

Switch to Threaded View
Zookeeper >> mail # user >> How can I get ip from session id.


Copy link to this message
-
Re: How can I get ip from session id.
I am a zookeeper administrator in my team.
One day, i use command 'wchs', zk show me that there are 873 connections,
but i found that there is only 175 ips when i use command 'cons', some
session ids were not found in cons's ip list.

So, if i want to konw all ips connection to zk server real time, how can i
do.

2011/11/16 kishore g <[EMAIL PROTECTED]>

> Forgot to add, to help debugging  I add the ip address into one of the
> ephemeral nodes created by the session. This way I can get the ip from the
> transaction log.
>
> On Tue, Nov 15, 2011 at 11:00 AM, kishore g <[EMAIL PROTECTED]> wrote:
>
> > I had a similar requirement. You can use cons on all servers if the
> > session is alive but if its expired you can only go to zk logs and
> > co-relate. It's not convenient for debugging.
> >
> > It would be nice if ZK logged the ip in the createSession transaction, so
> > that we can get the ip from zk transaction log.
> >
> > On Tue, Nov 15, 2011 at 8:45 AM, Patrick Hunt <[EMAIL PROTECTED]> wrote:
> >
> >> Client socket connections are local to a server, so you'd need to run
> >> cons on all servers to get the full sense of the connection activity
> >>
> >> Patrick
> >>
> >> On Mon, Nov 14, 2011 at 10:12 PM, nileader <[EMAIL PROTECTED]> wrote:
> >> > hi, everyone.
> >> > When i exec
> >> >        $  echo wchc | nc 192.168.2.176 2181
> >> > console show me that:
> >> > 0x2328576e3ad3e49
> >> >        /nileader/test/monitor1
> >> >        /nileader/test/monitor2
> >> >
> >> > So, now I know the session id, how can i get client ip.
> >> >
> >> >
> >> > May be you will tell me exec  "cons", but i found that some session do
> >> not
> >> > in cons ip list.
> >> >
> >>
> >
> >
>
NEW: Monitor These Apps!
elasticsearch, apache solr, apache hbase, hadoop, redis, casssandra, amazon cloudwatch, mysql, memcached, apache kafka, apache zookeeper, apache storm, ubuntu, centOS, red hat, debian, puppet labs, java, senseiDB