I am trying to start my run my RMI server that i have created, but seem to be unable to even start the server. I did start the rmiregistry and then attempt to start my server. Btw, i used msdos to start my rmiregistry and to start my server.
My friend has tried the coding and it works on his computer. I am thinking that it is my computer configuration but i do not know where exactly is the problem.
Here are some of the errors:
java.net.ConnectException: Connection refused: connect
at sun.rmi.transport.tcp.TCPEndpoint.newSocket(Unknown Source)
at sun.rmi.transport.tcp.TCPChannel.createConnection(Unknown Source)
at sun.rmi.transport.tcp.TCPChannel.newConnection(Unknown Source)
at sun.rmi.server.UnicastRef.newCall(Unknown Source)
at sun.rmi.registry.RegistryImpl_Stub.rebind(Unknown Source)
at java.rmi.Naming.rebind(Unknown Source)
at addRmi.AddServerApp.main(AddServerApp.java:10)
by: java.net.ConnectException: Connection refused: connect
at java.net.PlainSocketImpl.socketConnect(Native Method)
at java.net.PlainSocketImpl.doConnect(Unknown Source)
at java.net.PlainSocketImpl.connectToAddress(Unknown Source)
at java.net.PlainSocketImpl.connect(Unknown Source)
at java.net.Socket.connect(Unknown Source)
at java.net.Socket.connect(Unknown Source)
at java.net.Socket.<init>(Unknown Source)
at java.net.Socket.<init>(Unknown Source)
at sun.rmi.transport.proxy.RMIDirectSocketFactory.createSocket(Unknown S
09-10-2006, 03:43 PM
ractoc
Looks like your application is not allowed to connect to the RMI registry. Do you have a firewal installed? if so, try running it with the firewall disabled.
If this fixes the problem, you might want to consider opening up the port on which your RMI resgistry is listening for connections.
09-10-2006, 11:04 PM
shaoen01
Hi ractoc,
I did try running the application with and without the firewall disabled but it still does not work. How do i know what port my rmi registry is running on and how do i open a port for it to use? Thanks
shaoen01
09-11-2006, 11:14 AM
ractoc
There is a default port, which you should be able to find through either reading the documentation or through google, there is also a way to set your own custom port. How this is done can also be found in the documentation or through googl.
Mark
09-11-2006, 11:19 AM
shaoen01
Hi,
The default port is 1099, but it does not conflict with other applications because they do not use 1099. And so there should be no need to set up a custom port right?