new or updated google endpoint api connection refused

54 views
Skip to first unread message

user1797338 via StackOverflow

unread,
Sep 4, 2013, 9:33:02 PM9/4/13
to google-appengin...@googlegroups.com

I started with the standard Google AppEngine tutorial that creates a set of GCM endpoints. The tutorial works great both locally and deployed to production. I am using Eclipse Kepler and the standard Google Eclipse Plug-In.

I have added a few new endpoint APIs to my AppEngine back end. I tested the new APIs locally and they work correctly. My new APIs are very simple datastore objects.

Next I deployed the updated AppEngine backend to production. The Google AppEngine logs and Dashboard tell me that my updated version was uploaded and installed successfully. The API discovery URL shows both my new APIs and the prior APIs. The prior APIs still work. The new APIs do not work. There is one and only one application version. I am testing from the Android emulator.

I have searched far and wide for an answer. The only related answer was to "clear the API cache, because the AppEngine aggressively caches", but I can't find anywhere an "API cache" would be cleared ?

The error I receive is as follows:

09-04 18:12:19.831: D/CloudSync(703): syncAll(): create a boat entity and populate 09-04 18:12:19.831: D/CloudSync(703): syncAll(): insert the test boat into the cloud 09-04 18:12:20.450: D/CloudSync(703): syncAll(): IOException attempting to insert entity via AppEngine 09-04 18:12:20.450: W/System.err(703): java.net.ConnectException: failed to connect to /10.0.2.2 (port 8888) after 20000ms: isConnected failed: ECONNREFUSED (Connection refused) 09-04 18:12:20.481: W/System.err(703): at libcore.io.IoBridge.isConnected(IoBridge.java:214) 09-04 18:12:20.481: W/System.err(703): at libcore.io.IoBridge.connectErrno(IoBridge.java:152) 09-04 18:12:20.481: W/System.err(703): at libcore.io.IoBridge.connect(IoBridge.java:112) 09-04 18:12:20.481: W/System.err(703): at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:192) 09-04 18:12:20.491: W/System.err(703): at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:459) 09-04 18:12:20.491: W/System.err(703): at java.net.Socket.connect(Socket.java:842) 09-04 18:12:20.491: W/System.err(703): at libcore.net.http.HttpConnection.(HttpConnection.java:77) 09-04 18:12:20.491: W/System.err(703): at libcore.net.http.HttpConnection.(HttpConnection.java:50) 09-04 18:12:20.491: W/System.err(703): at libcore.net.http.HttpConnection$Address.connect(HttpConnection.java:351) 09-04 18:12:20.521: W/System.err(703): at libcore.net.http.HttpConnectionPool.get(HttpConnectionPool.java:86) 09-04 18:12:20.531: W/System.err(703): at libcore.net.http.HttpConnection.connect(HttpConnection.java:128) 09-04 18:12:20.531: W/System.err(703): at libcore.net.http.HttpEngine.openSocketConnection(HttpEngine.java:308) 09-04 18:12:20.531: W/System.err(703): at libcore.net.http.HttpEngine.connect(HttpEngine.java:303) 09-04 18:12:20.561: W/System.err(703): at libcore.net.http.HttpEngine.sendSocketRequest(HttpEngine.java:282) 09-04 18:12:20.571: W/System.err(703): at libcore.net.http.HttpEngine.sendRequest(HttpEngine.java:232) 09-04 18:12:20.571: W/System.err(703): at libcore.net.http.HttpURLConnectionImpl.connect(HttpURLConnectionImpl.java:80) 09-04 18:12:20.581: W/System.err(703): at libcore.net.http.HttpURLConnectionImpl.getOutputStream(HttpURLConnectionImpl.java:188) 09-04 18:12:20.581: W/System.err(703): at com.google.api.client.http.javanet.NetHttpRequest.execute(NetHttpRequest.java:77) 09-04 18:12:20.611: W/System.err(703): at com.google.api.client.http.HttpRequest.execute(HttpRequest.java:960) 09-04 18:12:20.621: W/System.err(703): at com.google.api.client.googleapis.services.AbstractGoogleClientRequest.executeUnparsed(AbstractGoogleClientRequest.java:410) 09-04 18:12:20.621: W/System.err(703): at com.google.api.client.googleapis.services.AbstractGoogleClientRequest.executeUnparsed(AbstractGoogleClientRequest.java:343) 09-04 18:12:20.631: W/System.err(703): at com.google.api.client.googleapis.services.AbstractGoogleClientRequest.execute(AbstractGoogleClientRequest.java:460)

Seems like I must be missing something simple. Your suggestions are appreciated.



Please DO NOT REPLY directly to this email but go to StackOverflow:
http://stackoverflow.com/questions/18626356/new-or-updated-google-endpoint-api-connection-refused

user1797338 via StackOverflow

unread,
Sep 10, 2013, 2:14:49 AM9/10/13
to google-appengin...@googlegroups.com

I started with the standard Google AppEngine tutorial that creates a set of GCM endpoints. The tutorial works great both locally and deployed to production. I am using Eclipse Kepler and the standard Google Eclipse Plug-In.

I have added a few new endpoint APIs to my AppEngine back end. I tested the new APIs locally and they work correctly. My new APIs are very simple datastore objects.

Next I deployed the updated AppEngine backend to production. The Google AppEngine logs and Dashboard tell me that my updated version was uploaded and installed successfully. The API discovery URL shows both my new APIs and the prior APIs. The prior APIs still work. The new APIs do not work. There is one and only one application version. I am testing from the Android emulator.

I have searched far and wide for an answer. The only related answer was to "clear the API cache, because the AppEngine aggressively caches", but I can't find anywhere an "API cache" would be cleared ?

The error I receive is as follows:

09-04 18:12:20.450: D/CloudSync(703): syncAll(): IOException attempting to insert entity via AppEngine
09-04 18:12:20.450: W/System.err(703): java.net.ConnectException: failed to connect to /10.0.2.2 (port 8888) after 20000ms: isConnected failed: ECONNREFUSED (Connection refused)
09-04 18:12:20.481: W/System.err(703):  at libcore.io.IoBridge.isConnected(IoBridge.java:214)
09-04 18:12:20.481: W/System.err(703):  at libcore.io.IoBridge.connectErrno(IoBridge.java:152)
09-04 18:12:20.481: W/System.err(703):  at libcore.io.IoBridge.connect(IoBridge.java:112)
09-04 18:12:20.481: W/System.err(703):  at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:192)
09-04 18:12:20.491: W/System.err(703):  at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:459)
09-04 18:12:20.491: W/System.err(703):  at java.net.Socket.connect(Socket.java:842)
09-04 18:12:20.491: W/System.err(703):  at libcore.net.http.HttpConnection.<init>(HttpConnection.java:77)
09-04 18:12:20.491: W/System.err(703):  at libcore.net.http.HttpConnection.<init>(HttpConnection.java:50)
09-04 18:12:20.491: W/System.err(703):  at libcore.net.http.HttpConnection$Address.connect(HttpConnection.java:351)
09-04 18:12:20.521: W/System.err(703):  at libcore.net.http.HttpConnectionPool.get(HttpConnectionPool.java:86)
09-04 18:12:20.531: W/System.err(703):  at libcore.net.http.HttpConnection.connect(HttpConnection.java:128)
09-04 18:12:20.531: W/System.err(703):  at libcore.net.http.HttpEngine.openSocketConnection(HttpEngine.java:308)
09-04 18:12:20.531: W/System.err(703):  at libcore.net.http.HttpEngine.connect(HttpEngine.java:303)
09-04 18:12:20.561: W/System.err(703):  at libcore.net.http.HttpEngine.sendSocketRequest(HttpEngine.java:282)
09-04 18:12:20.571: W/System.err(703):  at libcore.net.http.HttpEngine.sendRequest(HttpEngine.java:232)
09-04 18:12:20.571: W/System.err(703):  at libcore.net.http.HttpURLConnectionImpl.connect(HttpURLConnectionImpl.java:80)
09-04 18:12:20.581: W/System.err(703):  at libcore.net.http.HttpURLConnectionImpl.getOutputStream(HttpURLConnectionImpl.java:188)
09-04 18:12:20.581: W/System.err(703):  at com.google.api.client.http.javanet.NetHttpRequest.execute(NetHttpRequest.java:77)
09-04 18:12:20.611: W/System.err(703):  at com.google.api.client.http.HttpRequest.execute(HttpRequest.java:960)
09-04 18:12:20.621: W/System.err(703):  at com.google.api.client.googleapis.services.AbstractGoogleClientRequest.executeUnparsed(AbstractGoogleClientRequest.java:410)
09-04 18:12:20.621: W/System.err(703):  at com.google.api.client.googleapis.services.AbstractGoogleClientRequest.executeUnparsed(AbstractGoogleClientRequest.java:343)
09-04 18:12:20.631: W/System.err(703):  at com.google.api.client.googleapis.services.AbstractGoogleClientRequest.execute(AbstractGoogleClientRequest.java:460)

Seems like I must be missing something simple. Your suggestions are appreciated.

Update:

I can see, explore, and successfully test my new/updated APIs from the Google API Explorer. So it seems that this is a problem with the Android App build.

user1797338 via StackOverflow

unread,
Sep 11, 2013, 1:38:26 AM9/11/13
to google-appengin...@googlegroups.com

I found a number of very similar but not quite the same issue reports around the March and April time frame of this year (2013). Reviewing the release notes for GPE, I saw that most of these issues were resolved by Google by May. I compared my Eclipse GPE and SDK versions and found that they were from the March time frame. So I did the following.

1) a full update of all installed Eclipse plug-ins including the Google plug-ins
2) removed all generated Google Cloud Endpoint code from both the AppEngine project and the Android App project
3) updated the AppEngine project version number found in the appengine-web.xml
4) re-generated all of the Google Cloud Endpoint libraries
5) deployed the updated AppEngine
6) used the AppEngine Dashboard to set the new Default version to match the above
7) tested and verified the updated Endpoint APIs from the Google API Explorer and using the Datastore Viewer
8) Double checked that the following was set to false:
    public class CloudEndpointUtils {
        ...
        protected static final boolean LOCAL_ANDROID_RUN = false;
        ...
    }
8) Ran the updated Android application from the emulator (making sure that the emulator Run Configuration was set to a target using Google API 15+ and the Additional Emulator command line arguments was set to "-dns-server 8.8.8.8" (without the double quotes)  -- this is the Google DNS service)
9) verified that the Android application could save data to a new set of endpoints with no log errors, and the new stored entities are present confirmed through the Datastore Viewer.

I verified that having either my local Firewall on/off or the Anti-Virus software on/off made no difference.

Problem solved. I believe I just need to be on the latest software updates.



Please DO NOT REPLY directly to this email but go to StackOverflow:
http://stackoverflow.com/questions/18626356/new-or-updated-google-endpoint-api-connection-refused/18733393#18733393
Reply all
Reply to author
Forward
0 new messages