[
https://issues.apache.org/jira/browse/AMBARI-25538?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Brahma Reddy Battula updated AMBARI-25538:
------------------------------------------
Fix Version/s: (was: 2.7.4)
> Property -Dhttp.proxyHost doesn't work when install HDP.
> --------------------------------------------------------
>
> Key: AMBARI-25538
> URL: https://issues.apache.org/jira/browse/AMBARI-25538
> Project: Ambari
> Issue Type: Bug
> Components: ambari-sever
> Affects Versions: 2.7.5
> Reporter: Junseok
> Priority: Major
>
> There is Problem that the Proxy doesn't work in Ambari-server 2.7.5 even if
> pass system properties(-Dhttp.proxyHost and -Dhttp.proxyPort).
> I find the reason. During URLRedirectProvider.buildHttpClient() build
> httpClient, no code inherited java system properties relevant HTTP.
> The ambari 2.7.4 is fine. Since ambari 2.7.4 use *HttpURLConnection* to load
> VDF.XML, the proxy property (http.proxyHost, http.proxyPort) is passed for
> HTTP Request and It is fine.
> Here is sample code to be inherited system properties when build httpClient.
> {code:java}
> public static String executeGet(String spec, boolean useSystemProperty)
> throws Exception {
> CloseableHttpClient httpClient = useSystemProperty ?
> builder.useSystemProperties().build() :
> HttpClientBuilder.create().build();
> HttpGet httpGet = new HttpGet(spec);
> CloseableHttpResponse response = httpClient.execute(httpGet);
> final InputStream is = response.getEntity().getContent();
> return IOUtils.toString(is, StandardCharsets.UTF_8);
> }
> {code}
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]