Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8489053
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T21:43:05+00:00 2026-06-10T21:43:05+00:00

I am working on creating a Video sitemap for a site that has hosted

  • 0

I am working on creating a Video sitemap for a site that has hosted videos on Brightcove video cloud. In order to get all the video information from the site, Brightcove suggests to read the response from their url of following form

http://api.brightcove.com/services/library?token="+accountToken+"&page_size=1&command=find_all_videos&output=JSON&get_item_count=true

the output of the url is in JSON, where accountToken is just an identifier of the account.

When I hit the above url with Token in the browser, it gives me the correct response.

I wrote below program snippet to read from that url

URL jsonURL = new URL("http://api.brightcove.com/services/library?token="+accountToken+"&page_size=1&command=find_all_videos&output=JSON&get_item_count=true");
        HttpURLConnection connection = (HttpURLConnection) jsonURL.openConnection();
        connection.setRequestMethod("GET");
        connection.connect();
        BufferedReader reader = new BufferedReader(
                new InputStreamReader(connection.getInputStream()));
        String lineRead = "";
        while (reader.ready()) {
            lineRead = lineRead + reader.readLine();
        }

As my browser uses proxy, I added below code to include proxy settings

        System.setProperty("http.proxyHost", "my.proxyurl.com");
        System.setProperty("http.proxyPort", "80");

Without using proxy settings, it returns java.net.ConnectException: Connection refused: connect and with proxy it gives me java.io.IOException: Server returned HTTP response code: 503

So my question is , why is it giving me a 503(Service Unavailable) error ? From the browser its working fine.

Update 1:
It seems like an issue with the Network. I pinged the domain and it said “Request Timed out”. Working via HTTP though. Looks like an issue with the Firewall.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-10T21:43:07+00:00Added an answer on June 10, 2026 at 9:43 pm

    I think, it may due to your internet connection, I have tried your code I didn’t get any 503(Service Unavailable). Check out with different connection connection(without proxy) and it should work. Or you can try it with slightly different approach:

    Proxy proxy = new Proxy(Proxy.Type.HTTP, new InetSocketAddress("host", "port));
    conn = new URL(jsonURL).openConnection(proxy);
    

    If you have SOCKS type proxy, change Proxy‘s constructor parameter to Proxy.Type.SOCKS.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm working on creating a windows service that will send emails to a customer
I'm currently working on creating a Download Manager for Android. In order to optimize
I am working on creating a web app that will query event logs on
I'm interested in creating an iPhone app that can stream video from a central
i'm working on creating an app that streams mp3s from a server. i'm using
I am creating a video player if Phonon and Qt. everything is working fine,
I am basically creating an iphone app that get's it's data from wordpress. Wordpress
I am working on a PHP/CURL project that uploads videos to the various websites.
I'm creating a CoffeeScript application that overlays a webcam video with a canvas element
I'm creating thumbnails from videos using ffmpeg and it's working fine. But now I

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.