It looks like you're new here. If you want to get involved, click one of these buttons!
Note: This topic is not related to Kite API.I'm able to execute below sample code locally (output: 200 OK) but unable to execute (output: timeout) the same code in AWS ec2 server. This code used to work perfectly fine in AWS ec2 until last week, but stoped working since last few days.
public class CheckURL {
public static void main(String[] args) {
HttpClient httpClient = HttpClients.custom().setUserAgent("Java Agent").build();
String urlString = "https://www.nseindia.com/content/historical/EQUITIES/2019/DEC/cm26DEC2019bhav.csv.zip";
try {
HttpGet request = new HttpGet(urlString);
HttpResponse response = httpClient.execute(request);
System.out.println("Status code: " + response.getStatusLine().getStatusCode());
} catch (Exception ex) {
ex.printStackTrace();
}
}
}
Note: ec2 server connected to Internet Gateway and Inbound/Outbound both are set to All traffic.