java.rmi.ConnectException: Connection refused to host
<p>I am trying to run a RMI Application. I have started the the rmiregistry using the following command:
<em>rmiregistry 6789</em>.</p>

<p>Now I ran the server application in eclipse passing the the following VM arguments:
-Djava.naming.factory.initial=com.sun.jndi.rmi.registry.RegistryContextFactory
-Dava.naming.provider.url=rmi://localhost:6789</p>

<p>The following error message is thrown:
<em>javax.naming.ServiceUnavailableException [Root exception is java.rmi.ConnectException: Connection refused to host: 172.17.209.154; nested exception is: 
    java.net.ConnectException: Connection refused: connect]</em></p>

<p><em>172.17.209.154</em> is the IP of my machine. </p>

<p>Can any one pinpoint as to what is the error.</p>