I have used following code to connect -
URL url = new URL("https://results.bput.ac.in/");
HttpURLConnection urlc = (HttpURLConnection) url.openConnection();
urlc.setConnectTimeout(1000 * 20);
urlc.connect();
It returned a SocketTimeoutException .
Exception
The exact exception i am getting is
java.net.SocketTimeoutException: failed to connect to results.bput.ac.in/14.139.212.166 (port 443) after 90000ms
and sometimes this -
java.net.SocketTimeoutException: failed to connect to results.bput.ac.in/14.139.212.166 (port 80) after 90000ms
- tried with removing the
urlc.setConnectTimeout(1000 * 20);
and still got the exception. - checked with http instead of https
URL url = new URL("http://results.bput.ac.in/");
but got no result. - cheked with
URL url = new URL("https://www.facebook.com/");
and got success response. - Checked with changing the timeout period but same exception .
The problem is with this specific url - http://results.bput.ac.in/
.
Information
This link i have given http://results.bput.ac.in/
is perfectly working on any web browser without any lagging .
I got information that some guys cant open this site , its lagging but i can open it without any lag .
My Research
I have already tried this SO question , this SO question , this github solution and java code geeks solution but got no result.
Update
I have tested this with my wifi and mobile data by thinking that my router might have some problem with the port. but i got same exception with mobile data too.
Do anyone have any solution to this.