connect to box is failing using REST protocol but the same works using HTTP protocol
AnsweredHi,
For our application when we are using REST protocol to connect to BOX , connection is failing with the bellow error:
https://api.box.com/2.0/search?query=Revised&file_extensions=pdf - Caught unhandled exception: java.lang.RuntimeException: org.apache.http.conn.ConnectTimeoutException: Connect to api.box.com:443 [api.box.com/107.152.27.197] failed...
When we are using HTTP protocol to connect to BOX , calls are going through without any error. Can someone please explain the reason behind this problem?
-
Did this just start happening today? There were some issues (supposedly since resolved) with the APIs earlier today--see http://status.box.com
-
I do not believe this is a BOX issue as I have one more application(hosted in my personal machine) using the exact codes( connect to box using HTTP and REST) and that one seems to be working. The one having problem is hosted in cloud . I kind of sense that this might be a network/firewall issue of the cloud server.
-
This is the reply I got back from our network admin.
--telnet wont be possible as we go outside using a proxy
--I can do curl and access the api.box URL
--the curl command allows to set a proxy.After he ran the curl command , we got response back:
[root@lvappi01351 ~]# export https_proxy=gateway.bns:443
[root@lvappi01351 ~]# curl https://api.box.com
301 Moved PermanentlyMoved Permanently
The document has moved https://developers.box.com/">here.
>
[root@lvappi01351 ~]# -
Sounds to me like the proxy is almost definitely the issue. Are all the hosts/ports listed at https://community.box.com/t5/How-to-Guides-for-Account/Configuring-A-Firewall-For-Box-Applications/ta-p/12 properly set up and proxied?
-
Well, all RESTful API calls go to Box over HTTPS. My guess is that there's something about your firewall/proxy setup that is blocking the connection from the machine you're running your code to the HTTPS ports on the right machine at Box. If opening things up to the list of hosts that I linked to earlier in this thread doesn't work, I'd contact Box support directly (via Contact Box Support) to see if they have any more specific guidance about what needs to be opened/proxied to allow the API calls to work.
-
The root cause of our problem was the source code from our vendor(Pega). It seems the because of the bug any rest call made from the app using proxy( we have set up a proxy setting on our app server and all the calls should use the proxy configuration) , was bypassing the proxy settings. after the source was updated , all the rest calls are now going through proxy and are successful.
Please sign in to leave a comment.
Comments
10 comments