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

fix: SSL error when using the client with the emulator #297

Merged
merged 2 commits into from Mar 2, 2021

Conversation

@plamut
Copy link
Contributor

@plamut plamut commented Feb 24, 2021

Fixes #290.

This PR makes sure that insecure gRPC channel is used when running against the emulator. To verify the fix, run the code example as described in the issue description.

The PR also includes a lot of unrelated synth changes in the second commit, but that's because #258 and #267 could not be merged yet, the CLA status is stuck. If this PR is merged, we could even close the other two.

PR checklist:

  • Make sure to open an issue as a bug/issue before writing your code! That way we can discuss the change, evaluate designs, and agree on the general idea
  • Ensure the tests and linter pass
  • Code coverage does not decrease (if any source code was changed)
  • Appropriate docs were updated (if necessary)
@plamut plamut requested review from as code owners Feb 24, 2021
@google-cla google-cla bot added the cla: yes label Feb 24, 2021
@plamut plamut changed the title Fix SSL error when using the client with the emulator fix: SSL error when using the client with the emulator Feb 24, 2021
@anguillanneuf anguillanneuf self-requested a review Feb 26, 2021
Copy link
Contributor

@anguillanneuf anguillanneuf left a comment

I'm not sure what's wrong, but when trying your code against the emulator, I still got errors:

E0226 11:38:32.777295000 4749241856 ssl_transport_security.cc:1439]    Handshake failed with fatal error SSL_ERROR_SSL: error:100000f7:SSL routines:OPENSSL_internal:WRONG_VERSION_NUMBER.
E0226 11:38:33.843773000 4749241856 ssl_transport_security.cc:1439]    Handshake failed with fatal error SSL_ERROR_SSL: error:100000f7:SSL routines:OPENSSL_internal:WRONG_VERSION_NUMBER.
E0226 11:38:35.286951000 4749241856 ssl_transport_security.cc:1439]    Handshake failed with fatal error SSL_ERROR_SSL: error:100000f7:SSL routines:OPENSSL_internal:WRONG_VERSION_NUMBER.
E0226 11:38:38.925703000 4749241856 ssl_transport_security.cc:1439]    Handshake failed with fatal error SSL_ERROR_SSL: error:100000f7:SSL routines:OPENSSL_internal:WRONG_VERSION_NUMBER.

And the emulator complains about:

[pubsub] INFO: Unknown request URI: /bad-request
[pubsub] Feb 26, 2021 11:39:01 AM io.gapi.emulators.netty.HttpVersionRoutingHandler channelRead
[pubsub] INFO: Detected non-HTTP/2 connection.
[pubsub] Feb 26, 2021 11:39:01 AM io.gapi.emulators.netty.NotFoundHandler handleRequest
[pubsub] INFO: Unknown request URI: /bad-request

My gcloud SDK version is 329.0.0.

Loading

@plamut
Copy link
Contributor Author

@plamut plamut commented Feb 26, 2021

@anguillanneuf Strange, I cannot reproduce this, it works just fine (both with gcloud SDK 327.0.0 and yours 329.0.0).

Can you double check that it's indeed the code from the PR branch that is run and that PUBSUB_EMULATOR_HOST env variable is set? Did you use the exact same script as in the ticket description, or perhaps a different one?

I'm trying to figure out if and where our test setups differ....

Loading

@anguillanneuf anguillanneuf self-requested a review Mar 1, 2021
Copy link
Contributor

@anguillanneuf anguillanneuf left a comment

@plamut Ah I'm so sorry. I created a branch of the name plamut-iss-290 but I never pulled in your code. Your fix is working for me.

Loading

@plamut plamut merged commit 83db672 into googleapis:master Mar 2, 2021
8 checks passed
Loading
@plamut plamut deleted the iss-290 branch Mar 2, 2021
globophobe added a commit to globophobe/cryptofeed that referenced this issue Mar 10, 2021
Fixed breaking changes introduced by gcloud-aio dependency.

Note: Pinned google_cloud_pubsub~=2.2.0 in setup.py because of an SSL issue in the Pub/Sumb emulator.
google_cloud_pubsub fix is merged, but not on pypi: googleapis/python-pubsub#297
globophobe added a commit to globophobe/cryptofeed that referenced this issue Mar 10, 2021
Fixed breaking changes introduced by gcloud-aio dependency.

Closes bmoscon#433

Note: Pinned google_cloud_pubsub~=2.2.0 in setup.py because of an SSL issue in the Pub/Sumb emulator.
google_cloud_pubsub fix is merged, but not on pypi: googleapis/python-pubsub#297
globophobe added a commit to globophobe/cryptofeed that referenced this issue Mar 10, 2021
Fixed breaking changes introduced by gcloud-aio dependency.

Closes bmoscon#433

Note: Pinned google_cloud_pubsub~=2.2.0 in setup.py because of an SSL issue in the Pub/Sumb emulator.
google_cloud_pubsub fix is merged, but not on pypi: googleapis/python-pubsub#297
bmoscon pushed a commit to bmoscon/cryptofeed that referenced this issue Mar 10, 2021
Fixed breaking changes introduced by gcloud-aio dependency.

Closes #433

Note: Pinned google_cloud_pubsub~=2.2.0 in setup.py because of an SSL issue in the Pub/Sumb emulator.
google_cloud_pubsub fix is merged, but not on pypi: googleapis/python-pubsub#297
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

2 participants