Hello Expert, I am facing a strange issue which the below code when executed on windows it works fine but the same code when trying to run on linux it gives 504 bad gateway error. Proxy proxy = new Proxy(Proxy.Type.HTTP, new InetSocketAddress("X.X.X.X", 8080)); //Change the proxy address accordingly and try URL url = new URL(null,"http://XXX/login.jsp",new sun.net.www.protocol.http.Handler()); HttpURLConnection connection = (HttpURLConnection) url.openConnection(); Integer responseCode = connection.getResponseCode(); When i print the response code i get 504 on linux and on windows I get 200. JDK version 1.6.35 oracle sun jdk and it is same for both windows and linux. Any suggestion or inputs will help me to fix this issue. Also note that there is no firewal or proxy setting.. Thanks Chetan