繁体   English   中英

无法连接到本地主机Google App Engine

[英]Cannot connect to localhost Google App Engine

我最近从Google App Engine的Google Cloud Endpoints v1升级到v2。 在更新之前,我的Android模拟器可以连接到GAE的localhost实例(使用Eclipse运行),但是现在,当我尝试访问本地URL时,将显示此错误。 有人可以建议吗?

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)

我的pom.xml启用了这两个配置,我认为这与连接到本地主机有关:

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

在Eclipse控制台中,还会产生此错误:

[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)

更改端口地址,如果您已连接网络,也可以引用127.0.0.1回送IP地址或实际IP地址,而不是localhost

LOCAL_APP_ENGINE_SERVER_URL_FOR_ANDROID值设置为http://127.0.0.1:8888 (回送IP地址)

添加了--address=127.0.0.1以运行配置程序参数。 --address=127.0.0.1 --port=8888 “ / war”

跑应用程序,您可以使用http://127.0.0.1:8888/_ah/admin/访问管理服务器

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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