Appengine连接超时错误

时间:2015-08-05 11:04:38

标签: android google-app-engine connection-timeout

我一直在尝试使用java创建app引擎模块。它一直运行良好。但现在它突然开始显示错误

Error:Execution failed for task ':backend:appengineEndpointsGetClientLibs'.There was an error running endpoints command get-client-lib: connect timed out 

我的堆栈跟踪是

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':backend:appengineEndpointsGetClientLibs'.
> There was an error running endpoints command get-client-lib: connect timed out

* Try:
Run with --info or --debug option to get more log output.

* Exception is:
    org.gradle.api.tasks.TaskExecutionException: Execution failed for task ':backend:appengineEndpointsGetClientLibs'.
    at    org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeActions(ExecuteActionsTaskExecuter.java:69)
    at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.execute(ExecuteActionsTaskExecuter.java:46)

Caused by: org.gradle.api.GradleException: There was an error running endpoints command get-client-lib: connect timed out
    at com.google.appengine.task.endpoints.EndpointsTask.runEndpointsCommand(EndpointsTask.groovy:52)
    at com.google.appengine.task.endpoints.EndpointsTask$runEndpointsCommand.callCurrent(Unknown Source)

... 55 more
Caused by: java.net.SocketTimeoutException: connect timed out
    at com.google.appengine.repackaged.com.google.api.client.http.javanet.NetHttpRequest.execute(NetHttpRequest.java:77)
    at com.google.appengine.repackaged.com.google.api.client.http.HttpRequest.execute(HttpRequest.java:972)
    at com.google.api.server.spi.tools.CloudDiscoveryDocGenerator.postRequest(CloudDiscoveryDocGenerator.java:75)
... 66 more

我的web.xml文件是

<?xml version="1.0" encoding="utf-8"?>
<web-app xmlns="http://java.sun.com/xml/ns/javaee" version="2.5">
<filter>
    <filter-name> ObjectifyFilter</filter-name>
    <filter-class>com.googlecode.objectify.ObjectifyFilter</filter-class>
</filter>
<filter-mapping>
    <filter-name>ObjectifyFilter</filter-name>
    <url-pattern>/*</url-pattern>
</filter-mapping>
<servlet>
    <servlet-name>SystemServiceServlet</servlet-name>
    <servlet-class>com.google.api.server.spi.SystemServiceServlet</servlet-class>
    <init-param>
        <param-name>services</param-name>
        <param-value>com.example.user.childtracker.backend.RegistrationEndpoint, com.example.user.childtracker.backend.MessagingEndpoint</param-value>
    </init-param>
</servlet>
<servlet-mapping>
    <servlet-name>SystemServiceServlet</servlet-name>
    <url-pattern>/_ah/spi/*</url-pattern>
</servlet-mapping>

<welcome-file-list>
    <welcome-file>index.html</welcome-file>
</welcome-file-list>

我还试图创建新的appengine项目它仍然显示错误。没有appengine的应用程序工作正常。 有人帮忙。

3 个答案:

答案 0 :(得分:3)

据我所知,连接超时是一个网络问题。转到File > Settings > Appearance and Behaviour > System Settings > HTTP Proxy并确保您的代理设置如下所示:

enter image description here

执行gradle sync并查看其进展情况。

答案 1 :(得分:0)

问题是防火墙阻止工作室更新新库。当我禁用防火墙时,它工作正常。

答案 2 :(得分:0)

我遇到了同样的问题,我通过在gradle.properties文件中指定代理设置来修复它。 在后端build.gradle文件旁边,我创建了gradle.properties文件并将其放在那里:

systemProp.http.proxyHost=<prox_host>
systemProp.http.proxyPort=<proxy_port>

在Studio中指定代理属性对我没有帮助。