-
Bug
-
Resolution: Done
-
Major
-
JBossAS-4.0.4.GA
-
None
http://wiki.jboss.org/wiki/Wiki.jsp?page=UsingJBossBehindAFirewall mentions the parameter "java.rmi.server.hostname" to set if the external host name differs from the local host (e.g. server machine is behind a firewall)
But org.jboss.web.WebService doesn'r recognize this parameter:
String hostname = server.getBindAddress(); // this always returns something, at least "0.0.0.0"!
// If not user specified hostname given, then try to determine what it should be
if (hostname == null) //this branch is never executed!
{
// First look for the rmi server name
try
catch (SecurityException e)
{ // ignore, but don't be silent ThrowableHandler.addWarning(e); } // else use the localhost name
if (hostname == null)
{
try
catch (IOException e)
{ log.error("Failed to get localhost name; ignoring", e); }}
if (hostname != null)
{ setHost(hostname); } }
// Host must be set to continue (either by user or detection)
String address = getHost();
if (address == null)
throw new MissingAttributeException("Host");
// Set the rmi codebase if it is not already set
String codebase = System.getProperty("java.rmi.server.codebase");
if (codebase == null)
log.info("Using RMI server codebase: " + codebase);
So the resulting problem is that codebase contains an address which is not reachable from the other side of firewall because "java.rmi.server.hostname" is not recognized (same for "-Djava.rmi.server.useLocalHostname=false" )
Example:
JBoss started with parameter set "-Djava.rmi.server.hostname=as2.subdomain1.subdomain2.test.com"
but (thanks to rmi logging) the proxy objects on client side have codebase set to "http://as2:<port>" and not to "http://as2.subdomain1.subdomain2.test.com:<port>" as expected.
JBoss 4 runs on a linux machine
hostname --> "as2"
hostname -f --> "as2.subdomain1.subdomain2.test.com"
- blocks
-
JBPAPP-104 excepiiop tests failing with ExceptionThrower NullPointerException
- Closed
- relates to
-
JBAS-4892 WebService ignores java.rmi.server.codebase system property
- Closed