yejunzhou / typhoonae

Automatically exported from code.google.com/p/typhoonae
0 stars 0 forks source link

authentication fail when uploading data (or app) #90

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
phil@phil-laptop:~/typhoonae-buildout-0.2.0$ python 
parts/google_appengine/appcfg.py upload_data --application=translation-api-dev 
--insecure --server=127.0.0.1 
--filename='/home/phil/typhoonae-buildout-0.2.0/downloads/dump-dev.data' 
'/home/phil/typhoonae-buildout-0.2.0/parts/HubApplicationDev'

parts/google_appengine/appcfg.py:42: DeprecationWarning: the sha module is 
deprecated; use the hashlib module instead
  os.path.join(DIR_PATH, 'lib', 'django'),
/home/phil/typhoonae-buildout-0.2.0/parts/google_appengine/google/appengine/tool
s/dev_appserver_login.py:33: DeprecationWarning: the md5 module is deprecated; 
use hashlib instead
  import md5
Application: translation-api-dev; version: 4.
Uploading data records.
[INFO    ] Logging to bulkloader-log-20111122.150126
[INFO    ] Throttling transfers:
[INFO    ] Bandwidth: 250000 bytes/second
[INFO    ] HTTP connections: 8/second
[INFO    ] Entities inserted/fetched/modified: 20/second
[INFO    ] Batch Size: 10
[INFO    ] Opening database: bulkloader-progress-20111122.150126.sql3
[INFO    ] Connecting to 127.0.0.1/remote_api
[ERROR   ] Exception during authentication
Traceback (most recent call last):
  File "/home/phil/typhoonae-buildout-0.2.0/parts/google_appengine/google/appengine/tools/bulkloader.py", line 3175, in Run
    self.request_manager.Authenticate()
  File "/home/phil/typhoonae-buildout-0.2.0/parts/google_appengine/google/appengine/tools/bulkloader.py", line 1187, in Authenticate
    remote_api_stub.MaybeInvokeAuthentication()
  File "/home/phil/typhoonae-buildout-0.2.0/parts/google_appengine/google/appengine/ext/remote_api/remote_api_stub.py", line 540, in MaybeInvokeAuthentication
    datastore_stub._server.Send(datastore_stub._path, payload=None)
  File "/home/phil/typhoonae-buildout-0.2.0/parts/google_appengine/google/appengine/tools/appengine_rpc.py", line 341, in Send
    f = self.opener.open(req)
  File "/usr/lib/python2.6/urllib2.py", line 391, in open
    response = self._open(req, data)
  File "/usr/lib/python2.6/urllib2.py", line 409, in _open
    '_open', req)
  File "/usr/lib/python2.6/urllib2.py", line 369, in _call_chain
    result = func(*args)
  File "/usr/lib/python2.6/urllib2.py", line 1161, in http_open
    return self.do_open(httplib.HTTPConnection, req)
  File "/usr/lib/python2.6/urllib2.py", line 1136, in do_open
    raise URLError(err)
URLError: <urlopen error [Errno 111] Connection refused>
[INFO    ] Authentication Failed

I'm sometimes asked for an email. I give my usual gmail un and pw. they fail. 
tried admin, admin, also fails. Sure I'm being dumb, but help would be much 
appreciated.

Original issue reported on code.google.com by phil.a.t...@gmail.com on 22 Nov 2011 at 3:26

GoogleCodeExporter commented 9 years ago
Have you already tried '--server=localhost' instead? Last time I successfully 
tried uploading data to the Datastore, I used the following command line:

$ bin/appcfg upload_data --config_file=src/demo/note_loader.py 
--filename=src/demo/notes.csv --kind=Note 
--url=http://localhost:8080/remote_api parts/demo/

Original comment by tobias.r...@gmail.com on 23 Nov 2011 at 4:45

GoogleCodeExporter commented 9 years ago
I got it working with bulkloader. Which appears to have worked I think.

I have a new issue now with 500 errors which turn up as sytax errors in the 
python in the applications log. 

Still looking into it.

But bulkloader.py seems to have transfered to total data dump I pulled from GAE.

Original comment by phil.a.t...@gmail.com on 23 Nov 2011 at 8:01

GoogleCodeExporter commented 9 years ago
ok another noob question. How do I get the debug info to print to page not log? 
I've tried setting app's conf to not redirect stderr. But it still doesn't 
print to the web page. refreshing the contents of an editor, and scrolling to 
the bottom of an ever growing log is driving me crazy  :)

Original comment by phil.a.t...@gmail.com on 25 Nov 2011 at 11:44

GoogleCodeExporter commented 9 years ago
Have you tried running bin/apptool with the --develop option? It disables our 
handler cache and forwards most tracebacks to the browser.

Original comment by tobias.r...@gmail.com on 25 Nov 2011 at 6:23

GoogleCodeExporter commented 9 years ago
My commands on the prebuilt VM doesn't seem to work :(

Any ideas?

typhoonae@dev-typhoonae:~/google_appengine$ sudo python bulkloader.py --restore 
--app_id=translation-api-dev --url=http://localhost:8080/remote_api 
--kind=LWpairs --filename="/home/typhoonae/google_appengine/dump-dev3.data"
/home/typhoonae/google_appengine/google/appengine/ext/remote_api/remote_api_stub
.py:64: DeprecationWarning: the sha module is deprecated; use the hashlib 
module instead
  import sha
/home/typhoonae/google_appengine/google/appengine/tools/dev_appserver_login.py:3
3: DeprecationWarning: the md5 module is deprecated; use hashlib instead
  import md5
--app_id is deprecated, please use --application.
[INFO    ] Logging to bulkloader-log-20120131.022523
[INFO    ] Throttling transfers:
[INFO    ] Bandwidth: 250000 bytes/second
[INFO    ] HTTP connections: 8/second
[INFO    ] Entities inserted/fetched/modified: 20/second
[INFO    ] Batch Size: 10
[INFO    ] Opening database: bulkloader-progress-20120131.022523.sql3
Please enter login credentials for localhost
Email: typhoonae
Password for typhoonae: 
[INFO    ] Connecting to localhost:8080/remote_api
[ERROR   ] Exception during authentication
Traceback (most recent call last):
  File "/home/typhoonae/google_appengine/google/appengine/tools/bulkloader.py", line 3175, in Run
    self.request_manager.Authenticate()
  File "/home/typhoonae/google_appengine/google/appengine/tools/bulkloader.py", line 1187, in Authenticate
    remote_api_stub.MaybeInvokeAuthentication()
  File "/home/typhoonae/google_appengine/google/appengine/ext/remote_api/remote_api_stub.py", line 540, in MaybeInvokeAuthentication
    datastore_stub._server.Send(datastore_stub._path, payload=None)
  File "/home/typhoonae/google_appengine/google/appengine/tools/appengine_rpc.py", line 341, in Send
    f = self.opener.open(req)
  File "/usr/lib/python2.6/urllib2.py", line 397, in open
    response = meth(req, response)
  File "/usr/lib/python2.6/urllib2.py", line 510, in http_response
    'http', request, response, code, msg, hdrs)
  File "/usr/lib/python2.6/urllib2.py", line 435, in error
    return self._call_chain(*args)
  File "/usr/lib/python2.6/urllib2.py", line 369, in _call_chain
    result = func(*args)
  File "/usr/lib/python2.6/urllib2.py", line 518, in http_error_default
    raise HTTPError(req.get_full_url(), code, msg, hdrs, fp)
HTTPError: HTTP Error 404: Not Found
[INFO    ] Authentication Failed

Original comment by p...@evolu8.com on 31 Jan 2012 at 6:22