[ 
https://issues.apache.org/jira/browse/DRILL-5433?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15968084#comment-15968084
 ] 

Parag Darji commented on DRILL-5433:
------------------------------------

I will check on scenario 1.
Sorry I forgot to kinit for option 2:
{code}
test@altbthdlhdpsb01:/home/test> sqlline -u 
"jdbc:drill:drillbit=host1.fqdn;auth=kerberos;principal=drill/lad...@lab.com"
Bad level value for property: java.util.logging.ConsoleHandler.level
Error: Failure in connecting to Drill: org.apache.drill.exec.rpc.RpcException: 
CONNECTION : java.nio.channels.UnresolvedAddressException (state=,code=0)
java.sql.SQLException: Failure in connecting to Drill: 
org.apache.drill.exec.rpc.RpcException: CONNECTION : 
java.nio.channels.UnresolvedAddressException
        at 
org.apache.drill.jdbc.impl.DrillConnectionImpl.<init>(DrillConnectionImpl.java:166)
        at 
org.apache.drill.jdbc.impl.DrillJdbc41Factory.newDrillConnection(DrillJdbc41Factory.java:72)
        at 
org.apache.drill.jdbc.impl.DrillFactory.newConnection(DrillFactory.java:69)
        at 
org.apache.calcite.avatica.UnregisteredDriver.connect(UnregisteredDriver.java:143)
        at org.apache.drill.jdbc.Driver.connect(Driver.java:72)
        at sqlline.DatabaseConnection.connect(DatabaseConnection.java:167)
        at sqlline.DatabaseConnection.getConnection(DatabaseConnection.java:213)
        at sqlline.Commands.connect(Commands.java:1083)
        at sqlline.Commands.connect(Commands.java:1015)
        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 
sqlline.ReflectiveCommandHandler.execute(ReflectiveCommandHandler.java:36)
        at sqlline.SqlLine.dispatch(SqlLine.java:742)
        at sqlline.SqlLine.initArgs(SqlLine.java:528)
        at sqlline.SqlLine.begin(SqlLine.java:596)
        at sqlline.SqlLine.start(SqlLine.java:375)
        at sqlline.SqlLine.main(SqlLine.java:268)
Caused by: org.apache.drill.exec.rpc.RpcException: CONNECTION : 
java.nio.channels.UnresolvedAddressException
        at 
org.apache.drill.exec.rpc.user.UserClient$2.connectionFailed(UserClient.java:181)
        at 
org.apache.drill.exec.rpc.user.QueryResultHandler$ChannelClosedHandler.connectionFailed(QueryResultHandler.java:389)
        at 
org.apache.drill.exec.rpc.BasicClient$ConnectionMultiListener$ConnectionHandler.operationComplete(BasicClient.java:249)
        at 
org.apache.drill.exec.rpc.BasicClient$ConnectionMultiListener$ConnectionHandler.operationComplete(BasicClient.java:212)
        at 
io.netty.util.concurrent.DefaultPromise.notifyListener0(DefaultPromise.java:680)
        at 
io.netty.util.concurrent.DefaultPromise.notifyListeners(DefaultPromise.java:567)
        at 
io.netty.util.concurrent.DefaultPromise.tryFailure(DefaultPromise.java:424)
        at 
io.netty.channel.nio.AbstractNioChannel$AbstractNioUnsafe.connect(AbstractNioChannel.java:235)
        at 
io.netty.channel.DefaultChannelPipeline$HeadContext.connect(DefaultChannelPipeline.java:1089)
        at 
io.netty.channel.AbstractChannelHandlerContext.invokeConnect(AbstractChannelHandlerContext.java:543)
        at 
io.netty.channel.AbstractChannelHandlerContext.connect(AbstractChannelHandlerContext.java:528)
        at 
io.netty.channel.ChannelOutboundHandlerAdapter.connect(ChannelOutboundHandlerAdapter.java:47)
        at 
io.netty.channel.AbstractChannelHandlerContext.invokeConnect(AbstractChannelHandlerContext.java:543)
        at 
io.netty.channel.AbstractChannelHandlerContext.connect(AbstractChannelHandlerContext.java:528)
        at 
io.netty.channel.ChannelDuplexHandler.connect(ChannelDuplexHandler.java:50)
        at 
io.netty.channel.AbstractChannelHandlerContext.invokeConnect(AbstractChannelHandlerContext.java:543)
        at 
io.netty.channel.AbstractChannelHandlerContext.connect(AbstractChannelHandlerContext.java:528)
        at 
io.netty.channel.AbstractChannelHandlerContext.connect(AbstractChannelHandlerContext.java:510)
        at 
io.netty.channel.DefaultChannelPipeline.connect(DefaultChannelPipeline.java:909)
        at io.netty.channel.AbstractChannel.connect(AbstractChannel.java:203)
        at io.netty.bootstrap.Bootstrap$2.run(Bootstrap.java:165)
        at 
io.netty.util.concurrent.SingleThreadEventExecutor.runAllTasks(SingleThreadEventExecutor.java:357)
        at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:357)
        at 
io.netty.util.concurrent.SingleThreadEventExecutor$2.run(SingleThreadEventExecutor.java:111)
        at java.lang.Thread.run(Thread.java:745)
Caused by: java.util.concurrent.ExecutionException: 
java.nio.channels.UnresolvedAddressException
        at io.netty.util.concurrent.AbstractFuture.get(AbstractFuture.java:47)
        at 
org.apache.drill.exec.rpc.BasicClient$ConnectionMultiListener$ConnectionHandler.operationComplete(BasicClient.java:225)
        ... 22 more
Caused by: java.nio.channels.UnresolvedAddressException
        at sun.nio.ch.Net.checkAddress(Net.java:127)
        at sun.nio.ch.SocketChannelImpl.connect(SocketChannelImpl.java:644)
        at 
io.netty.channel.socket.nio.NioSocketChannel.doConnect(NioSocketChannel.java:209)
        at 
io.netty.channel.nio.AbstractNioChannel$AbstractNioUnsafe.connect(AbstractNioChannel.java:199)
        ... 17 more
apache drill 1.10.0
"got drill?"
{code}

> Authentication failed: Server requires authentication using [kerberos, plain]
> -----------------------------------------------------------------------------
>
>                 Key: DRILL-5433
>                 URL: https://issues.apache.org/jira/browse/DRILL-5433
>             Project: Apache Drill
>          Issue Type: Task
>          Components: Functions - Drill
>    Affects Versions: 1.10.0
>         Environment: OS: Redhat Linux 6.7, HDP 2.5.3, Kerberos enabled, 
> Hardware: VmWare
>            Reporter: Parag Darji
>            Priority: Minor
>              Labels: newbie, security
>             Fix For: 1.10.0
>
>   Original Estimate: 168h
>  Remaining Estimate: 168h
>
> I've setup Apace drill 1.10.0 on RHEL 6.7, HDP 2.5.3, kerberos enabled
> I'm getting below error while running "drill-conf" or sqlline as user "drill" 
> which is configured in the "drill-override.conf" file. 
> {code}
> drill@host:/opt/drill/bin>  drill-conf
> Error: Failure in connecting to Drill: 
> org.apache.drill.exec.rpc.NonTransientRpcException: 
> javax.security.sasl.SaslException: Authentication failed: Server requires 
> authentication using [kerberos, plain]. Insufficient credentials? [Caused by 
> javax.security.sasl.SaslException: Server requires authentication using 
> [kerberos, plain]. Insufficient credentials?] (state=,code=0)
> java.sql.SQLException: Failure in connecting to Drill: 
> org.apache.drill.exec.rpc.NonTransientRpcException: 
> javax.security.sasl.SaslException: Authentication failed: Server requires 
> authentication using [kerberos, plain]. Insufficient credentials? [Caused by 
> javax.security.sasl.SaslException: Server requires authentication using 
> [kerberos, plain]. Insufficient credentials?]
>         at 
> org.apache.drill.jdbc.impl.DrillConnectionImpl.<init>(DrillConnectionImpl.java:166)
>         at 
> org.apache.drill.jdbc.impl.DrillJdbc41Factory.newDrillConnection(DrillJdbc41Factory.java:72)
>         at 
> org.apache.drill.jdbc.impl.DrillFactory.newConnection(DrillFactory.java:69)
>         at 
> org.apache.calcite.avatica.UnregisteredDriver.connect(UnregisteredDriver.java:143)
>         at org.apache.drill.jdbc.Driver.connect(Driver.java:72)
>         at sqlline.DatabaseConnection.connect(DatabaseConnection.java:167)
>         at 
> sqlline.DatabaseConnection.getConnection(DatabaseConnection.java:213)
>         at sqlline.Commands.connect(Commands.java:1083)
>         at sqlline.Commands.connect(Commands.java:1015)
>         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 
> sqlline.ReflectiveCommandHandler.execute(ReflectiveCommandHandler.java:36)
>         at sqlline.SqlLine.dispatch(SqlLine.java:742)
>         at sqlline.SqlLine.initArgs(SqlLine.java:528)
>         at sqlline.SqlLine.begin(SqlLine.java:596)
>         at sqlline.SqlLine.start(SqlLine.java:375)
>         at sqlline.SqlLine.main(SqlLine.java:268)
> Caused by: org.apache.drill.exec.rpc.NonTransientRpcException: 
> javax.security.sasl.SaslException: Authentication failed: Server requires 
> authentication using [kerberos, plain]. Insufficient credentials? [Caused by 
> javax.security.sasl.SaslException: Server requires authentication using 
> [kerberos, plain]. Insufficient credentials?]
>         at 
> org.apache.drill.exec.rpc.user.UserClient.connect(UserClient.java:157)
>         at 
> org.apache.drill.exec.client.DrillClient.connect(DrillClient.java:432)
>         at 
> org.apache.drill.exec.client.DrillClient.connect(DrillClient.java:379)
>         at 
> org.apache.drill.jdbc.impl.DrillConnectionImpl.<init>(DrillConnectionImpl.java:157)
>         ... 18 more
> Caused by: javax.security.sasl.SaslException: Authentication failed: Server 
> requires authentication using [kerberos, plain]. Insufficient credentials? 
> [Caused by javax.security.sasl.SaslException: Server requires authentication 
> using [kerberos, plain]. Insufficient credentials?]
>         at 
> org.apache.drill.exec.rpc.user.UserClient$3.mapException(UserClient.java:204)
>         at 
> org.apache.drill.exec.rpc.user.UserClient$3.mapException(UserClient.java:197)
>         at 
> com.google.common.util.concurrent.AbstractCheckedFuture.checkedGet(AbstractCheckedFuture.java:85)
>         at 
> org.apache.drill.exec.rpc.user.UserClient.connect(UserClient.java:155)
>         ... 21 more
> Caused by: javax.security.sasl.SaslException: Server requires authentication 
> using [kerberos, plain]. Insufficient credentials?
>         at 
> org.apache.drill.exec.rpc.user.UserClient.getAuthenticatorFactory(UserClient.java:285)
>         at 
> org.apache.drill.exec.rpc.user.UserClient.authenticate(UserClient.java:216)
>         ... 22 more
> apache drill 1.10.0
> "this isn't your grandfather's sql"
> {code}
> Same error when running below command:
> {code}
> sqlline --maxWidth=10000 -u 
> "jdbc:drill:drillbit=host1.fqdn;auth=kerberos;principal=drill/lad...@lab.com"
> {code}
> "Drill" user has has valid keytab/ticket.
> The Drill UI is working fine with local authentication.
> drill-override.conf file:
> {code}
> drill.exec: {
>   cluster-id: "drillbits1",
>   zk.connect: "host1.fqdn:2181,host2.fqdn:2181,host3.fqdn:2181",
>   security: {
>           user.auth.enabled: true,
>           user.auth.impl: "pam",
>           user.auth.pam_profiles: [ "sudo", "login" ],
>           packages += "org.apache.drill.exec.rpc.user.security",
>           auth.mechanisms: ["KERBEROS","PLAIN"],
>           auth.principal: "drill/lab...@lab.com",
>           auth.keytab: "/opt/drill/.keytab/drill.keytab"
>         }
> }
> {code}
> {code}
> cat drill-env.sh | egrep -v '^#|^$'
> export DRILLBIT_JAVA_OPTS="-Djava.library.path=/opt/pam/JPam-1.1/"
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

Reply via email to