You are viewing a plain text version of this content. The canonical link for it is here.
Posted to hdfs-dev@hadoop.apache.org by Yuanbo Liu <li...@gmail.com> on 2016/09/29 06:54:57 UTC

How to setup local environment to run kerberos test cases.

Hi, developers
I'd like to run kerberos test cases in my local machine, such as
"TestSecureNameNode", but I can't make it. Can anybody tell me how to setup
local environment so that those test cases can run successfully. Any help
will be appreciated, thanks in advance.

Re: How to setup local environment to run kerberos test cases.

Posted by Rakesh Radhakrishnan <ra...@apache.org>.
May be its due to file permission issues or something else. The test uses
MiniKdc, which is based on Apache Directory Server and is embedded in test
cases. Could you share the complete logs of the failed test, I think you
can look at the your machine/env location:

$HADOOP_HOME/hadoop-hdfs-project/hadoop-hdfs/target/surefire-reports/org.apache.hadoop.hdfs.server.namenode.TestSecureNameNode-output.txt

Thanks,
Rakesh

On Thu, Sep 29, 2016 at 1:13 PM, Yuanbo Liu <li...@gmail.com> wrote:

> Hi, Rakesh
> Thanks for your response. Those docs are helpful but not what I'm asking. I
> was running test cases in my local machine, some test cases threw
> exception.
> For example:
>     mvn clean package -Dtest=TestSecureNameNode
> it threw:
>
> Tests run: 2, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 50.024 sec
> <<< FAILURE! - in org.apache.hadoop.hdfs.server.
> namenode.TestSecureNameNode
> testName(org.apache.hadoop.hdfs.server.namenode.TestSecureNameNode)  Time
> elapsed: 48.552 sec  <<< ERROR!
> java.io.IOException: Failed on local exception: java.io.IOException:
> Couldn't setup connection for hdfs/localhost@EXAMPLE.COM to
> localhost.localdomain/127.0.0.1:43815; Host Details : local host is:
> "localhost.localdomain/127.0.0.1"; destination host is:
> "localhost.localdomain":43815;
> at sun.security.krb5.KdcComm.send(KdcComm.java:242)
> at sun.security.krb5.KdcComm.send(KdcComm.java:200)
> at sun.security.krb5.KrbTgsReq.send(KrbTgsReq.java:254)
> at sun.security.krb5.KrbTgsReq.sendAndGetCreds(KrbTgsReq.java:269)
> at
> sun.security.krb5.internal.CredentialsUtil.serviceCreds(
> CredentialsUtil.java:302)
> at
> sun.security.krb5.internal.CredentialsUtil.acquireServiceCreds(
> CredentialsUtil.java:120)
> at sun.security.krb5.Credentials.acquireServiceCreds(Credentials.java:458)
> at sun.security.jgss.krb5.Krb5Context.initSecContext(Krb5Context.java:693)
> at sun.security.jgss.GSSContextImpl.initSecContext(
> GSSContextImpl.java:248)
>
> This test case is related to Kerberos. I guess I need to setup something
> before I run it, but I don't know how to do it. Any thoughts?
>

Re: How to setup local environment to run kerberos test cases.

Posted by Steve Loughran <st...@hortonworks.com>.
> On 29 Sep 2016, at 08:43, Yuanbo Liu <li...@gmail.com> wrote:
> 
> Hi, Rakesh
> Thanks for your response. Those docs are helpful but not what I'm asking. I
> was running test cases in my local machine, some test cases threw
> exception.
> For example:
>    mvn clean package -Dtest=TestSecureNameNode
> it threw:
> 
> Tests run: 2, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 50.024 sec
> <<< FAILURE! - in org.apache.hadoop.hdfs.server.namenode.TestSecureNameNode
> testName(org.apache.hadoop.hdfs.server.namenode.TestSecureNameNode)  Time
> elapsed: 48.552 sec  <<< ERROR!
> java.io.IOException: Failed on local exception: java.io.IOException:
> Couldn't setup connection for hdfs/localhost@EXAMPLE.COM to
> localhost.localdomain/127.0.0.1:43815; Host Details : local host is:
> "localhost.localdomain/127.0.0.1"; destination host is:
> "localhost.localdomain":43815;
> at sun.security.krb5.KdcComm.send(KdcComm.java:242)
> at sun.security.krb5.KdcComm.send(KdcComm.java:200)
> at sun.security.krb5.KrbTgsReq.send(KrbTgsReq.java:254)
> at sun.security.krb5.KrbTgsReq.sendAndGetCreds(KrbTgsReq.java:269)
> at
> sun.security.krb5.internal.CredentialsUtil.serviceCreds(CredentialsUtil.java:302)
> at
> sun.security.krb5.internal.CredentialsUtil.acquireServiceCreds(CredentialsUtil.java:120)
> at sun.security.krb5.Credentials.acquireServiceCreds(Credentials.java:458)
> at sun.security.jgss.krb5.Krb5Context.initSecContext(Krb5Context.java:693)
> at sun.security.jgss.GSSContextImpl.initSecContext(GSSContextImpl.java:248)
> 
> This test case is related to Kerberos. I guess I need to setup something
> before I run it, but I don't know how to do it. Any thoughts?


Firewall? Or it's an ubuntu machine and /etc/hosts has had things done to the loop back address of localhost?

---------------------------------------------------------------------
To unsubscribe, e-mail: hdfs-dev-unsubscribe@hadoop.apache.org
For additional commands, e-mail: hdfs-dev-help@hadoop.apache.org


Re: How to setup local environment to run kerberos test cases.

Posted by Yuanbo Liu <li...@gmail.com>.
Hi, Rakesh
Thanks for your response. Those docs are helpful but not what I'm asking. I
was running test cases in my local machine, some test cases threw
exception.
For example:
    mvn clean package -Dtest=TestSecureNameNode
it threw:

Tests run: 2, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 50.024 sec
<<< FAILURE! - in org.apache.hadoop.hdfs.server.namenode.TestSecureNameNode
testName(org.apache.hadoop.hdfs.server.namenode.TestSecureNameNode)  Time
elapsed: 48.552 sec  <<< ERROR!
java.io.IOException: Failed on local exception: java.io.IOException:
Couldn't setup connection for hdfs/localhost@EXAMPLE.COM to
localhost.localdomain/127.0.0.1:43815; Host Details : local host is:
"localhost.localdomain/127.0.0.1"; destination host is:
"localhost.localdomain":43815;
at sun.security.krb5.KdcComm.send(KdcComm.java:242)
at sun.security.krb5.KdcComm.send(KdcComm.java:200)
at sun.security.krb5.KrbTgsReq.send(KrbTgsReq.java:254)
at sun.security.krb5.KrbTgsReq.sendAndGetCreds(KrbTgsReq.java:269)
at
sun.security.krb5.internal.CredentialsUtil.serviceCreds(CredentialsUtil.java:302)
at
sun.security.krb5.internal.CredentialsUtil.acquireServiceCreds(CredentialsUtil.java:120)
at sun.security.krb5.Credentials.acquireServiceCreds(Credentials.java:458)
at sun.security.jgss.krb5.Krb5Context.initSecContext(Krb5Context.java:693)
at sun.security.jgss.GSSContextImpl.initSecContext(GSSContextImpl.java:248)

This test case is related to Kerberos. I guess I need to setup something
before I run it, but I don't know how to do it. Any thoughts?

Re: How to setup local environment to run kerberos test cases.

Posted by Rakesh Radhakrishnan <ra...@apache.org>.
I hope the following documents will help you, it contains the details about
the way to build and run hadoop test cases. Please take a look at it.

https://github.com/apache/hadoop/blob/branch-2.7.3/BUILDING.txt
http://hadoop.apache.org/docs/r2.7.3/hadoop-auth/BuildingIt.html

Please give few more details if you are facing any specific issue, that
would help to dig into it.

Thanks,
Rakesh

On Thu, Sep 29, 2016 at 12:24 PM, Yuanbo Liu <li...@gmail.com> wrote:

> Hi, developers
> I'd like to run kerberos test cases in my local machine, such as
> "TestSecureNameNode", but I can't make it. Can anybody tell me how to setup
> local environment so that those test cases can run successfully. Any help
> will be appreciated, thanks in advance.
>