Repository navigation
App Engine dev tries and fails to reach Datastore #233
Description
Activity
I will return back to issue when I get back to the office tomorrow, likely that I can peer with @rrch to discover the missing parts.
@silvolu was able to figure out which hostname we should use, should update the issue.
Yeah sorry, hostname is ok, but the port should be read from
process.env.GAE_SERVER_PORT.
I'm having problems writing to the datastore though, still investigating.I'm not sure if we should skip the Authorization header if mock server runs on localhost:8080. I haven't read their code, but could be a possibility.
I started using the correct port, GAE_SERVER_PORT.
When I run
GET /api/users, which uses gcloud to runPOST /datastore/v1beta2/datasets/nth-circlet-705/runQuery, this is what the gcloud console shows:... DEBUG: Dispatching request to <Instance 0: 1/1, total: 3> after 9.9938s pending DEBUG: Dispatching request to <Instance 0: 1/1, total: 3> after 9.9940s pending DEBUG: Dispatching request to <Instance 0: 1/1, total: 3> after 9.9941s pending DEBUG: Dispatching request to <Instance 0: 1/1, total: 3> after 9.9943s pending DEBUG: Dispatching request to <Instance 0: 1/1, total: 3> after 9.9944s pending DEBUG: Dispatching request to <Instance 0: 1/1, total: 3> after 9.9945s pending DEBUG: Dispatching request to <Instance 0: 1/1, total: 3> after 9.9946s pending DEBUG: Dispatching request to <Instance 0: 1/1, total: 3> after 9.9947s pending DEBUG: Dispatching request to <Instance 0: 1/1, total: 3> after 9.9948s pending DEBUG: Dispatching request to <Instance 0: 1/1, total: 3> after 9.9949s pending DEBUG: Dispatching request to <Instance 0: 1/1, total: 3> after 9.9950s pending DEBUG: Dispatching request to <Instance 0: 1/1, total: 3> after 9.9951s pending DEBUG: Dispatching request to <Instance 0: 1/1, total: 3> after 9.9951s pending DEBUG: Dispatching request to <Instance 0: 1/1, total: 3> after 9.9952s pending DEBUG: Dispatching request to <Instance 0: 1/1, total: 3> after 9.9953s pending DEBUG: Dispatching request to <Instance 0: 1/1, total: 3> after 9.9954s pending DEBUG: Dispatching request to <Instance 0: 1/1, total: 3> after 9.9955s pending INFO: sillycloud: "POST /datastore/v1beta2/datasets/nth-circlet-705/runQuery HTTP/1.1" 503 - DEBUG: Request handled by <Instance 0: 1/1, total: 3> in 10.0251s INFO: sillycloud: "GET /api/users HTTP/1.1" 200 9When I try to add a user (
POST /api/userswhich makes aPOST /datastore/v1beta2/datasets/nth-circlet-705/commit), it has similar output:... DEBUG: Dispatching request to <Instance 0: 1/1, total: 4> after 9.9981s pending DEBUG: Dispatching request to <Instance 0: 1/1, total: 4> after 9.9982s pending DEBUG: Dispatching request to <Instance 0: 1/1, total: 4> after 9.9983s pending DEBUG: Dispatching request to <Instance 0: 1/1, total: 4> after 9.9984s pending DEBUG: Dispatching request to <Instance 0: 1/1, total: 4> after 9.9985s pending DEBUG: Dispatching request to <Instance 0: 1/1, total: 4> after 9.9986s pending DEBUG: Dispatching request to <Instance 0: 1/1, total: 4> after 9.9987s pending DEBUG: Dispatching request to <Instance 0: 1/1, total: 4> after 9.9989s pending DEBUG: Dispatching request to <Instance 0: 1/1, total: 4> after 9.9990s pending DEBUG: Dispatching request to <Instance 0: 1/1, total: 4> after 9.9991s pending DEBUG: Dispatching request to <Instance 0: 1/1, total: 4> after 9.9992s pending DEBUG: Dispatching request to <Instance 0: 1/1, total: 4> after 9.9993s pending DEBUG: Dispatching request to <Instance 0: 1/1, total: 4> after 9.9994s pending DEBUG: Dispatching request to <Instance 0: 1/1, total: 4> after 9.9995s pending DEBUG: Dispatching request to <Instance 0: 1/1, total: 4> after 9.9996s pending DEBUG: Dispatching request to <Instance 0: 1/1, total: 4> after 9.9997s pending DEBUG: Dispatching request to <Instance 0: 1/1, total: 4> after 9.9998s pending DEBUG: Dispatching request to <Instance 0: 1/1, total: 4> after 9.9999s pending INFO: sillycloud: "POST /datastore/v1beta2/datasets/nth-circlet-705/commit HTTP/1.1" 503 -So, my API requests are tried for 10 seconds, but inevitably timeout and return 503s.
My request header:
POST /datastore/v1beta2/datasets/nth-circlet-705/commit HTTP/1.1 Content-Type: application/x-protobuf User-Agent: gcloud-node/0.4.0 Host: 10.0.2.2:8080 Connection: keep-alive Transfer-Encoding: chunkedstephenplusplus commented
on Dec 12, 2014 ContributorAuthorMore actions2 months later, I'm going to see if anything magically fixed itself. 👍 🔍
- changed the title
[-]App Engine dev throws Python error when trying to access API[/-][+]App Engine dev tries and fails to reach Datastore[/+]on Dec 12, 2014 stephenplusplus commented
on Dec 12, 2014 ContributorAuthorMore actionsNothing magical. Same errors as above. Updated the initial post in this thread with the latest steps to reproduce.
- addedapi: datastoreIssues related to the Datastore API.Issues related to the Datastore API.
on Jan 20, 2015 - addedtype: bugError or flaw in code with unintended results or allowing sub-optimal usage patterns.Error or flaw in code with unintended results or allowing sub-optimal usage patterns.
on Feb 2, 2015 40 remaining items
- added a commit that references this issue
on Jan 29, 2026 - added a commit that references this issue
on Feb 25, 2026 - added a commit that references this issue
on Feb 26, 2026 - added 2 commits that reference this issue
on Mar 9, 2026 - added a commit that references this issue
on Mar 27, 2026 - added a commit that references this issue
on May 5, 2026
Updated 12/12/14
I'm running https://github.com/stephenplusplus/sillycloud/tree/gae with an app.yaml and Dockerfile copied from the appengine quickstart project. I only made small modifications to match my structure.
When I run
gcloud preview app run .I see that my routes are correctly configured. I have a handler for GET requests to /api/users: https://github.com/stephenplusplus/sillycloud/blob/master/actions.js#L10. The first api request,runQuery, is where I start experiencing errors.NOTE: I'm using my branch from #328 to test against
See #233 (comment) for the error I'm experiencing.