[ 
https://issues.apache.org/jira/browse/HADOOP-18222?focusedWorklogId=768523&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-768523
 ]

ASF GitHub Bot logged work on HADOOP-18222:
-------------------------------------------

                Author: ASF GitHub Bot
            Created on: 10/May/22 14:09
            Start Date: 10/May/22 14:09
    Worklog Time Spent: 10m 
      Work Description: slfan1989 commented on PR #4266:
URL: https://github.com/apache/hadoop/pull/4266#issuecomment-1122448855

   > > Hi @hchaverri , CC: @szilard-nemeth My local merge hchaverri code has 
passed the test, and his solution is feasible. Change the 
DelegationTokenSecretManagerMetrics into a global declaration, which can 
guarantee 1 initialization.
   > > I found out that he may have Blocking Java Doc compilation error, I try 
to solve it.
   > > 
JIRA:[issues.apache.org/jira/browse/HADOOP-18229](https://issues.apache.org/jira/browse/HADOOP-18229)
 [GitHub Pull Request #4292](https://github.com/apache/hadoop/pull/4292)
   > 
   > I see, thanks for the update. How do you mean that Javadoc errors are 
"blocking"? I don't see a relation between the javadoc issues and the 
DelegationTokenSecretManagerMetrics issue. The latter causes unit tests to fail 
(maybe even production issues) so it should be fixed ASAP. Thanks.
   
   There is no problem with your understanding. I thought this patch was not 
merged because of the Java Doc Error (hadoop-yetus -1), but I carefully read 
the compilation information, Java Doc Compile Error IN JDK11,I support merge 
this patch(https://github.com/apache/hadoop/pull/4266).




Issue Time Tracking
-------------------

    Worklog Id:     (was: 768523)
    Time Spent: 1.5h  (was: 1h 20m)

> Prevent DelegationTokenSecretManagerMetrics from registering multiple times 
> ----------------------------------------------------------------------------
>
>                 Key: HADOOP-18222
>                 URL: https://issues.apache.org/jira/browse/HADOOP-18222
>             Project: Hadoop Common
>          Issue Type: Improvement
>            Reporter: Hector Sandoval Chaverri
>            Assignee: Hector Sandoval Chaverri
>            Priority: Minor
>              Labels: pull-request-available
>          Time Spent: 1.5h
>  Remaining Estimate: 0h
>
> After committing HADOOP-18167, we received reports of the following error 
> when ResourceManager is initialized:
> {noformat}
> Caused by: java.io.IOException: Problem starting http server
>         at org.apache.hadoop.http.HttpServer2.start(HttpServer2.java:1389)
>         at 
> org.apache.hadoop.yarn.webapp.WebApps$Builder.start(WebApps.java:475)
>         ... 4 more
> Caused by: org.apache.hadoop.metrics2.MetricsException: Metrics source 
> DelegationTokenSecretManagerMetrics already exists!
>         at 
> org.apache.hadoop.metrics2.lib.DefaultMetricsSystem.newSourceName(DefaultMetricsSystem.java:152)
>         at 
> org.apache.hadoop.metrics2.lib.DefaultMetricsSystem.sourceName(DefaultMetricsSystem.java:125)
>         at 
> org.apache.hadoop.metrics2.impl.MetricsSystemImpl.register(MetricsSystemImpl.java:229)
>         at 
> org.apache.hadoop.metrics2.MetricsSystem.register(MetricsSystem.java:71)
>         at 
> org.apache.hadoop.security.token.delegation.AbstractDelegationTokenSecretManager$DelegationTokenSecretManagerMetrics.create(AbstractDelegationTokenSecretManager.java:878)
>         at 
> org.apache.hadoop.security.token.delegation.AbstractDelegationTokenSecretManager.<init>(AbstractDelegationTokenSecretManager.java:152)
>         at 
> org.apache.hadoop.security.token.delegation.web.DelegationTokenManager$DelegationTokenSecretManager.<init>(DelegationTokenManager.java:72)
>         at 
> org.apache.hadoop.security.token.delegation.web.DelegationTokenManager.<init>(DelegationTokenManager.java:122)
>         at 
> org.apache.hadoop.security.token.delegation.web.DelegationTokenAuthenticationHandler.initTokenManager(DelegationTokenAuthenticationHandler.java:161)
>         at 
> org.apache.hadoop.security.token.delegation.web.DelegationTokenAuthenticationHandler.init(DelegationTokenAuthenticationHandler.java:130)
>         at 
> org.apache.hadoop.security.authentication.server.AuthenticationFilter.initializeAuthHandler(AuthenticationFilter.java:194)
>         at 
> org.apache.hadoop.security.token.delegation.web.DelegationTokenAuthenticationFilter.initializeAuthHandler(DelegationTokenAuthenticationFilter.java:214)
>         at 
> org.apache.hadoop.security.authentication.server.AuthenticationFilter.init(AuthenticationFilter.java:180)
>         at 
> org.apache.hadoop.security.token.delegation.web.DelegationTokenAuthenticationFilter.init(DelegationTokenAuthenticationFilter.java:180)
>         at 
> org.apache.hadoop.yarn.server.security.http.RMAuthenticationFilter.init(RMAuthenticationFilter.java:53){noformat}
> This can happen if MetricsSystemImpl#init is called and multiple metrics are 
> registered with the same name. A proposed solution is to declare the metrics 
> in AbstractDelegationTokenSecretManager as singleton, which would prevent 
> multiple instances DelegationTokenSecretManagerMetrics from being registered.



--
This message was sent by Atlassian Jira
(v8.20.7#820007)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to