From: Peter B. <pe...@ra...> - 2003-04-26 03:59:52
|
Hi. Try some basic troubleshooting first. e.g. ping vitoria (the hostname in the error). That shouldn't be 'victoria' should it? If you can ping it, check the service you're expecting to be running is actually running via a telnet to that port telnet vitoria 1099 (Is that the port it should be running on?) Regards, Peter http://rimuhosting.cim/s=?jb - JBoss Hosting Specialists > -----Original Message----- > From: jbo...@li... > [mailto:jbo...@li...]On Behalf Of G.L. Grobe > Sent: Friday, April 25, 2003 7:31 PM > To: jbo...@li... > Subject: [JBoss-user] RMI ConnectException > > > I'm running JBoss 3.0.6 on a RH 7.2 sys and am getting the error below > while trying to startup my client. The client in this case is actually > running the server RMI code and my server is running the RMI client > code so that it can make a request to the client (running the RMI > server code) to see if the app is still alive. > > The error is ... > > Connection refused to host: vitoria; nested exception is: > java.net.ConnectException: Connection refused > > Any help much appreciated. > > --- Server Class > > public class MyClass extends UnicastRemoteObject implements > MessageListener, IAgent { > ... > env = new Hashtable(); > env.put(Context.INITIAL_CONTEXT_FACTORY, > "org.jnp.interfaces.NamingContextFactory"); > env.put(Context.PROVIDER_URL, > props.getProperty("builder.manager") + ":1099"); > env.put(Context.URL_PKG_PREFIXES, > "org.jboss.naming:org.jnp.interfaces"); > > ctx = new InitialContext(env); > > bind = new String("//" + props.getProperty("my.hostname") > + "/myAgent"); > > Naming.rebind(bind, this); > ... > > --- Interface Code > > public interface IAgent extends Remote { > public int getPulse() throws RemoteException; > } > > --- Client Code > > IAgent agent = null; > int pulse = 0; > > try { > String toAgent = "rmi://" + node + "/myAgent"; > > agent = (IAgent) Naming.lookup(toAgent); > pulse = (int) agent.getPulse(); > } > ... > > --- java.policy > grant { > permission java.securityAllPermission; > } > > > > ------------------------------------------------------- > This sf.net email is sponsored by:ThinkGeek > Welcome to geek heaven. > http://thinkgeek.com/sf > _______________________________________________ > JBoss-user mailing list > JBo...@li... > https://lists.sourceforge.net/lists/listinfo/jboss-user |