phoenix-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From anil gupta <anilgupt...@gmail.com>
Subject Re: Issue with connecting to Phoenix in kerberised cluster.
Date Wed, 06 Jan 2016 06:57:30 GMT
Hi Durga,

Can you kinit using the same keytab/principal from the node you are trying
to run this program? Is your program able to read keytab file?
Can you try to run this program from the same node that is running sqlline.
Also, dont pass the jdbcjaas.conf this time.
This line seems to provide most info about the problem:
Caused by: java.io.IOException: Login failure for testuser@ENT.LOCAL from
keytab /home/testuser/testuser.keytab:
*javax.security.auth.login.**LoginException:
Unable to obtain password from user*

This seems to point that most probably there is a problem with your keytab,
principal or kerberos setup. I am not an expert at kerberos security. So,
maybe you can also consult with security experts at your workplace.

You can also refer to following links where solution to similar problem is
provided:
1.
http://stackoverflow.com/questions/29844339/kerberos-spring-javax-security-auth-login-loginexception-unable-to-obtain-passw
2.
https://support.pivotal.io/hc/en-us/articles/201914097-Hadoop-daemons-in-a-secured-cluster-fails-to-start-with-Unable-to-obtain-password-from-user-
3.
http://www.moundalexis.com/tm/2013/11/15/two-tiny-problems-while-enabling-kerberos-on-hadoop/
4.
https://community.cloudera.com/t5/CDH-Manual-Installation/Kerberos-integration-issue-s-with-hadoop-HA/td-p/24794

Thanks,
Anil Gupta

On Tue, Jan 5, 2016 at 8:18 PM, Ns G <nsgnsg84@gmail.com> wrote:

> Hi Team,
>
> Any idea with this issue? We are struck up with this issue and we need to
> provide a solution before Jan 8th.
> Any sugesstions, guidance please.
>
> Thanks,
> Durga Prasad
>
> On Thu, Dec 31, 2015 at 12:14 PM, Ns G <nsgnsg84@gmail.com> wrote:
>
>> Hi There,
>>
>> Here is my JDBC connection string.
>>
>> My Hbase Cluster is health and Master is running. I am able to run
>> Sqlline successfully.
>>
>> jdbc:phoenix:<zookeeperquorum>:2181:/hbase:testuser@ENT.LOCAL
>> :/home/testuser/testuser.keytab
>>
>> I am executing the prog through following command
>>
>> *java '-Djava.security.auth.login.config='/home/testuser/jdbcjaas.conf
>> -cp
>> ".:/etc/hadoop/conf:/etc/hbase/conf:/home/testuser/nre/TestJDBC-0.0.1.jar"
>> com.test.FirstExample*
>>
>> I am getting the below error message
>>
>>
>> 15/12/31 01:30:19 INFO query.ConnectionQueryServicesImpl: Trying to
>> connect to a secure cluster with keytab:/home/testuser/testuser.keytab
>> Exception occured:java.sql.SQLException: ERROR 103 (08004): Unable to
>> establish connection.
>> java.sql.SQLException: ERROR 103 (08004): Unable to establish connection.
>>         at
>> org.apache.phoenix.exception.SQLExceptionCode$Factory$1.newException(SQLExceptionCode.java:388)
>>         at
>> org.apache.phoenix.exception.SQLExceptionInfo.buildException(SQLExceptionInfo.java:145)
>>         at
>> org.apache.phoenix.query.ConnectionQueryServicesImpl.openConnection(ConnectionQueryServicesImpl.java:296)
>>         at
>> org.apache.phoenix.query.ConnectionQueryServicesImpl.access$300(ConnectionQueryServicesImpl.java:179)
>>         at
>> org.apache.phoenix.query.ConnectionQueryServicesImpl$12.call(ConnectionQueryServicesImpl.java:1917)
>>         at
>> org.apache.phoenix.query.ConnectionQueryServicesImpl$12.call(ConnectionQueryServicesImpl.java:1896)
>>         at
>> org.apache.phoenix.util.PhoenixContextExecutor.call(PhoenixContextExecutor.java:77)
>>         at
>> org.apache.phoenix.query.ConnectionQueryServicesImpl.init(ConnectionQueryServicesImpl.java:1896)
>>         at
>> org.apache.phoenix.jdbc.PhoenixDriver.getConnectionQueryServices(PhoenixDriver.java:180)
>>         at
>> org.apache.phoenix.jdbc.PhoenixEmbeddedDriver.connect(PhoenixEmbeddedDriver.java:132)
>>         at
>> org.apache.phoenix.jdbc.PhoenixDriver.connect(PhoenixDriver.java:151)
>>         at java.sql.DriverManager.getConnection(DriverManager.java:571)
>>         at java.sql.DriverManager.getConnection(DriverManager.java:233)
>>         at com.test.FirstExample.main(FirstExample.java:24)
>> Caused by: java.io.IOException: Login failure for testuser@ENT.LOCAL
>> from keytab /home/testuser/testuser.keytab:
>> javax.security.auth.login.LoginException: Unable to obtain password from
>> user
>>
>>         at
>> org.apache.hadoop.security.UserGroupInformation.loginUserFromKeytab(UserGroupInformation.java:976)
>>         at
>> org.apache.hadoop.security.SecurityUtil.login(SecurityUtil.java:243)
>>         at
>> org.apache.hadoop.hbase.security.User$SecureHadoopUser.login(User.java:383)
>>         at org.apache.hadoop.hbase.security.User.login(User.java:250)
>>         at
>> org.apache.phoenix.query.ConnectionQueryServicesImpl.openConnection(ConnectionQueryServicesImpl.java:291)
>>         ... 11 more
>> Caused by: javax.security.auth.login.LoginException: Unable to obtain
>> password from user
>>
>>         at
>> com.sun.security.auth.module.Krb5LoginModule.promptForPass(Krb5LoginModule.java:856)
>>         at
>> com.sun.security.auth.module.Krb5LoginModule.attemptAuthentication(Krb5LoginModule.java:719)
>>         at
>> com.sun.security.auth.module.Krb5LoginModule.login(Krb5LoginModule.java:584)
>>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>>         at
>> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
>>         at
>> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>>         at java.lang.reflect.Method.invoke(Method.java:606)
>>         at
>> javax.security.auth.login.LoginContext.invoke(LoginContext.java:762)
>>         at
>> javax.security.auth.login.LoginContext.access$000(LoginContext.java:203)
>>         at
>> javax.security.auth.login.LoginContext$4.run(LoginContext.java:690)
>>         at
>> javax.security.auth.login.LoginContext$4.run(LoginContext.java:688)
>>         at java.security.AccessController.doPrivileged(Native Method)
>>         at
>> javax.security.auth.login.LoginContext.invokePriv(LoginContext.java:687)
>>         at
>> javax.security.auth.login.LoginContext.login(LoginContext.java:595)
>>         at
>> org.apache.hadoop.security.UserGroupInformation.loginUserFromKeytab(UserGroupInformation.java:967)
>>         ... 15 more
>>
>> jdbcjaas.conf file
>>
>> com.sun.security.jgss.initiate {
>>     com.sun.security.auth.module.Krb5LoginModule required
>>     useKeyTab=true
>>     useTicketCache=false
>>     keyTab="testuser.keytab"
>>     principal="testuser@ENT.LOCAL"
>>     debug=true;
>> };
>>
>>
>>
>> Any help is really appreciated.
>>
>> Thanks,
>> Durga Prasad
>>
>>
>>
>>
>>
>> On Tue, Dec 29, 2015 at 11:01 PM, Josh Elser <josh.elser@gmail.com>
>> wrote:
>>
>>>
>>>
>>> Ns G wrote:
>>>
>>>> Hi All,
>>>>
>>>> I have written a simple class to access phoenix.
>>>> I am able to establish connection. But when executing below line i get
>>>> the error.
>>>>
>>>> conn = DriverManager.getConnection(dbUrl);
>>>>
>>>> I am facing below exception when accessing phoenix through JDBC from
>>>> eclipse.
>>>>
>>>>
>>>> INFO - Call exception, tries=25, retries=35, started=388547 ms ago,
>>>> cancelled=false, msg=
>>>> INFO - Call exception, tries=26, retries=35, started=410087 ms ago,
>>>> cancelled=false, msg=
>>>> INFO - Call exception, tries=27, retries=35, started=431608 ms ago,
>>>> cancelled=false, msg=
>>>> INFO - Call exception, tries=28, retries=35, started=452849 ms ago,
>>>> cancelled=false, msg=
>>>>
>>>> and finally
>>>>
>>>> it gives me error like
>>>>
>>>> org.apache.hadoop.hbase.MasterNotRunningException:
>>>> com.google.protobuf.ServiceException:
>>>> org.apache.hadoop.hbase.exceptions.ConnectionClosingException: Call to
>>>>
>>>>
>>> Is your HBase cluster healthy? This exception implies that the HMaster
>>> is not running as expected.
>>>
>>>
>>>
>>>> any idea what may be the issue?
>>>>
>>>> Thanks,
>>>> Durga Prasad
>>>>
>>>
>>
>


-- 
Thanks & Regards,
Anil Gupta

Mime
View raw message