This week's book giveaway is in the JDBC forum.
We're giving away four copies of Make it so: Java DB Connections & Transactions and have Marcho Behler on-line!
See this thread for details.
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

Win a copy of Make it so: Java DB Connections & Transactions this week in the JDBC forum!
JavaRanch » Java Forums » Java » Distributed Java
Bookmark "RMI on Apache Server" Watch "RMI on Apache Server" New topic

RMI on Apache Server

Pratik Khetia
Ranch Hand

Joined: Jun 29, 2001
Posts: 50
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: Connection refused: connect Connection refused: connect
at Method)
at Source)
at Source)
at Source)
at<init>(Unknown Source)
at<init>(Unknown Source)
at Source)
at Source)
at Source)
at<init>(Unknown Source)
at<init>(Unknown Source)
at Source)
at Source)
at S
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>(
at GUI.Interface.<init>(
at Collaborator.main(

**********Error Message Ends************
So how do I get rid of this error...
thanks in advance..
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

Omar IRAQI Houssaini
I agree. Here's the link:
subject: RMI on Apache Server
It's not a secret anymore!