RMI blocked by web proxy?
843790Oct 12 2008 — edited Nov 9 2008I have a background service, and a console GUI. The service (a UnicastRemoteObject) registers a name:
System.setSecurityManager(new RMISecurityManager());
LocateRegistry.createRegistry(1099);
Naming.rebind("ClientService", this);
and the GUI attempts to read it:
Service service = (Service)Naming.lookup("ClientService");
Boolean ret = new Boolean(service.testConnection());
Both are on the same machine (Windows 2003 Server) and the same login. If no web proxy is present, it works fine. If a proxy is present, and I disable the use of it (Internet Explorer - Internet Options), it works fine. But with the proxy back in force (even with Bypass proxy server for local addresses ticked, in IE) it can't make contact. This has been duplicated in quite a few customer sites.
However, if I briefly disable the proxy and reenable it, the client can continue to access the service after connecting the first time, implying that it's the naming.lookup getting blocked.
I've tried putting in an explicit //127.0.0.1:1099/WebSYNCClientService or //localhost:1099/WebSYNCClientService as the name, but that didn't help. I also tried setting java.rmi.service.disableHttp to true, but that didn't help either, although it now waits quite a while before giving up.
After a solid day or two on this, I'm on the verge of making a little text file that one reads and the other writes! But I thought I'd ask here in case the answer is stupidly simple...
Regards,
Brain_gone_fuzzy