wood burning stoves 2.0*
The moose likes Distributed Java and the fly likes RMI on Apache Server Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Distributed Java
Bookmark "RMI on Apache Server" Watch "RMI on Apache Server" New topic
Author

RMI on Apache Server

Pratik Khetia
Ranch Hand

Joined: Jun 29, 2001
Posts: 50
Hi,
I am running RMI on Apache Server. The server I am running RMI on is Windows NT and it had dynamic IP. It used to work absolutely perfect. But now we changed our network and that server has got a static IP but now since then I am not able to run RMI on that server. As and when I try to login using RMI..It gives the following error messages.
************Error Message*****************
java.rmi.ConnectException: Connection refused to host: pratik; nested exception
is:
java.net.ConnectException: Connection refused: connect
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.<init>(Unknown Source)
at java.net.Socket.<init>(Unknown Source)
at sun.net.NetworkClient.doConnect(Unknown Source)
at sun.net.www.http.HttpClient.openServer(Unknown Source)
at sun.net.www.http.HttpClient.openServer(Unknown Source)
at sun.net.www.http.HttpClient.<init>(Unknown Source)
at sun.net.www.http.HttpClient.<init>(Unknown Source)
at sun.net.www.http.HttpClient.New(Unknown Source)
at sun.net.www.protocol.http.HttpURLConnection.connect(Unknown Source)
at sun.net.www.protocol.http.HttpURLConnection.getOutputStream(Unknown S
ource)
at sun.rmi.transport.proxy.HttpSendSocket.writeNotify(Unknown Source)
at sun.rmi.transport.proxy.HttpSendSocket.<init>(Unknown Source)
at sun.rmi.transport.proxy.RMIHttpToCGISocketFactory.createSocket(Unknow
n Source)
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.lookup(Unknown Source)
at java.rmi.Naming.lookup(Unknown Source)
at chat.ChatClient.<init>(ChatClient.java:51)
at GUI.Interface.<init>(Interface.java:331)
at Collaborator.main(Collaborator.java:174)

**********Error Message Ends************
So how do I get rid of this error...
thanks in advance..
Pratik
Omar IRAQI
Ranch Hand

Joined: Jul 06, 2001
Posts: 54
Hi Pratik,
Here is what happens : when the RMI client wants to fetch the class definition of the stub from the Apache server, the connection to the Apache server fails.
Possible reasons :
1- DNS problem : the host name pratik cannot be resolved to the IP address of the Apache server
--->replace the name pratik by the actual IP of Apache server
2- The Apache server is not running or is running at a port different from 80
----> try : telnet apache_server_ip 80
3- either 1 or 2
Regards


Omar IRAQI Houssaini
 
Don't get me started about those stupid light bulbs.
 
subject: RMI on Apache Server