Re: [google-appengine] dev_appserver.py cannot connect to some HTTP endpoint

2014-06-04 Thread Marco Lovato
Hum... Its already a xubuntu VM using virtualbox inside a win machine.
Hehehe

I am installing a new workstation for myself, with linux on host... Will
try this way tomorrow.

Best
Marco

-- 
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+unsubscr...@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.
For more options, visit https://groups.google.com/d/optout.


Re: [google-appengine] dev_appserver.py cannot connect to some HTTP endpoint

2014-06-04 Thread Vinny P
On Tue, Jun 3, 2014 at 6:28 AM, Marco Lovato  wrote:

> I have absolutelly no idea. And even if I asked for, I wont be told. And
> if someone did, I would be not allowed to tell :-)
> Sorry, its a big IT company. And yes, probably (99.99%) the proxy here
> grabs everything.
> I will try my way for now, @work, and the suggested IDE.
> Tks.
>


As someone who has also worked in large IT companies, I can completely
sympathize with your situation :-)

One last thing to try: Install a VM application (VMWare Player
 for example), then install the App
Engine SDK inside the VM and try again. The VM might be able to route
outbound connections properly since the proxy/protection software isn't
directly attached.


-
-Vinny P
Technology & Media Advisor
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 google-appengine+unsubscr...@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.
For more options, visit https://groups.google.com/d/optout.


Re: [google-appengine] dev_appserver.py cannot connect to some HTTP endpoint

2014-06-03 Thread Marco Lovato
Just to clarify, Diego.
The problem happens directly on the console, even before I go to browser...

-- 
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+unsubscr...@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.
For more options, visit https://groups.google.com/d/optout.


Re: [google-appengine] dev_appserver.py cannot connect to some HTTP endpoint

2014-06-03 Thread Marco Lovato
I have absolutelly no idea. And even if I asked for, I wont be told. And if 
someone did, I would be not allowed to tell :-)
Sorry, its a big IT company. And yes, probably (99.99%) the proxy here 
grabs everything.
I just configured http[s]_proxy variables under my bashrc.

I will try my way for now, @work, and the suggested IDE.

Tks.

-- 
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+unsubscr...@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.
For more options, visit https://groups.google.com/d/optout.


Re: [google-appengine] dev_appserver.py cannot connect to some HTTP endpoint

2014-05-29 Thread Vinny P
On Thursday, May 29, 2014 1:33:36 AM UTC-5, Diego Duclos wrote:

> A more realistic alternative would perhaps be to configure your browser 
> not to send localhost traffic to the proxy at all.
>


That option would depend on the proxy/protection software being used. Some 
corporate proxy/firewall solutions can dig so deeply into the 
communications stack that your option is unavailable.

@OP Whats the name of the proxy service installed on your machine?

-
-Vinny P
Technology & Media Advisor
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 google-appengine+unsubscr...@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.
For more options, visit https://groups.google.com/d/optout.


Re: [google-appengine] dev_appserver.py cannot connect to some HTTP endpoint

2014-05-28 Thread Diego Duclos
A more realistic alternative would perhaps be to configure your browser not
to send localhost traffic to the proxy at all.



On Thu, May 29, 2014 at 7:10 AM, Vinny P  wrote:

> On Mon, May 26, 2014 at 7:40 AM, Marco Lovato  wrote:
>
> Now the app loads. BUT inside the app, I still didnt managed to make
>> python Requests to run with Proxy :-)
>> Will left my appengine_rpc.py hacked, but this is a problem, isnt?
>>
>
>
> Yes, this is a problem. But it's not a problem with the dev appserver as
> far as I can see. The problem is the proxy; as you noted in your previous
> email it's rewriting even localhost requests.
>
> Sorry to say this, but right now it looks like your only choice is to
> complain to your company's IT department and make them fix the proxy. As a
> short term measure, you could try using an online IDE such as codenvy:
> http://docs.codenvy.com/user/paas/google-app-engine/
>
>
> -
> -Vinny P
> Technology & Media Advisor
> 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 google-appengine+unsubscr...@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.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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+unsubscr...@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.
For more options, visit https://groups.google.com/d/optout.


Re: [google-appengine] dev_appserver.py cannot connect to some HTTP endpoint

2014-05-28 Thread Vinny P
On Mon, May 26, 2014 at 7:40 AM, Marco Lovato  wrote:

> Now the app loads. BUT inside the app, I still didnt managed to make
> python Requests to run with Proxy :-)
> Will left my appengine_rpc.py hacked, but this is a problem, isnt?
>


Yes, this is a problem. But it's not a problem with the dev appserver as
far as I can see. The problem is the proxy; as you noted in your previous
email it's rewriting even localhost requests.

Sorry to say this, but right now it looks like your only choice is to
complain to your company's IT department and make them fix the proxy. As a
short term measure, you could try using an online IDE such as codenvy:
http://docs.codenvy.com/user/paas/google-app-engine/


-
-Vinny P
Technology & Media Advisor
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 google-appengine+unsubscr...@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.
For more options, visit https://groups.google.com/d/optout.


Re: [google-appengine] dev_appserver.py cannot connect to some HTTP endpoint

2014-05-26 Thread Marco Lovato
Yes, it is.

I removed the opener.add_handler(fancy_urllib.FancyProxyHandler()) 
from appengine/tools/appengine_rpc.py
Then I added an if 'localhost' not in host to add the proxy or not.

This way I can start without having to disable GAE updates.

Now the app loads. BUT inside the app, I still didnt managed to make python 
Requests to run with Proxy :-)

Will left my appengine_rpc.py hacked, but this is a problem, isnt?

Marco

-- 
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+unsubscr...@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.
For more options, visit https://groups.google.com/d/optout.


Re: [google-appengine] dev_appserver.py cannot connect to some HTTP endpoint

2014-05-26 Thread Marco Lovato
Looks like it is sending to proxy the localhost requests...

-- 
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+unsubscr...@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.
For more options, visit https://groups.google.com/d/optout.


Re: [google-appengine] dev_appserver.py cannot connect to some HTTP endpoint

2014-05-26 Thread Marco Lovato
Ok. Some progress...

If i completelly unset proxy, and tell to skip updates, I can yes bring the 
8080 up.
So, its the dame proxy... 

But, why...


-- 
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+unsubscr...@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.
For more options, visit https://groups.google.com/d/optout.


Re: [google-appengine] dev_appserver.py cannot connect to some HTTP endpoint

2014-05-26 Thread Marco Lovato
One addition: port 8000 works. I can use the admin UI. The 8080 is the tcp 
port that does not work.

-- 
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+unsubscr...@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.
For more options, visit https://groups.google.com/d/optout.


Re: [google-appengine] dev_appserver.py cannot connect to some HTTP endpoint

2014-05-26 Thread Marco Lovato
Did that... Same problem, except that, yes, it do not try to check for 
upgrade.
Didn´t know in fact if it succeded or not in contacting GAE servers, and 
did not remember if @home, there´s a differente feedback on console.

The strage part is that I can do an appcfg.py update. It really works. But 
cannot run it in dev mode.
And my machine, besides is running on my Work, was installed by me, same 
way (same distro) I installed @home.

Tks again
Marco

-- 
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+unsubscr...@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.
For more options, visit https://groups.google.com/d/optout.


Re: [google-appengine] dev_appserver.py cannot connect to some HTTP endpoint

2014-05-26 Thread Vinny P
On Fri, May 23, 2014 at 3:49 PM, Marco Lovato  wrote:

> INFO 2014-05-23 20:44:07,649 sdk_update_checker.py:242] Checking for
> updates to the SDK.
> INFO 2014-05-23 20:44:07,978 __init__.py:94] Connecting through tunnel
> to: appengine.google.com:443
> INFO 2014-05-23 20:44:09,632 api_server.py:171] Starting API server
> at: http://localhost:32938
> INFO 2014-05-23 20:44:09,655 dispatcher.py:182] Starting module
> "default" running at: http://0.0.0.0:8080
>



So what's strange is that it looks like the SDK is trying to check for
updates, but I don't see any followup text (i.e. it should say something
along the lines of "upgrade now" or "sdk up to date"). Can you connect your
work computer to your corporate network's
DMZ or
public wifi and then run the development appserver?

If you can't, try this: search your computer for a file named
*.appcfg_nag* (including
the prefixed period). Open it, then change the *opt_in* property to *false*.
This should turn off the SDK update checker. Try running the development
appserver again.


-
-Vinny P
Technology & Media Advisor
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 google-appengine+unsubscr...@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.
For more options, visit https://groups.google.com/d/optout.


Re: [google-appengine] dev_appserver.py cannot connect to some HTTP endpoint

2014-05-23 Thread Marco Lovato
Yes, my corporate network connect my to the real world through a proxy.
Its simple, no authentication, and I have access to every single site on 
internet.

In fact, I can do a deploy. I only cannot run the devserver. This is odd...
appcfg.py works like a charm.

I did --host, same error. Just a change saying my server now was on 
0.0.0.0, instead of localhost.

I put some printouts inside python libs.


$ sudo vi /usr/lib/python2.7/urllib2.py

... around line 531

*class HTTPDefaultErrorHandler(BaseHandler):*
*def http_error_default(self, req, fp, code, msg, hdrs):*
*print "---\n"*
*print req.get_full_url()+'\n'*
*print "---\n"*
*raise HTTPError(req.get_full_url(), code, msg, hdrs, fp)*


...

And then...

INFO 2014-05-23 20:44:07,649 sdk_update_checker.py:242] Checking for 
updates to the SDK.
INFO 2014-05-23 20:44:07,978 __init__.py:94] Connecting through tunnel 
to: appengine.google.com:443
INFO 2014-05-23 20:44:09,632 api_server.py:171] Starting API server at: 
http://localhost:32938
INFO 2014-05-23 20:44:09,655 dispatcher.py:182] Starting module 
"default" running at: http://0.0.0.0:8080
INFO 2014-05-23 20:44:09,657 admin_server.py:117] Starting admin server 
at: http://localhost:8000
---

http://localhost:32938/

---

ERROR2014-05-23 20:44:11,737 wsgi.py:278] 
Traceback (most recent call last):
  File "/opt/google_appengine/google/appengine/runtime/wsgi.py", line 267, 
in Handle
for chunk in result:
  File "/opt/google_appengine/google/appengine/ext/appstats/recording.py", 
line 1250, in appstats_wsgi_wrapper
start_recording(environ)
  File "/opt/google_appengine/google/appengine/ext/appstats/recording.py", 
line 1387, in start_recording
time=config.LOCK_TIMEOUT, namespace=config.KEY_NAMESPACE):
  File "/opt/google_appengine/google/appengine/api/memcache/__init__.py", 
line 784, in add
namespace=namespace)
  File "/opt/google_appengine/google/appengine/api/memcache/__init__.py", 
line 869, in _set_with_policy
status_dict = rpc.get_result()
  File "/opt/google_appengine/google/appengine/api/apiproxy_stub_map.py", 
line 612, in get_result
return self.__get_result_hook(self)
  File "/opt/google_appengine/google/appengine/api/memcache/__init__.py", 
line 974, in __set_with_policy_hook
rpc.check_success()
  File "/opt/google_appengine/google/appengine/api/apiproxy_stub_map.py", 
line 578, in check_success
self.__rpc.CheckSuccess()
  File "/opt/google_appengine/google/appengine/api/apiproxy_rpc.py", line 
156, in _WaitImpl
self.request, self.response)
  File 
"/opt/google_appengine/google/appengine/ext/remote_api/remote_api_stub.py", 
line 200, in MakeSyncCall
self._MakeRealSyncCall(service, call, request, response)
  File 
"/opt/google_appengine/google/appengine/ext/remote_api/remote_api_stub.py", 
line 226, in _MakeRealSyncCall
encoded_response = self._server.Send(self._path, encoded_request)
  File "/opt/google_appengine/google/appengine/tools/appengine_rpc.py", 
line 409, in Send
f = self.opener.open(req)
  File "/usr/lib/python2.7/urllib2.py", line 410, in open
response = meth(req, response)
  File "/usr/lib/python2.7/urllib2.py", line 523, in http_response
'http', request, response, code, msg, hdrs)
  File "/usr/lib/python2.7/urllib2.py", line 448, in error
return self._call_chain(*args)
  File "/usr/lib/python2.7/urllib2.py", line 382, in _call_chain
result = func(*args)
  File "/usr/lib/python2.7/urllib2.py", line 534, in http_error_default
raise HTTPError(req.get_full_url(), code, msg, hdrs, fp)
HTTPError: HTTP Error 301: Moved Permanently
---
---


http://localhost:32938/
http://localhost:32938/


---
---


HTTPError()
HTTPError()
Traceback (most recent call last):
  File 
"/opt/google_appengine/lib/cherrypy/cherrypy/wsgiserver/wsgiserver2.py", 
line 1302, in communicate
 
 and so on, like the old one.


Trying to access this URL, however, looks ok.

http://localhost:32938/
{app_id: dev~transito-poa-rs, rtok: '0'}


I believe the problem is somehow the GAE is trying to emulate Google 
environment, inside my company network.

-- 
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+unsubscr...@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.
For more options, visit https://groups.google.com/d/optout.


Re: [google-appengine] dev_appserver.py cannot connect to some HTTP endpoint

2014-05-21 Thread Vinny P
On Tue, May 20, 2014 at 6:35 AM, Marco Lovato  wrote:

> I use this @home with no problem. But @work, I simply cannot run
> dev_appserver.
> It raises an HTTP error 301, and nothing gets processed.
>
> I did the same setup in both places. The only differece is that @work I
> have a proxy, but it is supposed to be well configured. All other stuff is
> working.
>   File "/usr/lib/python2.7/urllib2.py", line 531, in http_error_default
> raise HTTPError(req.get_full_url(), code, msg, hdrs, fp)
> HTTPError: HTTP Error 301: Moved Permanently
>


It's difficult to debug issues involving corporate networks, since every
business's internal network seems to have its own idiosyncrasies.

Where is the error 301 pointing to? Redirection (3xx) status codes usually
have a Location header pointing to the moved to location. Do you see such a
header in your web browser?

Try using the dev appserver's *host* argument (
https://developers.google.com/appengine/docs/python/tools/devserver#Python_Running_the_development_web_server)
and set it to IP
*0.0.0.0*.


-
-Vinny P
Technology & Media Advisor
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 google-appengine+unsubscr...@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.
For more options, visit https://groups.google.com/d/optout.


[google-appengine] dev_appserver.py cannot connect to some HTTP endpoint

2014-05-21 Thread Marco Lovato

I use this @home with no problem. But @work, I simply cannot run 
dev_appserver.
It raises an HTTP error 301, and nothing gets processed.

I did the same setup in both places. The only differece is that @work I 
have a proxy, but it is supposed to be well configured. All other stuff is 
working.

I tried to figure out where the problem should be, with no success. I 
digged all around google, and did not found anything directly related to 
this.

I am using a sample 
from https://github.com/kamalgill/flask-appengine-template
I tried default GAE example too, same problem.

INFO 2014-05-20 11:31:58,949 sdk_update_checker.py:242] Checking for 
updates to the SDK.
INFO 2014-05-20 11:31:59,281 __init__.py:94] Connecting through tunnel 
to: appengine.google.com:443
INFO 2014-05-20 11:32:00,932 sdk_update_checker.py:270] The SDK is up 
to date.
INFO 2014-05-20 11:32:00,965 api_server.py:171] Starting API server at: 
http://localhost:52410
INFO 2014-05-20 11:32:01,000 dispatcher.py:182] Starting module 
"default" running at: http://localhost:8080
INFO 2014-05-20 11:32:01,004 admin_server.py:117] Starting admin server 
at: http://localhost:8000
ERROR2014-05-20 11:32:03,180 wsgi.py:278] 
Traceback (most recent call last):
  File "/opt/google_appengine/google/appengine/runtime/wsgi.py", line 267, 
in Handle
for chunk in result:
  File "/opt/google_appengine/google/appengine/ext/appstats/recording.py", 
line 1250, in appstats_wsgi_wrapper
start_recording(environ)
  File "/opt/google_appengine/google/appengine/ext/appstats/recording.py", 
line 1387, in start_recording
time=config.LOCK_TIMEOUT, namespace=config.KEY_NAMESPACE):
  File "/opt/google_appengine/google/appengine/api/memcache/__init__.py", 
line 784, in add
namespace=namespace)
  File "/opt/google_appengine/google/appengine/api/memcache/__init__.py", 
line 869, in _set_with_policy
status_dict = rpc.get_result()
  File "/opt/google_appengine/google/appengine/api/apiproxy_stub_map.py", 
line 612, in get_result
return self.__get_result_hook(self)
  File "/opt/google_appengine/google/appengine/api/memcache/__init__.py", 
line 974, in __set_with_policy_hook
rpc.check_success()
  File "/opt/google_appengine/google/appengine/api/apiproxy_stub_map.py", 
line 578, in check_success
self.__rpc.CheckSuccess()
  File "/opt/google_appengine/google/appengine/api/apiproxy_rpc.py", line 
156, in _WaitImpl
self.request, self.response)
  File 
"/opt/google_appengine/google/appengine/ext/remote_api/remote_api_stub.py", 
line 200, in MakeSyncCall
self._MakeRealSyncCall(service, call, request, response)
  File 
"/opt/google_appengine/google/appengine/ext/remote_api/remote_api_stub.py", 
line 226, in _MakeRealSyncCall
encoded_response = self._server.Send(self._path, encoded_request)
  File "/opt/google_appengine/google/appengine/tools/appengine_rpc.py", 
line 409, in Send
f = self.opener.open(req)
  File "/usr/lib/python2.7/urllib2.py", line 410, in open
response = meth(req, response)
  File "/usr/lib/python2.7/urllib2.py", line 523, in http_response
'http', request, response, code, msg, hdrs)
  File "/usr/lib/python2.7/urllib2.py", line 448, in error
return self._call_chain(*args)
  File "/usr/lib/python2.7/urllib2.py", line 382, in _call_chain
result = func(*args)
  File "/usr/lib/python2.7/urllib2.py", line 531, in http_error_default
raise HTTPError(req.get_full_url(), code, msg, hdrs, fp)
HTTPError: HTTP Error 301: Moved Permanently
HTTPError()
HTTPError()
Traceback (most recent call last):
  File 
"/opt/google_appengine/lib/cherrypy/cherrypy/wsgiserver/wsgiserver2.py", 
line 1302, in communicate
req.respond()
  File 
"/opt/google_appengine/lib/cherrypy/cherrypy/wsgiserver/wsgiserver2.py", 
line 831, in respond
self.server.gateway(self).respond()
  File 
"/opt/google_appengine/lib/cherrypy/cherrypy/wsgiserver/wsgiserver2.py", 
line 2115, in respond
response = self.req.server.wsgi_app(self.env, self.start_response)
  File 
"/opt/google_appengine/google/appengine/tools/devappserver2/wsgi_server.py", 
line 269, in __call__
return app(environ, start_response)
  File 
"/opt/google_appengine/google/appengine/tools/devappserver2/request_rewriter.py",
 
line 311, in _rewriter_middleware
response_body = iter(application(environ, wrapped_start_response))
  File 
"/opt/google_appengine/google/appengine/tools/devappserver2/python/request_handler.py",
 
line 149, in __call__
self._flush_logs(response.get('logs', []))
  File 
"/opt/google_appengine/google/appengine/tools/devappserver2/python/request_handler.py",
 
line 264, in _flush_logs
apiproxy_stub_map.MakeSyncCall('logservice', 'Flush', request, response)
  File "/opt/google_appengine/google/appengine/api/apiproxy_stub_map.py", 
line 94, in MakeSyncCall
return stubmap.MakeSyncCall(service, call, request, response)
  File "/opt/google_appengine/google/appengine/api/apiproxy_stub_map.py", 
line 328, in MakeSyncCal