Appengine connection time out error
Asked Answered
P

3

0

I have been trying to create app engine module using java.It has been working well .But now it suddenly start to show error

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

My stack trace is

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

my web.xml file is

<?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>

i have also tried to create new appengine project it still shows error.Apps without appengine works ok. Some one help.

Psycho answered 5/8, 2015 at 11:4 Comment(0)
P
0

The problem was firewall blocking studio to update new library.When I disable firewall it works fine.

Psycho answered 10/8, 2015 at 8:2 Comment(0)
O
3

As far as I know, connection timing out is a network problem .Go to File > Settings > Appearance and Behaviour > System Settings > HTTP Proxy and make sure your proxy settings look like this:

enter image description here

Perform gradle sync and see how it goes.

Oaf answered 6/8, 2015 at 5:47 Comment(7)
i tried it with no proxy but it still show same error.I doubt the error start after the studio update.I did the update yesterday.I am not sure but i noted this error after that.Psycho
I see, unfortunately I can't tell what's wrong.I'll try to help you find a solution later today.Oaf
I tried creating new project with appengine .That project also show this error while build.Psycho
Are you connected to the Internet, and how strong is your connection?Oaf
yes i am connected to internet the connection is ok about 1mb/sec.But I think it has some problem connecting with studio I think.Because when I try to update my android support library it shows connection refused and nothing is installed.Is it may be some problem in my settings?Psycho
Okay.Then, yes it is a problem with a setting in Android Studio.Since you have a fast connection, I suggest you uninstall the Android Studio you have, and download the latest version from the official site. When it asks you if you want to import old settings, select the third option and then try everything all over again.Oaf
Let us continue this discussion in chat.Psycho
P
0

The problem was firewall blocking studio to update new library.When I disable firewall it works fine.

Psycho answered 10/8, 2015 at 8:2 Comment(0)
S
0

I had the same issue and I fixed it by specifying the proxy settings in gradle.properties file. Next to backend build.gradle file, I've created gradle.properties file and put there this:

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

Specifying the proxy properties in Studio did not help me.

Sassafras answered 25/9, 2015 at 12:30 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.