directory-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Colm O hEigeartaigh <cohei...@apache.org>
Subject Re: Trunk broken?
Date Mon, 02 Nov 2015 12:28:54 GMT
Hi Stefan,

I've managed to get the tests passing with the change you suggested
(getCanonicalHostName()). It works when I modify my /etc/hosts so that both
"localhost" and my machine name have the same IP address (previously the
latter had 127.0.1.1):

127.0.0.1       localhost
127.0.1.1       colm-Precision-M4800

If they both map to 127.0.0.1 and only if the change is made to use
getCanonicalHostName() then the tests work. So I think we should update the
KerberosTestUtils to make this change.

Colm.

On Tue, Oct 27, 2015 at 9:53 PM, Stefan Seelmann <mail@stefan-seelmann.de>
wrote:

> On 10/27/2015 11:14 AM, Colm O hEigeartaigh wrote:
> > Thanks Stefan! My hostname is already in /etc/hosts matching "127.0.1.1".
> > What else am I missing?
>
> I played a bit with my /etc/hosts and found a setting where I can
> reproduce the test failure:
>
> $ cat /etc/hosts
> 127.0.1.1       t430.localdomain t430
> $ hostname -f
> t430.localdomain
> $ hostname -s
> t430
> $ hostname -i
> 127.0.1.1
>
> Note that the FQDN and short host name differ.
>
>
> The following change then fixed it for me, can you please also try this
> change on your machine?
>
> Index:
>
> src/test/java/org/apache/directory/server/kerberos/kdc/KerberosTestUtils.java
> ===================================================================
> ---
>
> src/test/java/org/apache/directory/server/kerberos/kdc/KerberosTestUtils.java
>       (revision 1710685)
> +++
>
> src/test/java/org/apache/directory/server/kerberos/kdc/KerberosTestUtils.java
>       (working copy)
> @@ -256,7 +256,7 @@
>          try
>          {
>              InetAddress loopback = InetAddress.getLocalHost();
> -            hostName = loopback.getHostName();
> +            hostName = loopback.getCanonicalHostName();
>          }
>          catch ( UnknownHostException e )
>          {
>
>
>


-- 
Colm O hEigeartaigh

Talend Community Coder
http://coders.talend.com

Mime
View raw message