-
-
2. Re: Extenal Client Lookup
mlivingston Apr 23, 2003 2:33 PM (in response to eslam_ma)I am having the same problem using RedHat Linux 8.0. Same .ear file deployed on a Win2K box works fine. Here is my information.
Context jndiContext;
Properties env = new Properties();
env.put(Context.INITIAL_CONTEXT_FACTORY, "org.jnp.interfaces.NamingContextFactory");
env.put("java.naming.provider.url", ":1099");
env.put(Context.URL_PKG_PREFIXES,"org.jboss.naming:org.jnp.interfaces");
jndiContext = new InitialContext(env);
listContext(jndiContext, "");
The listContext method sets up NamingEnumeration and Binding objects to list the context data. The following error is thrown while trying to do this.
javax.naming.CommunicationException [Root exception is java.rmi.ConnectException: Connection refused to host: 127.0.0.1; nested exception is:
java.net.ConnectException: Connection refused: connect]
The RedHat installation is very very minimal and I think something is missing and not allowing the remote communication through port 1099. BTW, http traffic on this box works great as does ftp and telnet as these were properly set up. Any help is much appreciated. -
3. Re: Extenal Client Lookup
raja05 Apr 23, 2003 3:56 PM (in response to eslam_ma)For Redhat, add an entry in /etc/hosts that maps 127.0.0.1 to the
-
4. Re: Extenal Client Lookup
adrian.brock Apr 23, 2003 7:42 PM (in response to eslam_ma)Other way around, remove the mapping
of 127.0.0.1 to your hostname
Regards,
Adrian -
5. Re: Extenal Client Lookup
mlivingston Apr 23, 2003 7:52 PM (in response to eslam_ma)Adding the map in the hosts file did not work.
However, if I start the JBoss server with -Djava.rmi.server.hostname= parameter everything works fine!
It seems strange that the remote connection works fine on Windows but requires this parameter when starting JBoss on RedHat Linux. Try this and see if it solves your problem.