Hi Travis, as Mahadev mentioned, when a client establishes a session with a server the host id is logged to the server log: 2011-03-29 14:41:59,741 - INFO [SyncThread:0:NIOServerCnxn@1580] - Established session 0x12f0390e7520000 with negotiated timeout 30000 for client /127.0.0.1:47789
You could examine the ephemeral owner and grep the logs for this (that's what I typically do). A second more complex option; the client could note it's session id, along with some other identifying information (host/process/user/etc...) as a ZNode as part of it's joining the cluster. This would obv require changes on the client side though. There's also this jira, might be a good idea for us to capture some client specific information here (although we'd have to watch out for security issues with this, exposing this information only to appropriate parties...) https://issues.apache.org/jira/browse/ZOOKEEPER-829 Patrick On Tue, Mar 29, 2011 at 2:38 PM, Mahadev Konar <[email protected]> wrote: > Travis, > the only way to track an ephemeral node is the session id, in your case: > > 301083794498035291. You can find which ip has this session by mining > the logs for zookeeper servers, but for pin pointing which process > unfortunately you'll have to look at your process logs and see which > one created that session. > > thanks > mahadev > > The session id is the session which the znode belongs to. For finding > the process that m > > On Tue, Mar 29, 2011 at 2:29 PM, Travis Crawford > <[email protected]> wrote: >> Hey zookeepers - >> >> Is there a way to map the ephemeral node owner session back to the >> process holding that node open? For example, given the following znode >> stat output from the python client I'm interested in finding who has >> this open. >> >> {'pzxid': 17302254734L, 'ctime': 1301279980630L, 'aversion': 0, >> 'mzxid': 17302254734L, 'numChildren': 0, 'ephemeralOwner': >> 301083794498035291L, 'version': 0, 'dataLength': 0, 'mtime': >> 1301279980630L, 'cversion': 0, 'czxid': 17302254734L} >> >> >> Grep'ing through zookeeper.log I found lines like follows referencing >> the ephemeralOwner number, however, nothing useful in tracking down >> the process holding it open. >> >> 2011-03-29 13:12:50,083 - INFO >> [NIOServerCxn.Factory:0.0.0.0/0.0.0.0:2181:Learner@95] - Revalidating >> client: 301083794498035291 >> >> >> Thanks! >> Travis >> > > > > -- > thanks > mahadev > @mahadevkonar >
