• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

RMI on Apache Server

 
Ranch Hand
Posts: 50
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Ranch Hand
Posts: 54
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic