You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@directory.apache.org by Colm O hEigeartaigh <co...@apache.org> on 2015/11/02 13:28:54 UTC

Re: Trunk broken?

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 <ma...@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

Re: Trunk broken?

Posted by Colm O hEigeartaigh <co...@apache.org>.
Thanks Stefan, all is working fine now.

Colm.

On Sat, Nov 7, 2015 at 8:33 AM, Stefan Seelmann <ma...@stefan-seelmann.de>
wrote:

> On 11/06/2015 10:40 AM, Colm O hEigeartaigh wrote:
> > Stefan, do you want me to take care of this change to KerberosTestUtils?
>
> Hi Colm, I commited the change here:
> http://svn.apache.org/viewvc?rev=1713092&view=rev
>
> I run the build on Jenkins and it worked fine.
>
> @all: Please also check if the ApacheDS build, and in particular the
> kerberos related tests, still work on your environment.
>
> Kind Regards,
> Stefan
>
>


-- 
Colm O hEigeartaigh

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

Re: Trunk broken?

Posted by Stefan Seelmann <ma...@stefan-seelmann.de>.
On 11/06/2015 10:40 AM, Colm O hEigeartaigh wrote:
> Stefan, do you want me to take care of this change to KerberosTestUtils?

Hi Colm, I commited the change here:
http://svn.apache.org/viewvc?rev=1713092&view=rev

I run the build on Jenkins and it worked fine.

@all: Please also check if the ApacheDS build, and in particular the
kerberos related tests, still work on your environment.

Kind Regards,
Stefan


Re: Trunk broken?

Posted by Colm O hEigeartaigh <co...@apache.org>.
Stefan, do you want me to take care of this change to KerberosTestUtils?

Colm.

On Mon, Nov 2, 2015 at 12:28 PM, Colm O hEigeartaigh <co...@apache.org>
wrote:

> 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 <ma...@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
>



-- 
Colm O hEigeartaigh

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