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.
Properties env = new Properties();
jndiContext = new InitialContext(env);
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.
For Redhat, add an entry in /etc/hosts that maps 127.0.0.1 to the
Other way around, remove the mapping
of 127.0.0.1 to your hostname
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.