Uploaded image for project: 'Hadoop YARN'
  1. Hadoop YARN
  2. YARN-4327

RM can not renew TIMELINE_DELEGATION_TOKEN in secure clusters

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • 2.7.1
    • None
    • None

    Description

      bin hadoop 2.7.1
      ATS conf like this:
      <property>
      <name>yarn.timeline-service.http-authentication.type</name>
      <value>simple</value>
      </property>
      <property>
      <name>yarn.timeline-service.http-authentication.kerberos.principal</name>
      <value>HTTP/_HOST@xxx.COM</value>
      </property>
      <property>
      <name>yarn.timeline-service.http-authentication.kerberos.keytab</name>
      <value>/etc/hadoop/keytabs/xxx.keytab</value>
      </property>

      <property>
      <name>yarn.timeline-service.principal</name>
      <value>xxx/_HOST@xxx.COM</value>
      </property>
      <property>
      <name>yarn.timeline-service.keytab</name>
      <value>/etc/hadoop/keytabs/xxx.keytab</value>
      </property>

      <property>
      <name>yarn.timeline-service.best-effort</name>
      <value>true</value>
      </property>
      <property>
      <name>yarn.timeline-service.enabled</name>
      <value>true</value>
      </property>
      <property>

      I'd like to allow everyone to access ATS from HTTP as RM,HDFS.
      client can submit job to RM and add TIMELINE_DELEGATION_TOKEN to AM Context, but RM can not renew TIMELINE_DELEGATION_TOKEN and make application to failure.
      RM logs:
      2015-11-03 11:58:38,191 WARN org.apache.hadoop.yarn.server.resourcemanager.security.DelegationTokenRenewer: Unable to add the application to the delegation token renewer.
      java.io.IOException: Failed to renew token: Kind: TIMELINE_DELEGATION_TOKEN, Service: 10.12.38.4:8188, Ident: (owner=yarn-test, renewer=yarn-test, realUser=, issueDate=1446523118046, maxDate=1447127918046, sequenceNumber=9, masterKeyId=2)
      at org.apache.hadoop.yarn.server.resourcemanager.security.DelegationTokenRenewer.handleAppSubmitEvent(DelegationTokenRenewer.java:439)
      at org.apache.hadoop.yarn.server.resourcemanager.security.DelegationTokenRenewer.access$700(DelegationTokenRenewer.java:78)
      at org.apache.hadoop.yarn.server.resourcemanager.security.DelegationTokenRenewer$DelegationTokenRenewerRunnable.handleDTRenewerAppSubmitEvent(DelegationTokenRenewer.java:847)
      at org.apache.hadoop.yarn.server.resourcemanager.security.DelegationTokenRenewer$DelegationTokenRenewerRunnable.run(DelegationTokenRenewer.java:828)
      at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
      at java.lang.Thread.run(Thread.java:745)
      Caused by: java.io.IOException: HTTP status [500], message [Null user]
      at org.apache.hadoop.util.HttpExceptionUtils.validateResponse(HttpExceptionUtils.java:169)
      at org.apache.hadoop.security.token.delegation.web.DelegationTokenAuthenticator.doDelegationTokenOperation(DelegationTokenAuthenticator.java:287)
      at org.apache.hadoop.security.token.delegation.web.DelegationTokenAuthenticator.renewDelegationToken(DelegationTokenAuthenticator.java:212)
      at org.apache.hadoop.security.token.delegation.web.DelegationTokenAuthenticatedURL.renewDelegationToken(DelegationTokenAuthenticatedURL.java:414)
      at org.apache.hadoop.yarn.client.api.impl.TimelineClientImpl$3.run(TimelineClientImpl.java:396)
      at org.apache.hadoop.yarn.client.api.impl.TimelineClientImpl$3.run(TimelineClientImpl.java:378)
      at java.security.AccessController.doPrivileged(Native Method)
      at javax.security.auth.Subject.doAs(Subject.java:415)
      at org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1657)
      at org.apache.hadoop.yarn.client.api.impl.TimelineClientImpl$5.run(TimelineClientImpl.java:451)
      at org.apache.hadoop.yarn.client.api.impl.TimelineClientImpl$TimelineClientConnectionRetry.retryOn(TimelineClientImpl.java:183)
      at org.apache.hadoop.yarn.client.api.impl.TimelineClientImpl.operateDelegationToken(TimelineClientImpl.java:466)
      at org.apache.hadoop.yarn.client.api.impl.TimelineClientImpl.renewDelegationToken(TimelineClientImpl.java:400)
      at org.apache.hadoop.yarn.security.client.TimelineDelegationTokenIdentifier$Renewer.renew(TimelineDelegationTokenIdentifier.java:81)
      at org.apache.hadoop.security.token.Token.renew(Token.java:377)
      at org.apache.hadoop.yarn.server.resourcemanager.security.DelegationTokenRenewer$1.run(DelegationTokenRenewer.java:543)
      at org.apache.hadoop.yarn.server.resourcemanager.security.DelegationTokenRenewer$1.run(DelegationTokenRenewer.java:540)
      at java.security.AccessController.doPrivileged(Native Method)
      at javax.security.auth.Subject.doAs(Subject.java:415)
      at org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1657)
      at org.apache.hadoop.yarn.server.resourcemanager.security.DelegationTokenRenewer.renewToken(DelegationTokenRenewer.java:538)
      at org.apache.hadoop.yarn.server.resourcemanager.security.DelegationTokenRenewer.handleAppSubmitEvent(DelegationTokenRenewer.java:437)
      ... 6 more

      ATS logs:
      2015-11-03 14:47:45,407 INFO org.apache.hadoop.security.token.delegation.AbstractDelegationTokenSecretManager: Creating password for identifier: owner=yarn-test, renewer=yarn-test, realUser=, issueDate=1446533265407, maxDate=1447138065407, sequenceNumber=5, masterKeyId=2, currentKey: 2
      2015-11-03 14:47:46,055 ERROR org.mortbay.log: /ws/v1/timeline/
      java.lang.IllegalArgumentException: Null user
      at org.apache.hadoop.security.UserGroupInformation.createRemoteUser(UserGroupInformation.java:1204)
      at org.apache.hadoop.security.UserGroupInformation.createRemoteUser(UserGroupInformation.java:1191)
      at org.apache.hadoop.security.token.delegation.web.DelegationTokenAuthenticationHandler.managementOperation(DelegationTokenAuthenticationHandler.java:193)
      at org.apache.hadoop.security.authentication.server.AuthenticationFilter.doFilter(AuthenticationFilter.java:514)
      at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1212)
      at org.apache.hadoop.http.HttpServer2$QuotingInputFilter.doFilter(HttpServer2.java:1243)
      at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1212)
      at org.apache.hadoop.http.NoCacheFilter.doFilter(NoCacheFilter.java:45)
      at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1212)
      at org.apache.hadoop.http.NoCacheFilter.doFilter(NoCacheFilter.java:45)
      at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1212)
      at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:399)
      at org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216)
      at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:182)
      at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:766)
      at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:450)
      at org.mortbay.jetty.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:230)
      at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)
      at org.mortbay.jetty.Server.handle(Server.java:326)
      at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:542)
      at org.mortbay.jetty.HttpConnection$RequestHandler.headerComplete(HttpConnection.java:928)
      at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:549)
      at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:212)
      at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:404)
      at org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:410)
      at org.mortbay.thread.QueuedThreadPool$PoolThread.run(QueuedThreadPool.java:582)

      if change yarn.timeline-service.http-authentication.type to kerberos, all is ok,but ATS can not be accessed by HTTP.

      Attachments

        Activity

          People

            Unassigned Unassigned
            zsl2007 zhangshilong
            Votes:
            1 Vote for this issue
            Watchers:
            11 Start watching this issue

            Dates

              Created:
              Updated: