This week's book giveaway is in the Performance forum.
We're giving away four copies of The Java Performance Companion and have Charlie Hunt, Monica Beckwith, Poonam Parhar, & Bengt Rutisson on-line!
See this thread for details.
Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

RMI on Apache Server

 
Pratik Khetia
Ranch Hand
Posts: 50
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 54
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic