登录失败:主体:jztwk javax.security.auth.login.LoginException:无法从用户处获取密码
failure to login: for principal: jztwk javax.security.auth.login.LoginException: Unable to obtain password from user
我用的是CDH 6.3.2
我用 spark 对 oozie 作业进行求和,但出现错误
..................................
at org.apache.oozie.action.hadoop.LauncherAM.main(LauncherAM.java:141)
Caused by: org.apache.hadoop.security.KerberosAuthException: failure to login: for principal: jztwk javax.security.auth.login.LoginException: Unable to obtain password from user
at org.apache.hadoop.security.UserGroupInformation.doSubjectLogin(UserGroupInformation.java:1992)
at org.apache.hadoop.security.UserGroupInformation.getUGIFromTicketCache(UserGroupInformation.java:649)
........................................
at org.apache.oozie.action.hadoop.SparkMain.run(SparkMain.java:93)
at org.apache.oozie.action.hadoop.LauncherMain.run(LauncherMain.java:104)
at org.apache.oozie.action.hadoop.SparkMain.main(SparkMain.java:60)
... 16 more
Caused by: javax.security.auth.login.LoginException: Unable to obtain password from user
但我可以运行 spark-submit ......
我可以运行 spark-shell
在 oozie hive 中,shell 工作
我的workflow.xml
<workflow-app name="Spark-example2" xmlns="uri:oozie:workflow:0.5">
<start to="SparkOozieAction1"/>
<action name="SparkOozieAction1">
<spark xmlns="uri:oozie:spark-action:0.2">
<job-tracker>${jobTracker}</job-tracker>
<name-node>${nameNode}</name-node>
<master>yarn</master>
<mode>cluster</mode>
<name>Spark Example1</name>
<class>App</class>
<jar>JztCloudAnalyse.jar</jar>
<spark-opts>--jars ${nameNode}/sparklib/*.jar --conf spark.executor.extraJavaOptions=-Dfile.encoding=UTF-8 --conf spark.driver.extraJavaOptions=-Dfile.encoding=UTF-8 </spark-opts>
<arg>-r 10.3.87.31:7000,10.3.87.31:7001,10.3.87.32:7002,10.3.87.32:7003,10.3.87.36:7004,10.3.87.36:7005 -d 0 -k 22 -w http://10.3.87.49:8082/SendMsgApi.ashx -n JZTanalyse10_102 -h JZTanalyse -o jjj</arg>
<file>/user/jztwk/JztCloudAnalyse.jar#JztCloudAnalyse.jar</file>
</spark>
<ok to="end"/>
<error to="kill"/>
</action>
<kill name="kill">
<message>Action failed, error message[${wf:errorMessage(wf:lastErrorNode())}]</message>
</kill>
<end name="end"/>
</workflow-app>
我的job.properties
nameNode=hdfs://nameservice1
dryrun=False
jobTracker=bigdser3:8032
queueName=default
oozie.use.system.libpath=True
oozie.wf.application.path=${nameNode}/user/jztwk
security_enabled=True
这是 spark 中的错误,您需要更新 spark 3.0 或 CDH 6.3.3
我用的是CDH 6.3.2
我用 spark 对 oozie 作业进行求和,但出现错误
..................................
at org.apache.oozie.action.hadoop.LauncherAM.main(LauncherAM.java:141)
Caused by: org.apache.hadoop.security.KerberosAuthException: failure to login: for principal: jztwk javax.security.auth.login.LoginException: Unable to obtain password from user
at org.apache.hadoop.security.UserGroupInformation.doSubjectLogin(UserGroupInformation.java:1992)
at org.apache.hadoop.security.UserGroupInformation.getUGIFromTicketCache(UserGroupInformation.java:649)
........................................
at org.apache.oozie.action.hadoop.SparkMain.run(SparkMain.java:93)
at org.apache.oozie.action.hadoop.LauncherMain.run(LauncherMain.java:104)
at org.apache.oozie.action.hadoop.SparkMain.main(SparkMain.java:60)
... 16 more
Caused by: javax.security.auth.login.LoginException: Unable to obtain password from user
但我可以运行 spark-submit ......
我可以运行 spark-shell
在 oozie hive 中,shell 工作
我的workflow.xml
<workflow-app name="Spark-example2" xmlns="uri:oozie:workflow:0.5">
<start to="SparkOozieAction1"/>
<action name="SparkOozieAction1">
<spark xmlns="uri:oozie:spark-action:0.2">
<job-tracker>${jobTracker}</job-tracker>
<name-node>${nameNode}</name-node>
<master>yarn</master>
<mode>cluster</mode>
<name>Spark Example1</name>
<class>App</class>
<jar>JztCloudAnalyse.jar</jar>
<spark-opts>--jars ${nameNode}/sparklib/*.jar --conf spark.executor.extraJavaOptions=-Dfile.encoding=UTF-8 --conf spark.driver.extraJavaOptions=-Dfile.encoding=UTF-8 </spark-opts>
<arg>-r 10.3.87.31:7000,10.3.87.31:7001,10.3.87.32:7002,10.3.87.32:7003,10.3.87.36:7004,10.3.87.36:7005 -d 0 -k 22 -w http://10.3.87.49:8082/SendMsgApi.ashx -n JZTanalyse10_102 -h JZTanalyse -o jjj</arg>
<file>/user/jztwk/JztCloudAnalyse.jar#JztCloudAnalyse.jar</file>
</spark>
<ok to="end"/>
<error to="kill"/>
</action>
<kill name="kill">
<message>Action failed, error message[${wf:errorMessage(wf:lastErrorNode())}]</message>
</kill>
<end name="end"/>
</workflow-app>
我的job.properties
nameNode=hdfs://nameservice1
dryrun=False
jobTracker=bigdser3:8032
queueName=default
oozie.use.system.libpath=True
oozie.wf.application.path=${nameNode}/user/jztwk
security_enabled=True
这是 spark 中的错误,您需要更新 spark 3.0 或 CDH 6.3.3