It's all about the answers!

Ask a question

org.apache.http.conn.HttpHostConnectException: Connection to refused


Nilesh Patil (1734150) | asked Apr 09 '15, 2:48 a.m.
Hi All,
I am trying to connect to DNG server through OSLC client api, but I am getting org.apache.http.conn.HttpHostConnectException: Connection to https://XXXX./rm refused error. The server hosted outside the my domain where I run this client program to fetch data. This communication is happening through proxy
I have set proxy in my code
System.setProperty("https.proxyHost", "XXXX");
System.setProperty("https.proxyPort", "xxxx");

I am using Eclipse OSLG4j(org.eclipse.lyo.client.java) for client side. Could you please point me to how to resolve this issue? I am stuck with issue.

Thank you In advance

One answer



permanent link
Donald Nong (14.5k614) | answered Apr 09 '15, 6:26 a.m.
 Your HTTPS proxy may require authentication and you need to handle it appropriately. See below posts for reference.
http://stackoverflow.com/questions/1626549/authenticated-http-proxy-with-java
http://stackoverflow.com/questions/8669726/java-proxy-authentication
http://www.rgagnon.com/javadetails/java-0085.html

Your answer


Register or to post your answer.


Dashboards and work items are no longer publicly available, so some links may be invalid. We now provide similar information through other means. Learn more here.