Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Google Cloud Endpoints : Not able to open http://localhost:8080/_ah/api/explorer behind a proxy network

When i am opening http://localhost:8080/_ah/api/explorer Eclipse is showing an error- >

com.google.apphosting.utils.jetty.JettyLogger warn
[INFO] WARNING: /_ah/api/static/proxy.html: java.io.IOException: Could not fetch URL: https://webapis-discovery.appspot.com/_ah/api/static/proxy.html, error: Received exception executing http method GET against URL https://webapis-discovery.appspot.com/_ah/api/static/proxy.html: Connection to https://webapis-discovery.appspot.com refused

Few lines above Eclipse shows an SEVERE error- >

[INFO] SEVERE: javax.servlet.ServletContext log: unavailable
[INFO] java.io.IOException: Could not fetch URL: https://webapis-discovery.appspot.com/_ah/api/static/proxy.html, error: Received exception executing http method GET against URL https://webapis-discovery.appspot.com/_ah/api/static/proxy.html: Connection to https://webapis-discovery.appspot.com refused
[INFO]  at com.google.appengine.api.urlfetch.URLFetchServiceImpl.convertApplicationException(URLFetchServiceImpl.java:138)
[INFO]  at com.google.appengine.api.urlfetch.URLFetchServiceImpl.fetch(URLFetchServiceImpl.java:45)
[INFO]  at com.google.apphosting.utils.security.urlfetch.URLFetchServiceStreamHandler$Connection.fetchResponse(URLFetchServiceStreamHandler.java:417)
[INFO]  at com.google.apphosting.utils.security.urlfetch.URLFetchServiceStreamHandler$Connection.getInputStream(URLFetchServiceStreamHandler.java:296)
[INFO]  at com.google.apphosting.utils.security.urlfetch.URLFetchServiceStreamHandler$Connection.getResponseCode(URLFetchServiceStreamHandler.java:149)
[INFO]  at com.google.appengine.repackaged.com.google.api.client.http.javanet.NetHttpResponse.<init>(NetHttpResponse.java:36)
[INFO]  at com.google.appengine.repackaged.com.google.api.client.http.javanet.NetHttpRequest.execute(NetHttpRequest.java:94)
[INFO]  at com.google.appengine.repackaged.com.google.api.client.http.HttpRequest.execute(HttpRequest.java:965)
[INFO]  at com.google.api.server.spi.tools.devserver.StaticServlet.getStaticContent(StaticServlet.java:58)
[INFO]  at com.google.api.server.spi.tools.devserver.StaticServlet.cacheContent(StaticServlet.java:50)
[INFO]  at com.google.api.server.spi.tools.devserver.StaticServlet.init(StaticServlet.java:43)
[INFO]  at javax.servlet.GenericServlet.init(GenericServlet.java:212)
[INFO]  at org.mortbay.jetty.servlet.ServletHolder.initServlet(ServletHolder.java:440)
[INFO]  at org.mortbay.jetty.servlet.ServletHolder.getServlet(ServletHolder.java:339)
[INFO]  at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:487)
[INFO]  at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1166)
[INFO]  at com.google.appengine.api.socket.dev.DevSocketFilter.doFilter(DevSocketFilter.java:74)
[INFO]  at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1157)
[INFO]  at com.google.appengine.tools.development.ResponseRewriterFilter.doFilter(ResponseRewriterFilter.java:127)
[INFO]  at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1157)
[INFO]  at com.google.appengine.tools.development.HeaderVerificationFilter.doFilter(HeaderVerificationFilter.java:34)
[INFO]  at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1157)
[INFO]  at com.google.appengine.api.blobstore.dev.ServeBlobFilter.doFilter(ServeBlobFilter.java:63)
[INFO]  at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1157)
[INFO]  at com.google.apphosting.utils.servlet.TransactionCleanupFilter.doFilter(TransactionCleanupFilter.java:43)
[INFO]  at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1157)
[INFO]  at com.google.appengine.tools.development.StaticFileFilter.doFilter(StaticFileFilter.java:125)
[INFO]  at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1157)
[INFO]  at com.google.appengine.tools.development.DevAppServerModulesFilter.doDirectRequest(DevAppServerModulesFilter.java:366)
[INFO]  at com.google.appengine.tools.development.DevAppServerModulesFilter.doDirectModuleRequest(DevAppServerModulesFilter.java:349)
[INFO]  at com.google.appengine.tools.development.DevAppServerModulesFilter.doFilter(DevAppServerModulesFilter.java:116)
[INFO]  at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1157)
[INFO]  at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:388)
[INFO]  at org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216)
[INFO]  at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:182)
[INFO]  at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:765)
[INFO]  at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:418)
[INFO]  at com.google.appengine.tools.development.DevAppEngineWebAppContext.handle(DevAppEngineWebAppContext.java:98)
[INFO]  at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)
[INFO]  at com.google.appengine.tools.development.JettyContainerService$ApiProxyHandler.handle(JettyContainerService.java:491)
[INFO]  at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)
[INFO]  at org.mortbay.jetty.Server.handle(Server.java:326)
[INFO]  at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:542)
[INFO]  at org.mortbay.jetty.HttpConnection$RequestHandler.headerComplete(HttpConnection.java:923)
[INFO]  at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:547)
[INFO]  at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:212)
[INFO]  at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:404)
[INFO]  at org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:409)
[INFO]  at org.mortbay.thread.QueuedThreadPool$PoolThread.run(QueuedThreadPool.java:582)

My college has a proxy server, i have already changed the system wide proxy settings and eclipse proxy settings in Window->Preferences->General->Network Connections . Everything else in Ubuntu works fine except this. Internet is working inside Eclipse too.

Screenshot showing eclipse Network settings -

http://i1282.photobucket.com/albums/a540/saurabh595/Screenshotfrom2014-08-16_zps35144efe.png

When i try using my mobile internet connection(without proxy server) it works sometimes and shows same error otherwise.

I've been trying to solve this by doing many Google Searches and trying many things out, but I just cannot seem to be able to proceed any further. I would very much appreciate any help I can get from this community of professionals.

Thanks

like image 687
saurabh Avatar asked Aug 16 '14 09:08

saurabh


1 Answers

The API explorer is located outside your proxy, exactly in https://apis-explorer.appspot.com/apis-explorer/ and when exploring the APIs available from your development server you go to that address. You may check it by putting this address in your browser (in your localhost by adding /_ah/api/explorer) and seeing where it gets redirected to.

Although you have configured your proxy for outgoing connections from your computer to the rest of the Internet, you can't configure your proxy (unless you work in the IT department of your college) to allow connections originating at apis-explorer.appspot.com to be redirected to your computer.

Hence, unless you'll be able to go out directly to the Internet bypassing the proxy or using another network (e.g., from a smart phone), that won't work for you.

like image 65
Mario Avatar answered Oct 11 '22 15:10

Mario