Hi,

I'm trying to get Spark 0.8.1 incubating running on Hadoop 2.2 (Hortonworks) 
with YARN and security enabled. I grabbed a prebuilt jar from here:
http://people.apache.org/~pwendell/spark-0.8.1-incubating-rc4/spark-0.8.1-incubating-bin-hadoop2.tgz

and tried running the SparkPi example on our cluster. I almost immediately get 
an error about security that looks like this (the full stack trace is at the 
bottom):

13/12/18 02:41:02 WARN Client: Exception encountered while connecting to the 
server : java.lang.IllegalArgumentException: Server has invalid Kerberos 
principal: hadoop/[email protected]
13/12/18 02:41:02 ERROR UserGroupInformation: PriviledgedActionException 
as:[email protected] (auth:KERBEROS) cause:java.io.IOException: 
java.lang.IllegalArgumentException: Server has invalid Kerberos principal: 
hadoop/[email protected]

It looks like the job is not running as me (csevers) but as someone else. I've 
tried setting an environment variable for SPARK_USER and also HADOOP_USER_NAME 
but no luck. I'm definitely authenticated and can run other standard mapreduce 
jobs without trouble.

Any help is appreciated.

Thanks,
Chris



Full run command and output here:
SPARK_JAR=./assembly/target/scala-2.9.3/spark-assembly-0.8.1-incubating-hadoop2.2.0.jar
 ./spark-class org.apache.spark.deploy.yarn.Client --jar 
examples/target/scala-2.9.3/spark-examples-assembly-0.8.1-incubating.jar 
--class org.apache.spark.examples.SparkPi --args yarn-standalone --num-workers 
3 --master-memory 4g --worker-memory 2g --worker-cores 1
13/12/18 02:41:02 WARN Configuration: yarn-site.xml:an attempt to override 
final parameter: net.topology.script.file.name;  Ignoring.
13/12/18 02:41:02 WARN Configuration: yarn-site.xml:an attempt to override 
final parameter: net.topology.script.file.name;  Ignoring.
13/12/18 02:41:02 WARN Configuration: yarn-site.xml:an attempt to override 
final parameter: net.topology.script.file.name;  Ignoring.
13/12/18 02:41:02 WARN NativeCodeLoader: Unable to load native-hadoop library 
for your platform... using builtin-java classes where applicable
13/12/18 02:41:02 WARN Configuration: yarn-site.xml:an attempt to override 
final parameter: net.topology.script.file.name;  Ignoring.
13/12/18 02:41:02 WARN Configuration: yarn-site.xml:an attempt to override 
final parameter: net.topology.script.file.name;  Ignoring.
13/12/18 02:41:02 INFO RMProxy: Connecting to ResourceManager at 
hera-phx-jt.vip.ebay.com/10.115.201.87:8032
13/12/18 02:41:02 WARN Configuration: yarn-site.xml:an attempt to override 
final parameter: net.topology.script.file.name;  Ignoring.
13/12/18 02:41:02 WARN Client: Exception encountered while connecting to the 
server : java.lang.IllegalArgumentException: Server has invalid Kerberos 
principal: hadoop/[email protected]
13/12/18 02:41:02 ERROR UserGroupInformation: PriviledgedActionException 
as:[email protected] (auth:KERBEROS) cause:java.io.IOException: 
java.lang.IllegalArgumentException: Server has invalid Kerberos principal: 
hadoop/[email protected]
13/12/18 02:41:32 WARN Client: Exception encountered while connecting to the 
server : java.lang.IllegalArgumentException: Server has invalid Kerberos 
principal: hadoop/[email protected]
13/12/18 02:41:32 ERROR UserGroupInformation: PriviledgedActionException 
as:[email protected] (auth:KERBEROS) cause:java.io.IOException: 
java.lang.IllegalArgumentException: Server has invalid Kerberos principal: 
hadoop/[email protected]
13/12/18 02:42:02 WARN Client: Exception encountered while connecting to the 
server : java.lang.IllegalArgumentException: Server has invalid Kerberos 
principal: hadoop/[email protected]
13/12/18 02:42:02 ERROR UserGroupInformation: PriviledgedActionException 
as:[email protected] (auth:KERBEROS) cause:java.io.IOException: 
java.lang.IllegalArgumentException: Server has invalid Kerberos principal: 
hadoop/[email protected]
13/12/18 02:42:32 WARN Client: Exception encountered while connecting to the 
server : java.lang.IllegalArgumentException: Server has invalid Kerberos 
principal: hadoop/[email protected]
13/12/18 02:42:32 ERROR UserGroupInformation: PriviledgedActionException 
as:[email protected] (auth:KERBEROS) cause:java.io.IOException: 
java.lang.IllegalArgumentException: Server has invalid Kerberos principal: 
hadoop/[email protected]
13/12/18 02:43:02 WARN Client: Exception encountered while connecting to the 
server : java.lang.IllegalArgumentException: Server has invalid Kerberos 
principal: hadoop/[email protected]
13/12/18 02:43:02 ERROR UserGroupInformation: PriviledgedActionException 
as:[email protected] (auth:KERBEROS) cause:java.io.IOException: 
java.lang.IllegalArgumentException: Server has invalid Kerberos principal: 
hadoop/[email protected]
13/12/18 02:43:32 WARN Client: Exception encountered while connecting to the 
server : java.lang.IllegalArgumentException: Server has invalid Kerberos 
principal: hadoop/[email protected]
13/12/18 02:43:32 ERROR UserGroupInformation: PriviledgedActionException 
as:[email protected] (auth:KERBEROS) cause:java.io.IOException: 
java.lang.IllegalArgumentException: Server has invalid Kerberos principal: 
hadoop/[email protected]
13/12/18 02:44:02 WARN Client: Exception encountered while connecting to the 
server : java.lang.IllegalArgumentException: Server has invalid Kerberos 
principal: hadoop/[email protected]
13/12/18 02:44:02 ERROR UserGroupInformation: PriviledgedActionException 
as:[email protected] (auth:KERBEROS) cause:java.io.IOException: 
java.lang.IllegalArgumentException: Server has invalid Kerberos principal: 
hadoop/[email protected]
13/12/18 02:44:32 WARN Client: Exception encountered while connecting to the 
server : java.lang.IllegalArgumentException: Server has invalid Kerberos 
principal: hadoop/[email protected]
13/12/18 02:44:32 ERROR UserGroupInformation: PriviledgedActionException 
as:[email protected] (auth:KERBEROS) cause:java.io.IOException: 
java.lang.IllegalArgumentException: Server has invalid Kerberos principal: 
hadoop/[email protected]
13/12/18 02:45:02 WARN Client: Exception encountered while connecting to the 
server : java.lang.IllegalArgumentException: Server has invalid Kerberos 
principal: hadoop/[email protected]
13/12/18 02:45:02 ERROR UserGroupInformation: PriviledgedActionException 
as:[email protected] (auth:KERBEROS) cause:java.io.IOException: 
java.lang.IllegalArgumentException: Server has invalid Kerberos principal: 
hadoop/[email protected]
13/12/18 02:45:32 WARN Client: Exception encountered while connecting to the 
server : java.lang.IllegalArgumentException: Server has invalid Kerberos 
principal: hadoop/[email protected]
13/12/18 02:45:32 ERROR UserGroupInformation: PriviledgedActionException 
as:[email protected] (auth:KERBEROS) cause:java.io.IOException: 
java.lang.IllegalArgumentException: Server has invalid Kerberos principal: 
hadoop/[email protected]
13/12/18 02:46:02 WARN Client: Exception encountered while connecting to the 
server : java.lang.IllegalArgumentException: Server has invalid Kerberos 
principal: hadoop/[email protected]
13/12/18 02:46:02 ERROR UserGroupInformation: PriviledgedActionException 
as:[email protected] (auth:KERBEROS) cause:java.io.IOException: 
java.lang.IllegalArgumentException: Server has invalid Kerberos principal: 
hadoop/[email protected]
13/12/18 02:46:32 WARN Client: Exception encountered while connecting to the 
server : java.lang.IllegalArgumentException: Server has invalid Kerberos 
principal: hadoop/[email protected]
13/12/18 02:46:32 ERROR UserGroupInformation: PriviledgedActionException 
as:[email protected] (auth:KERBEROS) cause:java.io.IOException: 
java.lang.IllegalArgumentException: Server has invalid Kerberos principal: 
hadoop/[email protected]
13/12/18 02:47:02 WARN Client: Exception encountered while connecting to the 
server : java.lang.IllegalArgumentException: Server has invalid Kerberos 
principal: hadoop/[email protected]
13/12/18 02:47:02 ERROR UserGroupInformation: PriviledgedActionException 
as:[email protected] (auth:KERBEROS) cause:java.io.IOException: 
java.lang.IllegalArgumentException: Server has invalid Kerberos principal: 
hadoop/[email protected]
13/12/18 02:47:32 WARN Client: Exception encountered while connecting to the 
server : java.lang.IllegalArgumentException: Server has invalid Kerberos 
principal: hadoop/[email protected]
13/12/18 02:47:32 ERROR UserGroupInformation: PriviledgedActionException 
as:[email protected] (auth:KERBEROS) cause:java.io.IOException: 
java.lang.IllegalArgumentException: Server has invalid Kerberos principal: 
hadoop/[email protected]
13/12/18 02:48:02 WARN Client: Exception encountered while connecting to the 
server : java.lang.IllegalArgumentException: Server has invalid Kerberos 
principal: hadoop/[email protected]
13/12/18 02:48:02 ERROR UserGroupInformation: PriviledgedActionException 
as:[email protected] (auth:KERBEROS) cause:java.io.IOException: 
java.lang.IllegalArgumentException: Server has invalid Kerberos principal: 
hadoop/[email protected]
13/12/18 02:48:32 WARN Client: Exception encountered while connecting to the 
server : java.lang.IllegalArgumentException: Server has invalid Kerberos 
principal: hadoop/[email protected]
13/12/18 02:48:32 ERROR UserGroupInformation: PriviledgedActionException 
as:[email protected] (auth:KERBEROS) cause:java.io.IOException: 
java.lang.IllegalArgumentException: Server has invalid Kerberos principal: 
hadoop/[email protected]
13/12/18 02:49:02 WARN Client: Exception encountered while connecting to the 
server : java.lang.IllegalArgumentException: Server has invalid Kerberos 
principal: hadoop/[email protected]
13/12/18 02:49:02 ERROR UserGroupInformation: PriviledgedActionException 
as:[email protected] (auth:KERBEROS) cause:java.io.IOException: 
java.lang.IllegalArgumentException: Server has invalid Kerberos principal: 
hadoop/[email protected]
13/12/18 02:49:32 WARN Client: Exception encountered while connecting to the 
server : java.lang.IllegalArgumentException: Server has invalid Kerberos 
principal: hadoop/[email protected]
13/12/18 02:49:32 ERROR UserGroupInformation: PriviledgedActionException 
as:[email protected] (auth:KERBEROS) cause:java.io.IOException: 
java.lang.IllegalArgumentException: Server has invalid Kerberos principal: 
hadoop/[email protected]
13/12/18 02:50:02 WARN Client: Exception encountered while connecting to the 
server : java.lang.IllegalArgumentException: Server has invalid Kerberos 
principal: hadoop/[email protected]
13/12/18 02:50:02 ERROR UserGroupInformation: PriviledgedActionException 
as:[email protected] (auth:KERBEROS) cause:java.io.IOException: 
java.lang.IllegalArgumentException: Server has invalid Kerberos principal: 
hadoop/[email protected]
13/12/18 02:50:32 WARN Client: Exception encountered while connecting to the 
server : java.lang.IllegalArgumentException: Server has invalid Kerberos 
principal: hadoop/[email protected]
13/12/18 02:50:32 ERROR UserGroupInformation: PriviledgedActionException 
as:[email protected] (auth:KERBEROS) cause:java.io.IOException: 
java.lang.IllegalArgumentException: Server has invalid Kerberos principal: 
hadoop/[email protected]
13/12/18 02:51:02 WARN Client: Exception encountered while connecting to the 
server : java.lang.IllegalArgumentException: Server has invalid Kerberos 
principal: hadoop/[email protected]
13/12/18 02:51:02 ERROR UserGroupInformation: PriviledgedActionException 
as:[email protected] (auth:KERBEROS) cause:java.io.IOException: 
java.lang.IllegalArgumentException: Server has invalid Kerberos principal: 
hadoop/[email protected]
13/12/18 02:51:32 WARN Client: Exception encountered while connecting to the 
server : java.lang.IllegalArgumentException: Server has invalid Kerberos 
principal: hadoop/[email protected]
13/12/18 02:51:32 ERROR UserGroupInformation: PriviledgedActionException 
as:[email protected] (auth:KERBEROS) cause:java.io.IOException: 
java.lang.IllegalArgumentException: Server has invalid Kerberos principal: 
hadoop/[email protected]
13/12/18 02:52:02 WARN Client: Exception encountered while connecting to the 
server : java.lang.IllegalArgumentException: Server has invalid Kerberos 
principal: hadoop/[email protected]
13/12/18 02:52:02 ERROR UserGroupInformation: PriviledgedActionException 
as:[email protected] (auth:KERBEROS) cause:java.io.IOException: 
java.lang.IllegalArgumentException: Server has invalid Kerberos principal: 
hadoop/[email protected]
13/12/18 02:52:32 WARN Client: Exception encountered while connecting to the 
server : java.lang.IllegalArgumentException: Server has invalid Kerberos 
principal: hadoop/[email protected]
13/12/18 02:52:32 ERROR UserGroupInformation: PriviledgedActionException 
as:[email protected] (auth:KERBEROS) cause:java.io.IOException: 
java.lang.IllegalArgumentException: Server has invalid Kerberos principal: 
hadoop/[email protected]
13/12/18 02:53:02 WARN Client: Exception encountered while connecting to the 
server : java.lang.IllegalArgumentException: Server has invalid Kerberos 
principal: hadoop/[email protected]
13/12/18 02:53:02 ERROR UserGroupInformation: PriviledgedActionException 
as:[email protected] (auth:KERBEROS) cause:java.io.IOException: 
java.lang.IllegalArgumentException: Server has invalid Kerberos principal: 
hadoop/[email protected]
13/12/18 02:53:32 WARN Client: Exception encountered while connecting to the 
server : java.lang.IllegalArgumentException: Server has invalid Kerberos 
principal: hadoop/[email protected]
13/12/18 02:53:32 ERROR UserGroupInformation: PriviledgedActionException 
as:[email protected] (auth:KERBEROS) cause:java.io.IOException: 
java.lang.IllegalArgumentException: Server has invalid Kerberos principal: 
hadoop/[email protected]
13/12/18 02:54:02 WARN Client: Exception encountered while connecting to the 
server : java.lang.IllegalArgumentException: Server has invalid Kerberos 
principal: hadoop/[email protected]
13/12/18 02:54:02 ERROR UserGroupInformation: PriviledgedActionException 
as:[email protected] (auth:KERBEROS) cause:java.io.IOException: 
java.lang.IllegalArgumentException: Server has invalid Kerberos principal: 
hadoop/[email protected]
13/12/18 02:54:32 WARN Client: Exception encountered while connecting to the 
server : java.lang.IllegalArgumentException: Server has invalid Kerberos 
principal: hadoop/[email protected]
13/12/18 02:54:32 ERROR UserGroupInformation: PriviledgedActionException 
as:[email protected] (auth:KERBEROS) cause:java.io.IOException: 
java.lang.IllegalArgumentException: Server has invalid Kerberos principal: 
hadoop/[email protected]
13/12/18 02:55:02 WARN Client: Exception encountered while connecting to the 
server : java.lang.IllegalArgumentException: Server has invalid Kerberos 
principal: hadoop/[email protected]
13/12/18 02:55:02 ERROR UserGroupInformation: PriviledgedActionException 
as:[email protected] (auth:KERBEROS) cause:java.io.IOException: 
java.lang.IllegalArgumentException: Server has invalid Kerberos principal: 
hadoop/[email protected]
13/12/18 02:55:32 WARN Client: Exception encountered while connecting to the 
server : java.lang.IllegalArgumentException: Server has invalid Kerberos 
principal: hadoop/[email protected]
13/12/18 02:55:32 ERROR UserGroupInformation: PriviledgedActionException 
as:[email protected] (auth:KERBEROS) cause:java.io.IOException: 
java.lang.IllegalArgumentException: Server has invalid Kerberos principal: 
hadoop/[email protected]
13/12/18 02:56:02 WARN Client: Exception encountered while connecting to the 
server : java.lang.IllegalArgumentException: Server has invalid Kerberos 
principal: hadoop/[email protected]
13/12/18 02:56:02 ERROR UserGroupInformation: PriviledgedActionException 
as:[email protected] (auth:KERBEROS) cause:java.io.IOException: 
java.lang.IllegalArgumentException: Server has invalid Kerberos principal: 
hadoop/[email protected]
Exception in thread "main" java.io.IOException: Failed on local exception: 
java.io.IOException: java.lang.IllegalArgumentException: Server has invalid 
Kerberos principal: hadoop/[email protected]; Host Details 
: local host is: "phxaishdc20en0009-be/10.115.201.45"; destination host is: 
"hera-phx-jt.vip.ebay.com":8032;
at org.apache.hadoop.net.NetUtils.wrapException(NetUtils.java:764)
at org.apache.hadoop.ipc.Client.call(Client.java:1351)
at org.apache.hadoop.ipc.Client.call(Client.java:1300)
at 
org.apache.hadoop.ipc.ProtobufRpcEngine$Invoker.invoke(ProtobufRpcEngine.java:206)
at $Proxy7.getClusterMetrics(Unknown Source)
at 
org.apache.hadoop.yarn.api.impl.pb.client.ApplicationClientProtocolPBClientImpl.getClusterMetrics(ApplicationClientProtocolPBClientImpl.java:152)
at sun.reflect.GeneratedMethodAccessor2.invoke(Unknown Source)
at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:616)
at 
org.apache.hadoop.io.retry.RetryInvocationHandler.invokeMethod(RetryInvocationHandler.java:186)
at 
org.apache.hadoop.io.retry.RetryInvocationHandler.invoke(RetryInvocationHandler.java:102)
at $Proxy8.getClusterMetrics(Unknown Source)
at 
org.apache.hadoop.yarn.client.api.impl.YarnClientImpl.getYarnClusterMetrics(YarnClientImpl.java:246)
at 
org.apache.spark.deploy.yarn.Client.logClusterResourceDetails(Client.scala:139)
at org.apache.spark.deploy.yarn.Client.runApp(Client.scala:75)
at org.apache.spark.deploy.yarn.Client.run(Client.scala:110)
at org.apache.spark.deploy.yarn.Client$.main(Client.scala:484)
at org.apache.spark.deploy.yarn.Client.main(Client.scala)
Caused by: java.io.IOException: java.lang.IllegalArgumentException: Server has 
invalid Kerberos principal: hadoop/[email protected]
at org.apache.hadoop.ipc.Client$Connection$1.run(Client.java:620)
at java.security.AccessController.doPrivileged(Native Method)
at javax.security.auth.Subject.doAs(Subject.java:416)
at 
org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1491)
at 
org.apache.hadoop.ipc.Client$Connection.handleSaslConnectionFailure(Client.java:583)
at org.apache.hadoop.ipc.Client$Connection.setupIOstreams(Client.java:667)
at org.apache.hadoop.ipc.Client$Connection.access$2600(Client.java:314)
at org.apache.hadoop.ipc.Client.getConnection(Client.java:1399)
at org.apache.hadoop.ipc.Client.call(Client.java:1318)
... 16 more
Caused by: java.lang.IllegalArgumentException: Server has invalid Kerberos 
principal: hadoop/[email protected]
at 
org.apache.hadoop.security.SaslRpcClient.getServerPrincipal(SaslRpcClient.java:325)
at 
org.apache.hadoop.security.SaslRpcClient.createSaslClient(SaslRpcClient.java:228)
at 
org.apache.hadoop.security.SaslRpcClient.selectSaslClient(SaslRpcClient.java:157)
at org.apache.hadoop.security.SaslRpcClient.saslConnect(SaslRpcClient.java:387)
at org.apache.hadoop.ipc.Client$Connection.setupSaslConnection(Client.java:494)
at org.apache.hadoop.ipc.Client$Connection.access$1700(Client.java:314)
at org.apache.hadoop.ipc.Client$Connection$2.run(Client.java:659)
at org.apache.hadoop.ipc.Client$Connection$2.run(Client.java:655)
at java.security.AccessController.doPrivileged(Native Method)
at javax.security.auth.Subject.doAs(Subject.java:416)
at 
org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1491)
at org.apache.hadoop.ipc.Client$Connection.setupIOstreams(Client.java:654)
... 19 more



Reply via email to