It took a lot of time, but finally I solved a crazy problem.

If the server PC has more than one network interface, with different IP addresses 
(e.g. an ADSL interface for internet, and an ethernet interface for a local area 
network), problems may arise accessing the server (Jboss or RMI) from outer world, 
because RMI re-routes the server activity to the LAN address while serving the 
requests coming from the WAN.

The solution is to set the property java.rmi.server.hostname assigning as value the IP 
name or the IP address of the WAN interface.

For RMI, you must put the following statement in the server application:

System.setProperty("java.rmi.server.hostname",<WAN IP address>);
before binding the implementation class in registry.

e.g. System.setProperty("java.rmi.server.hostname","213.155.201.243");
or: System.setProperty("java.rmi.server.hostname","myhost.mydom.com");

For Jboss, the server must be launched with the command:

run.bat -Djava.rmi.server.hostname=<WAN IP address>

Hope this will help somebody.
Luigi Fonti

View the original post : 
http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3829936#3829936

Reply to the post : 
http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3829936


-------------------------------------------------------
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click
_______________________________________________
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to