You are viewing a plain text version of this content. The canonical link for it is here.
Posted to mapreduce-issues@hadoop.apache.org by "Lantao Jin (JIRA)" <ji...@apache.org> on 2017/07/01 10:36:00 UTC
[jira] [Commented] (MAPREDUCE-6910) MapReduceTrackingUriPlugin can
not return the right URI of history server with HTTPS
[ https://issues.apache.org/jira/browse/MAPREDUCE-6910?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16071175#comment-16071175 ]
Lantao Jin commented on MAPREDUCE-6910:
---------------------------------------
The root cause is that the static object {{httpPolicyInJHS}} in MRWebAppUtil has no chance to initialize. It always uses the default value {{null}} and below methods will return the value like when HTTP
{code}
public static String getJHSWebappScheme() {
return httpPolicyInJHS == HttpConfig.Policy.HTTPS_ONLY ? "https://" : "http://";
}
public static String getJHSWebappURLWithoutScheme(Configuration conf) {
if (httpPolicyInJHS == Policy.HTTPS_ONLY) {
return conf.get(JHAdminConfig.MR_HISTORY_WEBAPP_HTTPS_ADDRESS,
JHAdminConfig.DEFAULT_MR_HISTORY_WEBAPP_HTTPS_ADDRESS);
} else {
return conf.get(JHAdminConfig.MR_HISTORY_WEBAPP_ADDRESS,
JHAdminConfig.DEFAULT_MR_HISTORY_WEBAPP_ADDRESS);
}
}
{code}
Attach a patch to fix.
> MapReduceTrackingUriPlugin can not return the right URI of history server with HTTPS
> ------------------------------------------------------------------------------------
>
> Key: MAPREDUCE-6910
> URL: https://issues.apache.org/jira/browse/MAPREDUCE-6910
> Project: Hadoop Map/Reduce
> Issue Type: Bug
> Components: jobhistoryserver
> Affects Versions: 2.7.3, 2.8.1
> Reporter: Lantao Jin
> Attachments: MAPREDUCE-6910.001.patch
>
>
> When the {{MapReduceTrackingUriPlugin}} enabled, the URI requests from proxy server or RM UI which are also out of {{yarn.resourcemanager.max-completed-applications}} should be redirect to the history server URI.
> But when I access a HTTPS history server with the properties:
> {quote}
> <property>
> <name>mapreduce.jobhistory.http.policy</name>
> <value>HTTPS_ONLY</value>
> </property>
> <property>
> <name>mapreduce.jobhistory.webapp.https.address</name>
> <value>history.example.com:12345</value>
> </property>
> {quote}
> The {{MapReduceTrackingUriPlugin}} still returns a default HTTP URI:
> {{http:0.0.0.0:19888}}
> or
> {{http://history.example.com:56789}}
> if {{mapreduce.jobhistory.webapp.address}} is engaged at same time.
> {quote}
> <property>
> <name>mapreduce.jobhistory.webapp.address</name>
> <value>history.example.com:67890</value>
> </property>
> {quote}
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)
---------------------------------------------------------------------
To unsubscribe, e-mail: mapreduce-issues-unsubscribe@hadoop.apache.org
For additional commands, e-mail: mapreduce-issues-help@hadoop.apache.org