简体   繁体   中英

Cannot connect to localhost Google App Engine

I recently upgraded from Google Cloud Endpoints v1 to v2 on Google App Engine. Before the update, my Android emulator could connect to the localhost instance of GAE (running with Eclipse), but now this error is shown when I try to access the local URL. Can anyone advise?

HTTP ERROR 500

Problem accessing /_ah/api/. Reason:

    Failed to retrieve API configs with status: 500
Caused by:

java.io.IOException: Failed to retrieve API configs with status: 500
    at com.google.api.server.spi.tools.devserver.ApiServlet.getApiConfigSources(ApiServlet.java:104)
    at com.google.api.server.spi.tools.devserver.ApiServlet.initConfigsIfNecessary(ApiServlet.java:69)
    at com.google.api.server.spi.tools.devserver.RestApiServlet.service(RestApiServlet.java:114)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
    at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:511)
    at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1166)
    at com.google.appengine.api.blobstore.dev.ServeBlobFilter.doFilter(ServeBlobFilter.java:63)

My pom.xml has these two configs enabled, which I assume is related to connecting to localhost:

<address>0.0.0.0</address>
<port>8080</port>

In the Eclipse console, this error is also produced:

[INFO] GCLOUD: WARNING: /_ah/spi/BackendService.getApiConfigs
[INFO] GCLOUD: java.lang.NullPointerException
[INFO] GCLOUD:  at com.google.api.server.spi.SystemServiceServlet.execute(SystemServiceServlet.java:100)
[INFO] GCLOUD:  at com.google.api.server.spi.SystemServiceServlet.doPost(SystemServiceServlet.java:71)
[INFO] GCLOUD:  at javax.servlet.http.HttpServlet.service(HttpServlet.java:637)

change your port address and you can also refer 127.0.0.1 loop back ip address or actual ip address if your connected with network, instead localhost :

LOCAL_APP_ENGINE_SERVER_URL_FOR_ANDROID value to http://127.0.0.1:8888 (loop back ip address)

Added --address=127.0.0.1 to run configuration program params . --address=127.0.0.1 --port=8888 "/war"

Ran application, you can access administrate server using http://127.0.0.1:8888/_ah/admin/

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM