Catching mis-configuration earlier: Reggie and localhost
Patrick Wright <[email protected]>
| Newsgroups | gmane.comp.java.sun.jini |
|---|---|
| Message-ID | <[email protected]> |
Hi Last week I was trying to track down why one of our Jini client processes, using a LookupCache, wasn't reacting to a service being restarted. I ended up attaching a listener to the cache and monitoring that, saw that no events were coming in, and on a hunch, turned up looking on our Reggie instance. I found the culprit wrapper-20071016.log:INFO | jvm 1 | 2007/10/16 15:25:20 | FINE: registered event listener Proxy[RemoteEventListener,BasicInvocationHandler[BasicObjectEndpoint[9c3deb13-fb84-475c-87ca-e61e4228e5ea,TcpEndpoint[127.0.0.1:55797]]]] as 8df110a0-5885-4beb-b511-b22c444198db Namely, our client was pulling a localhost address from the hosts file and using that as its event callback address. I realize this was sloppy configuration on my part, however I'd like to save some time in the future if this re-appears; the end behavior was mysterious at the outset (services were discovered by multicast, but not re-discovered if restarted). I'm already familiar with the issue and have moved forward configuring the client to use an exporter that uses the correct host address. My question is, how could I have caught this earlier? I can't (am not allowed) to dictate that none of our machines are configured with the localhost address. My instinct would be to put some sort of constraint/check in on either the client side, or at the LUS, to reject addresses of 127.0.0.1. Using logging at the LUS is OK, but finding this at level of FINE takes a bit of work as I need to sort through other info logged at that level. One non-intrusive approach would be to add a log listener which monitors those sorts of registrations and raises a warning if it sniffs an invalid address. Other ideas? TIA Patrick -------------------------------------------------------------------------- Getting Started: http://www.jini.org/wiki/Category:Getting_Started Community Web Site: http://jini.org jini-users Archive: http://archives.java.sun.com/archives/jini-users.html Unsubscribing: email "signoff JINI-USERS" to [email protected]