On Wed, Oct 1, 2014 at 3:39 AM, Shankar <[email protected]> wrote:

>  I am using sign-up/sign-in with Google feature in my app, but when I
> deploy the my app in google app engine then I am getting following error.
>
> org.apache.http.impl.client.DefaultRequestDirector tryConnect: I/O
> exception (java.net.SocketException) caught when connecting to the target
> host: Permission denied: Attempt to access a blocked recipient without
> permission. (mapped-IPv4)
>
>


Well, it looks like there are two problems here. One problem is that it's
attempting to connect via sockets (the SocketException reference) - that
shouldn't be necessary. Regular URLFetch can retrieve the authentication
tokens just fine. The second problem is the "Attempt to access a blocked
recipient without permission" line, which is what the Sockets API complains
about when attempting to connect to certain blocked Google hosts (see the
limitations section here:
https://cloud.google.com/appengine/docs/java/sockets/ ).


It looks like you're using the Apache HTTP client to handle your requests.
Can you try rewriting your code to use the low level App Engine URLFetch
API (
https://cloud.google.com/appengine/docs/java/javadoc/com/google/appengine/api/urlfetch/package-summary
)
or the standard HttpUrlConnection (
https://cloud.google.com/appengine/docs/java/urlfetch/usingjavanet#Using_HttpURLConnection
 )?

You can also try using some of Google's sample code available here:
https://developers.google.com/+/quickstart/java



-----------------
-Vinny P
Technology & Media Consultant
Chicago, IL

App Engine Code Samples: http://www.learntogoogleit.com

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/google-appengine.
For more options, visit https://groups.google.com/d/optout.

Reply via email to