Hello everyone, I just finished designing/implementing my assignment and now I am starting to test it in an actual network environment. I am running windows 2000 machines for both server and client(s). When I start the application and get the initial connection to the server by doing Naming.lookup, that takes over 30 seconds to get a reference to the remote object. Not only that, the first search performed takes a long time as well. After that searches run very fast, as if they are running locally. Any ideas? I tried adding the ip address and server name to my hosts file since I heard that even though I am specifying the IP address, windows would still do a reverse lookup to get the host name. But that didnt help at all. Any help will be greatly appreciated!
Hi, from the java RMI FAQ. C.6 Why do Naming.bind and Naming.lookup take an extraordinarily long time on Windows? Most likely, your host's networking setup is incorrect. RMI uses the Java API networking classes, in particular java.net.InetAddress, which will cause TCP/IP host name lookups - both host to address mapping and address to hostname mapping (the InetAddress class does this for security reasons). On Windows, the lookup functions are performed by the native Windows socket library, so the delays are happening not in RMI, but in the Windows libraries. If your host is set up to use DNS, then it is usually a problem with the DNS server not knowing about the hosts involved in communication, and what you are experiencing are DNS lookup timeouts. Try specifying all the involved hostnames/addresses in the local file \winnt\system32\drivers\etc\hosts or \windows\hosts. The format of a typical host file is: IPAddress Machine Name e.g.: 22.214.171.124 homer This should dramatically cut down the time it takes to make the first lookup.
posted 18 years ago
Hi Marcos, That fixed it. What I had done before was entering the server name on the client's hosts file only; but you actually have to enter the client's name on the server's host file too. That was a headache, glad it is over now! Alex
This tiny ad is guaranteed to be gluten free.
Devious Experiments for a Truly Passive Greenhouse!