Skip to Content
0

HttpClient.execute() fails with error "113 (No route to host)"

Mar 01, 2017 at 12:25 PM

66

avatar image

I have created a Java app which is trying to make REST call to the third party service deployed somewhere on internet. I'm using org.apache.http.client.HttpClient library to make Get and post call. The app is working fine when run on my local machine and it is able to connect to remote service and able to get the data. But when I deployed it on HCP, I get error as "113 (No route to host), error: Host unreachable (local port 45560 to address 0.0.0.0, remote port 443 to address <IPAddressOfRemoteSystem>". The protocol the remote system uses is https.

I have also created a destination with the URL in cockpit, keeping authentication as "No Authentication". But it did not help. The code that I'm using is like this -

HttpClient client = HttpClientBuilder.create().build();

HttpGet request = new HttpGet(url);

HttpResponse response = client.execute(request);

statusCode = response.getStatusLine().getStatusCode();

3rd line of this code gives this error. Any help would be greatly appreciated.

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

2 Answers

Archana Iyer Mar 02, 2017 at 12:36 PM
0

Can any one please answer to this question? I feel like I have posted it to the wrong tag. The question is for SAP Hana Cloud Platform and not for HCI

Share
10 |10000 characters needed characters left characters exceeded
Viktor Lazar
Mar 05, 2017 at 09:09 AM
0

Hi Archana,

you created this question using the HCI tag, so the people from HCP will not see it.
Try to edit the tags here, or close this thread, and open a new one using the HCP tags.

Best Regards,
Viktor

Share
10 |10000 characters needed characters left characters exceeded