I am trying to fetch http url in my app, it works fine on my local server (dev env) but when i deploy this on Google AppEngine.. it shows below Firewall Notification
"Firewall Notification - Your access has been blocked by firewall policy 732. If you have any further concerns, please contact your network administrator for more information."
I am not getting even a single clue... Can anyone help me out?
URL url = new URL(urlString);
HttpURLConnection conn = (HttpURLConnection) url.openConnection();
conn.setConnectTimeout(REQUEST_TIME_OUT);
conn.setReadTimeout(REQUEST_TIME_OUT);
conn.setDoOutput(true);
int length = dataToBePost.length();
conn.setRequestProperty("Content-Length", (String.valueOf(length)));
OutputStreamWriter wr = new OutputStreamWriter(conn.getOutputStream());
wr.write(dataToBePost);
wr.flush();
InputStream inStream = conn.getInputStream();
//using inStream now
Private, broadcast, multicast, and Google IP ranges are blocked, except those whitelisted below:
8.8.8.8
, 8.8.4.4
, 2001:4860:4860::8888
, 2001:4860:4860::8844
port 53smtp.gmail.com
port 465 and 587pop.gmail.com
port 995imap.gmail.com
port 993--
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 google-appengi...@googlegroups.com.
To post to this group, send email to google-a...@googlegroups.com.
Visit this group at http://groups.google.com/group/google-appengine.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-appengine/30df80cd-e4d1-450d-9cfc-f740af4156c7%40googlegroups.com.
Are you connecting using Sockets? Sockets have restrictions on what they can access. See https://cloud.google.com/appengine/docs/java/sockets/Paraphrased:Private, broadcast, multicast, and Google IP ranges are blocked, except those whitelisted below:
- Google Public DNS:
8.8.8.8
,8.8.4.4
,2001:4860:4860::8888
,2001:4860:4860::8844
port 53- Gmail SMTPS:
smtp.gmail.com
port 465 and 587- Gmail POP3S:
pop.gmail.com
port 995- Gmail IMAPS:
imap.gmail.com
port 993tl;dr: Sockets-based connections cannot hit google.com from App Engine, with some exceptions.
On Thu, Jul 30, 2015 at 9:54 PM, Deepak Kumar <deepak...@gmail.com> wrote:
Hi Patrice,It looks like, still the question is not clear. I can hit [project].appspot.com.As per my last example,1. I access to http://google.appspot.com from my browser2. http://google.appspot.com internally access to http://google.comGoogle AppEngine app can not hit http://google.com.or in other words, i access appspot app and this appspot app access some other http url.I am able to access appspot.com app but appspot.com app is not able to access other url which i am trying to access in side my app.It looks like AppEngine has some firewall, which is blocking connection to http://google.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 google-appengine+unsubscribe@googlegroups.com.
To post to this group, send email to google-appengine@googlegroups.com.
Visit this group at http://groups.google.com/group/google-appengine.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-appengine/30df80cd-e4d1-450d-9cfc-f740af4156c7%40googlegroups.com.