here is what my NamingService comes up as
[NamingService] Started jndi bootstrap jnpPort=1099, rmiPort=1098, backlog=50, bindAddress=/0.0.0.0, Client SocketFactory......
Note the bindAddress
i added the -Djboss.bind.address=myipaddress and it fixes the bindAddress problem.
It does most of the bindAddress as myipaddress (ie my real ip addres) but some of them as http://mail:8083
? All the others say http://myipaddress:port but not
RMI codebase using http://mail:8083
As you already found out, by default, when an application binds to a port, it binds to address 0.0.0.0, which means "accept input from all IP addresses handled by the NICs on this machine". Thus is you set up your NIC to handle multiple IP addresses, or you have multiple NICs, you (or JBoss in this case) can receive requests on any of the addresses.
You also found that you can ask JBoss to bind to a specific address. By the way, you could have also simply run it as follows:
./run.sh -b mail
This causes JBoss to bind to that particular address. Note that when you do this, you will not be able to access any JBoss application from a browser using http://localhost:nnnn, because you did not bind to localhost (127.0.0.1).
Finally, are you asking why some of the log output shows the host name (mail) and others show the IP address (192.161.xxx.xxx)? They are both the same, some code just chooses to display one and other code chooses to display the other.
Thanks for replying.
I now understand better. Thanks