Re: DGCClient$EndpointEntry stuck
Paul Beadle <[email protected]>
| Newsgroups | gmane.comp.java.sun.rmi |
|---|---|
| Message-ID | <LISTSERV%[email protected]> |
Having discovered what the problem was, I thought I'd add some explanation to help anyone searching the list archives later. At the start of the problem scenario, the RMI Client is correctly making calls to the RMI Server, also sending DGC messages. Then the RMI Server is rebooted (not unusual for this application because the RMI Server is actually a client's workstation; the RMI Client is the central database machine which periodically connects to the workstations to pull information up). After the reboot, the RMI Server uses a different port number to expose its objects (of course the RMI Registry port is always the same) but some other application uses the old port number for a different purpose. All fine so far, but the RMI Client machine is still sending occasional DGC messages to the old port number, and it confuses the DGC code, often causing large quantities of socket connections to be made in rapid succession (depending on what the other app does with the socket when it gets the DGC info). What made the problem worse for me is that I enclose the Socket object in a wrapper so I can track sockets and do other stuff. Because the DGC code does not always call .close() on the socket when it doesn't understand the response, this left lots of sockets open as far as the socket counting code was concerned. A finalizer soon sorted this out. The solution to the cascade of socket creation is to ensure that RMI objects are always published on the same port numbers so that after the re- start, the DGC messages for the old objects will be correctly handled by the newly rebooted RMI Server JVM. =========================================================================== To unsubscribe, send email to [email protected] and include in the body of the message "signoff RMI-USERS". For general help, send email to [email protected] and include in the body of the message "help". For a list of frequently asked RMI questions please refer to: http://java.sun.com/j2se/1.3/docs/guide/rmi/faq.html To view past RMI-USERS postings, please see: http://archives.java.sun.com/archives/rmi-users.html