On 8/16/2010 4:58 AM, Jonathan Costers wrote:
[java] Test process was destroyed and returned code 1 [java] com/sun/jini/test/impl/joinmanager/LeaseRenewDurRFE.td [java] Test Failed: Unexpected Exception in setup: java.security.AccessControlException: origin is non-local hostI had the same issue on Ubuntu. The reason seems to be the default network configuration in Ubuntu: jonat...@calisto:~$ cat /etc/hosts 127.0.0.1 localhost 127.0.1.1 calisto Notice the second line. Now, in com.sun.jini.phoenix.LocalAccess, a check is being done on whether the client is a local host: ... InetAddress addr = host.getClientHost(); Boolean ok = (Boolean) cache.get(addr); if (ok == null) { try { ok = Boolean.valueOf(NetworkInterface.getByInetAddress( addr) != null); } catch (IOException e) { ok = Boolean.FALSE; } cache.put(addr, ok); } if (!ok.booleanValue()) { throw new AccessControlException("origin is non-local host"); } However, this check does not work for the above configuration in Ubuntu (hostname associated with a loopback address, but not with 127.0.0.1). The check only looks at physical network interfaces to determine whether the client is a local host. A fix could be to add an extra check on loopback addresses (which I tested and seems to work in my case): ok = Boolean.valueOf(NetworkInterface.getByInetAddress( addr) != null || addr.isLoopbackAddress()); Or to change /etc/hosts (which I've also tested): 127.0.0.1 localhost calisto
I would like to resolve this by recommending a change to the source code. It seems undesirable to require a change to the default Ubuntu configuration to run the tests. LocalAccess needs to accept the result of InetAddress.getLocalHost() as being local. Loopback addresses do seem to be inherently local.
Is there a Jira issue for it? It seems to be possibly related to https://issues.apache.org/jira/browse/RIVER-183.
Patricia
