Dan Burkert created KUDU-2142:
-
Summary: Client should resolve the canonical master hostname
before connecting
Key: KUDU-2142
URL: https://issues.apache.org/jira/browse/KUDU-2142
Project: Kudu
Issue Type: Improvement
Components: client
Affects Versions: 1.5.0
Reporter: Dan Burkert
When connecting to a secure (Kerberized) Kudu cluster, it's important that the
master hostname which the client is created with matches the Kerberos hostname.
A lot of tools (e.g. kudu-spark-tools) default to using {{localhost}} as the
master address. Since the client doesn't canonicalize the master address
before connecting, these tools will fail to connect. For example,
kudu-spark-tools 1.5 fails to connect to a secure cluster with the following
error (notice the {{localhost}} master address in the trace):
{code}
Exception in thread "main" java.security.PrivilegedActionException:
org.apache.kudu.client.NonRecoverableException: Couldn't find a valid master in
(localhost:7051). Exceptions received:
[org.apache.kudu.client.NonRecoverableException: Server requires Kerberos, but
this client is not authenticated (kinit)]
at java.security.AccessController.doPrivileged(Native Method)
at javax.security.auth.Subject.doAs(Subject.java:360)
at org.apache.kudu.spark.kudu.KuduContext.(KuduContext.scala:76)
at
org.apache.kudu.spark.tools.Generator$.run(IntegrationTestBigLinkedList.scala:155)
at
org.apache.kudu.spark.tools.Generator$.main(IntegrationTestBigLinkedList.scala:174)
at
org.apache.kudu.spark.tools.IntegrationTestBigLinkedList$.main(IntegrationTestBigLinkedList.scala:88)
at
org.apache.kudu.spark.tools.IntegrationTestBigLinkedList.main(IntegrationTestBigLinkedList.scala)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at
org.apache.spark.deploy.SparkSubmit$.org$apache$spark$deploy$SparkSubmit$$runMain(SparkSubmit.scala:755)
at
org.apache.spark.deploy.SparkSubmit$.doRunMain$1(SparkSubmit.scala:180)
at org.apache.spark.deploy.SparkSubmit$.submit(SparkSubmit.scala:205)
at org.apache.spark.deploy.SparkSubmit$.main(SparkSubmit.scala:119)
at org.apache.spark.deploy.SparkSubmit.main(SparkSubmit.scala)
Caused by: org.apache.kudu.client.NonRecoverableException: Couldn't find a
valid master in (localhost:7051). Exceptions received:
[org.apache.kudu.client.NonRecoverableException: Server requires Kerberos, but
this client is not authenticated (kinit)]
at
org.apache.kudu.client.ConnectToCluster.incrementCountAndCheckExhausted(ConnectToCluster.java:223)
at
org.apache.kudu.client.ConnectToCluster.access$000(ConnectToCluster.java:48)
at
org.apache.kudu.client.ConnectToCluster$ConnectToMasterErrCB.call(ConnectToCluster.java:304)
at
org.apache.kudu.client.ConnectToCluster$ConnectToMasterErrCB.call(ConnectToCluster.java:293)
at com.stumbleupon.async.Deferred.doCall(Deferred.java:1280)
at com.stumbleupon.async.Deferred.runCallbacks(Deferred.java:1259)
at com.stumbleupon.async.Deferred.handleContinuation(Deferred.java:1315)
at com.stumbleupon.async.Deferred.doCall(Deferred.java:1286)
at com.stumbleupon.async.Deferred.runCallbacks(Deferred.java:1259)
at com.stumbleupon.async.Deferred.callback(Deferred.java:1002)
at org.apache.kudu.client.KuduRpc.handleCallback(KuduRpc.java:238)
at org.apache.kudu.client.KuduRpc.errback(KuduRpc.java:292)
at org.apache.kudu.client.RpcProxy.responseReceived(RpcProxy.java:221)
at org.apache.kudu.client.RpcProxy.access$000(RpcProxy.java:60)
at org.apache.kudu.client.RpcProxy$1.call(RpcProxy.java:132)
at org.apache.kudu.client.RpcProxy$1.call(RpcProxy.java:128)
at org.apache.kudu.client.Connection.cleanup(Connection.java:677)
at
org.apache.kudu.client.Connection.exceptionCaught(Connection.java:422)
at
org.apache.kudu.shaded.org.jboss.netty.channel.SimpleChannelUpstreamHandler.handleUpstream(SimpleChannelUpstreamHandler.java:112)
at org.apache.kudu.client.Connection.handleUpstream(Connection.java:236)
at
org.apache.kudu.shaded.org.jboss.netty.channel.DefaultChannelPipeline.sendUpstream(DefaultChannelPipeline.java:564)
at
org.apache.kudu.shaded.org.jboss.netty.channel.DefaultChannelPipeline$DefaultChannelHandlerContext.sendUpstream(DefaultChannelPipeline.java:791)
at
org.apache.kudu.shaded.org.jboss.netty.channel.SimpleChannelUpstreamHandler.exceptionCaught(SimpleChannelUpstreamHandler.java:153)
at