Configure fc3 for JBoss
Site Navigation:
 
 

Configure fc3 for JBoss

Author:  Sven Knispel
Updated:  [udate]

The following article deals with a problem encountered while setting up JBoss on fc3. While testing the setup I encountered following error connecting a remove EJB-client to JBoss 3.2.6:
connection refused on host 127.0.0.1.
After a few tests and discussions it comes out that this problem is not specific to fc3, but also happens with fc2 (and potentially any other distribution).

1. Cause of the error

The cause of the error is to be found in the file /etc/hosts. For an onknown reason the server name is associated with 127.0.0.1 instead of being associated the NICs IP address:

127.0.0.1 localhost.localdomain myserver localhost # Wrong entry

2. Solution

Despite the fact that JBoss' default configuration binds to any address (0.0.0.0) the connection can not be established from a client (not connecting to the IP nor to the name).
The reason is that the binding happens only on non-loopback IPs.

# 127.0.0.1 localhost.localdomain myserver localhost # commented out
127.0.0.1 locahost.localdomain localhost # all localhost definition stay on 127.0.0.1
192.168.21.50 ws-ftp.localdomain myserver # the box's name (myserver) is associated to the NIC's IP

Making that change had no side effects on any other daemon (sendmail, samba, apache, mySQL) running on that box.