Google App Engine remote_api returns 404 using remote_api_shell.py

972 views
Skip to first unread message

Andrew Free

unread,
Sep 6, 2013, 1:12:02 AM9/6/13
to google-a...@googlegroups.com

I'm using googles built in tool for connecting to the remote api so I don't even have info in my client or app.yaml I could change. I have no idea why I suddenly cant connect.

My friend who is also working on the project with me tried on his machine and got the same error. It was working fine for the past couple months. I'm also using the remote_api_shell so it can't be something in my code?

My app.yaml has

builtins:

- remote_api: on


[ rever ~/Documents/buybottmerge/buybott-gae ] remote_api_shell.py -s myappname.appspot.com
Traceback (most recent call last):
  File "/usr/local/bin/remote_api_shell.py", line 171, in <module>
    run_file(__file__, globals())
  File "/usr/local/bin/remote_api_shell.py", line 167, in run_file
    execfile(script_path, globals_)
  File "/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/google/appengine/tools/remote_api_shell.py", line 152, in <module>
    main(sys.argv)
  File "/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/google/appengine/tools/remote_api_shell.py", line 148, in main
    appengine_rpc.HttpRpcServer)
  File "/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/google/appengine/tools/remote_api_shell.py", line 76, in remote_api_shell
    rpc_server_factory=rpc_server_factory)
  File "/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/google/appengine/ext/remote_api/remote_api_stub.py", line 725, in ConfigureRemoteApi
    app_id = GetRemoteAppIdFromServer(server, path, rtok)
  File "/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/google/appengine/ext/remote_api/remote_api_stub.py", line 568, in GetRemoteAppIdFromServer
    response = server.Send(path, payload=None, **urlargs)
  File "/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/google/appengine/tools/appengine_rpc.py", line 393, in Send
    f = self.opener.open(req)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py", line 400, in open
    response = meth(req, response)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py", line 513, in http_response
    'http', request, response, code, msg, hdrs)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py", line 438, in error
    return self._call_chain(*args)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py", line 372, in _call_chain
    result = func(*args)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py", line 521, in http_error_default
    raise HTTPError(req.get_full_url(), code, msg, hdrs, fp)
urllib2.HTTPError: HTTP Error 404: Not Found

I can see the errors on my logs in the dashboard as well. So something is working well enough for it to get that far before failing.

2013-09-05 18:13:35.735 /_ah/remote_api?rtok=569217424211 404 4ms 0kb Google-remote_api/1.0     Darwin/12.4.0 Python/2.7.2.final.0 gzip

50.53.136.79 - - [05/Sep/2013:18:13:35 -0700] "GET /_ah/remote_api?rtok=569217424211   HTTP/1.1" 404 130 - "Google-remote_api/1.0 Darwin/12.4.0 Python/2.7.2.final.0 gzip"   "myappname.appspot.com" ms=4 cpu_ms=0 cpm_usd=0.000015 app_engine_release=1.8.4   instance=00c61b117cbd87090d90186a5635840f196c4d14

Sercan Altundas

unread,
Sep 6, 2013, 3:49:06 AM9/6/13
to google-a...@googlegroups.com
Probably the SDK path is invalid. If so try this.

Open the tool,
Edit --> Preferences --> Appengine SDK: C:\Program Files (x86)\Google\google_appengine

and update your application writing this line in cmd,
appcfg.py update your_apps_path

Andrew Free

unread,
Sep 6, 2013, 3:37:13 PM9/6/13
to google-a...@googlegroups.com
I'm on OS X but the path is correct. Again I'm getting logs on the server side so something is working to a degree. Tried updating/deploying it and still having the same issue. 

Vinny P

unread,
Sep 6, 2013, 7:35:07 PM9/6/13
to google-a...@googlegroups.com
On Fri, Sep 6, 2013 at 12:12 AM, Andrew Free <l0ckd0wn...@gmail.com> wrote:

I'm using googles built in tool for connecting to the remote api so I don't even have info in my client or app.yaml I could change. I have no idea why I suddenly cant connect.

"GET /_ah/remote_api" 404 130 - "Google-remote_api"



It looks like App Engine doesn't have anything mapped to the /_ah/remote_api path. Which is clearly incorrect; the remote_api builtin should be automatically mapping itself to that path. You might want to file a production issue at https://code.google.com/p/googleappengine/issues/list 

With that said, there is something else you can try. See if you can force the mapping to remote api by inserting the following into the handlers section:

- url: /_ah/remote_api
  script: google.appengine.ext.remote_api.handler.application
  login: admin
 
 
-----------------
-Vinny P
Technology & Media Advisor
Chicago, IL

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

Thomas Bohmbach, Jr.

unread,
Oct 18, 2013, 11:03:13 AM10/18/13
to google-a...@googlegroups.com
I know this is a little late, but are you using the git-push-to-deploy feature on your app?

I've found that the "builtins" defined in app.yaml do not work after a push-to-deploy (they return 404s) but doing a normal appcfg update makes them work again.

I experienced these 404 failures after push-deploys with both remote_api and deferred.

Andrew Free

unread,
Nov 18, 2013, 9:43:11 PM11/18/13
to google-a...@googlegroups.com
I use the deploy built into that app engine launcher that comes with the SDK on osx. I don't know if that is the same thing. I read about doing a normal appcfg update to fix this but it doesn't seem to be the problem for me. 

Ying Ding

unread,
Dec 16, 2013, 9:41:12 AM12/16/13
to google-a...@googlegroups.com
I ran into this problem today too. Have you solved your problem?  Hope you can see this and drop a line about your solution. Thank you!

Andrew Free

unread,
Dec 17, 2013, 5:45:07 PM12/17/13
to google-a...@googlegroups.com
Try uploading/deploying your code sometimes it just needs to be pushed to google. I’m not sure how I ended up solving this exactly. I have had lots of issues with the remote API. 


--
You received this message because you are subscribed to a topic in the Google Groups "Google App Engine" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/google-appengine/t7L4URlUr0A/unsubscribe.
To unsubscribe from this group and all its topics, 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.
For more options, visit https://groups.google.com/groups/opt_out.

Reply all
Reply to author
Forward
0 new messages