Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Flood of errors in console when running Datastore sample against local Datastore emulator #24

Closed
MaxRossGoogle opened this issue Apr 5, 2016 · 11 comments
Labels
🚨 This issue needs some love. triage me I really want to be triaged.

Comments

@MaxRossGoogle
Copy link
Contributor

I followed the instructions for the Cloud Datastore getting started guide with Go:
https://cloud.google.com/datastore/docs/datastore-api-tutorial

Then I followed the instructions to run the local Datastore emulator:
https://cloud.google.com/datastore/docs/tools/datastore-emulator

Then I restarted my app:
go run tasks.go

The output looks like this (with the connection reset message just continuing indefinitely):
Cloud Datastore Task List

Usage:

new Adds a task with a description
done Marks a task as done
list Lists all tasks by creation time
delete Deletes a task

2016/04/04 21:56:30 transport: http2Client.notifyError got notified that the client transport was broken read tcp 127.0.0.1:51418->127.0.0.1:8687: read: connection reset by peer.
2016/04/04 21:56:30 transport: http2Client.notifyError got notified that the client transport was broken read tcp 127.0.0.1:51419->127.0.0.1:8687: read: connection reset by peer.
2016/04/04 21:56:30 transport: http2Client.notifyError got notified that the client transport was broken read tcp 127.0.0.1:51420->127.0.0.1:8687: read: connection reset by peer.

@MaxRossGoogle
Copy link
Contributor Author

Forgot to mention:
This is on OS X 10.11.4

@broady
Copy link
Contributor

broady commented Apr 5, 2016

I can't reproduce this, but I'm trying from Linux.

Are you using the latest version of the datastore emulator?

Also, there was a recent update to the google.golang.org/cloud/datastore package to use the new datastore/v1beta3 API.

Ensure you are fully up to date:
go get -u google.golang.org/cloud/datastore

@broady
Copy link
Contributor

broady commented Apr 5, 2016

It sounds like the emulator isn't really running on that port. Does port 8687 match the output from gcloud beta emulators datastore start?

@MaxRossGoogle
Copy link
Contributor Author

Thanks for the response.

I installed everything fresh last night, after the v1beta3 announcement. I believe the emulator is working correctly because I can go through the getting started guide for other languages and those apps connect successfully.

@broady
Copy link
Contributor

broady commented Apr 6, 2016

OK, I can reproduce this on Mac OS. Will file a bug with the emulator team.

@broady
Copy link
Contributor

broady commented Apr 6, 2016

Ah, I can also reproduce on Linux. I must have misconfigured my Linux box yesterday.

This is because the datastore emulator doesn't support gRPC yet.

@broady broady closed this as completed Apr 6, 2016
@MaxRossGoogle
Copy link
Contributor Author

That would certainly explain it. Can't the Go app connect via json/http rather than gRPC? Presumably that's what the Datastore samples for python, java, and node all do.

@broady
Copy link
Contributor

broady commented Apr 6, 2016

It could, but this sample uses the google.golang.org/cloud/datastore library, which uses gRPC.

It wouldn't be worth changing the underlying transport. It'd be best to get the emulator working with gRPC!

It's strange that the emulator exposes the environment variables that are specifically for gRPC (DATASTORE_EMULATOR_HOST rather than DATASTORE_HOST, which was for HTTP/1.1)

@MaxRossGoogle
Copy link
Contributor Author

I have no sense of how much work is involved here, but I bet @pcostell knows.

@broady
Copy link
Contributor

broady commented Apr 6, 2016

Ah, yes. I followed up with Patrick. He's working on it.
On Apr 6, 2016 11:40 AM, "MaxRossGoogle" notifications@github.com wrote:

I have no sense of how much work is involved here, but I bet @pcostell
https://github.com/pcostell knows.


You are receiving this because you modified the open/close state.
Reply to this email directly or view it on GitHub
#24 (comment)

@pcostell
Copy link

pcostell commented Apr 6, 2016

Hey all --

There is a gRPC emulator available!

It has the same command line options as the normal gcd.sh tool, but isn't yet built into the gcloud tool. For now it only works with v1beta3 over gRPC, which is why we can't just swap it in for the old emulator, which supports both v1beta2 and v1beta3, but only using proto-over-HTTP.

@yoshi-automation yoshi-automation added 🚨 This issue needs some love. triage me I really want to be triaged. labels Apr 6, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🚨 This issue needs some love. triage me I really want to be triaged.
Projects
None yet
Development

No branches or pull requests

4 participants