I used the following code to connect -
URL url = new URL("https://results.bput.ac.in/"); HttpURLConnection urlc = (HttpURLConnection) url.openConnection(); urlc.setConnectTimeout(1000 * 20); urlc.connect();
He threw a SocketTimeoutException .
Exception
The exact exception that I get is
java.net.SocketTimeoutException: failed to connect to results.bput.ac.in/14.139.212.166 (port 443) after 90000ms
and sometimes itβs
java.net.SocketTimeoutException: failed to connect to results.bput.ac.in/14.139.212.166 (port 80) after 90000ms
- tried to remove
urlc.setConnectTimeout(1000 * 20); and still got an exception. - verified with http instead of https
URL url = new URL("http://results.bput.ac.in/"); but did not get a result. - cheked with
URL url = new URL("https://www.facebook.com/"); and received a successful response. - Checked with a change in the waiting period, but with the same exception.
The problem is this particular url - http://results.bput.ac.in/ .
Information
This link I gave http://results.bput.ac.in/ works fine with any web browser without any delay.
I got information that some guys cannot open this site, its lag, but I can open it without any delay.
My research
I already tried this SO question , this SO question , this is a github solution and geeks java code solution , but did not get the result.
Update
I tested this with my Wi-Fi and mobile data, thinking that my router might have problems with the port. but I get the same exception with mobile data too.
Anyone have a solution.
source share