Appengine 连接超时错误

Appengine connection time out error

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

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 项目它仍然显示 error.Apps 没有 appengine 工作正常。 有人帮忙。

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

执行 gradle 同步,看看效果如何。

问题是防火墙阻止工作室更新新的library.When我禁用防火墙它工作正常。

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

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

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