iam getting "java.rmi.ConnectException" when i try to use ports other than 1099. can someone give me the exact reason for it ? if i can use any other port, then what is the use of giving user a textbox for entering the port nos? java.rmi.ConnectException: Connection refused to host: pavilion; nested exception is: java.net.ConnectException: Connection refused: no further information java.net.ConnectException: Connection refused: no further information at java.net.PlainSocketImpl.socketConnect(Native Method) at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:305) at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:125) at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:112) at java.net.Socket.<init>(Socket.java:269) at java.net.Socket.<init>(Socket.java:98) at sun.rmi.transport.proxy.RMIDirectSocketFactory.createSocket(RMIDirectSocketFactory.java:29) at sun.rmi.transport.proxy.RMIMasterSocketFactory.createSocket(RMIMasterSocketFactory.java:124) at sun.rmi.transport.tcp.TCPEndpoint.newSocket(TCPEndpoint.java:497) at sun.rmi.transport.tcp.TCPChannel.createConnection(TCPChannel.java:194) at sun.rmi.transport.tcp.TCPChannel.newConnection(TCPChannel.java:178) at sun.rmi.server.UnicastRef.newCall(UnicastRef.java:322) at sun.rmi.registry.RegistryImpl_Stub.rebind(Unknown Source) at java.rmi.Naming.rebind(Naming.java:165)
did u use a GUI for server ? if i remove the port no, then i will have just a text box for entering datafile location plus 2 normal buttons. is that fine? i tried searching for server.gif & other gif files to be loaded on the butons. but i didnt file one. so iam just using a normal buttons. will that be fine?
Sounds fine to me. Yes I had a server GUI. Here is the line used to start my server
I did not have the user enter port, server-name or anything when running the server. I took the default of port 1099. And the machine already has the servername it's localhost, and any client can connect using the IP address of the machine, or the URL of the machine that is in a DNS server, if no DNS server just use the IP address. Mark
To use a different port, you must start your rmiregistry with a different port. For example, if you want to use port 2000, you need to start your rmiregistry as "rmiregistry 2000". Hope this helps. [ February 10, 2002: Message edited by: Hai Yee ]