[ https://issues.apache.org/jira/browse/AMBARI-25538?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17636725#comment-17636725 ]
Brahma Reddy Battula commented on AMBARI-25538: ----------------------------------------------- Removing the fix version as 2.7.4 as it's not committed. [~myfriendprintf] are you planning to work on this..? > 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: issues-unsubscr...@ambari.apache.org For additional commands, e-mail: issues-h...@ambari.apache.org