java.io.IOException

Server returned HTTP response code: 502 for URL: http://foo.bar.baz/

Samebug tips1

Check if you didn't set RequestProperty Content-Type to the wrong type or if you're trying to send the wrong file to the server.

Don't give up yet. Our experts can help. Paste your full stack trace to get a solution.

Solutions on the web10720

  • via JDK Bug System by Vikrant Agarwal, 10 months ago
    Server returned HTTP response code: 502 for URL: http://foo.bar.baz/
  • via Jenkins JIRA by voorth, 11 months ago
    Server returned HTTP response code: 502 for URL: http://jira/
  • via Oracle Community by 807596, 1 year ago
    Server returned HTTP response code: 502 for URL: http://www.cnn.com/
  • Stack trace

    • java.io.IOException: Server returned HTTP response code: 502 for URL: http://foo.bar.baz/ at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1628) at java.net.URL.openStream(URL.java:1048) at OpenStream.main(OpenStream.java:41) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:606) at com.sun.javatest.regtest.agent.MainWrapper$MainThread.run(MainWrapper.java:110) at java.lang.Thread.run(Thread.java:745)

    Write tip

    You have a different solution? A short tip here would help you and many other users who saw this issue last week.

    Users with the same issue

    2 times, 4 weeks ago
    Unknown user
    Once, 4 months ago
    3 times, 4 months ago
    Once, 6 months ago
    2 times, 9 months ago
    66 more bugmates