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

Run example on "Testing apps locally with the emulator documentation" throws OPENSSL_internal:WRONG_VERSION_NUMBER exception #325

Closed
h0ngcha0 opened this issue Mar 12, 2021 · 1 comment
Labels
api: pubsub Issues related to the googleapis/python-pubsub API. type: question Request for information or clarification. Not an issue.

Comments

@h0ngcha0
Copy link

Following the python example in the official documentation, and got the following exceptions

Handshake failed with fatal error SSL_ERROR_SSL: error:100000f7:SSL routines:OPENSSL_internal:WRONG_VERSION_NUMBER.

Environment details

  • OS type and version: Linux 5.4.100-1-MANJARO
  • Python version: 3.9.1
  • pip version: 20.3.1
  • google-cloud-pubsub version: 2.4.0

Steps to reproduce

Follow the exact same steps as described in
https://cloud.google.com/pubsub/docs/emulator#using_the_emulator

  1. gcloud beta emulators pubsub start
  2. In another console, run $(gcloud beta emulators pubsub env-init)
  3. under samples/snippets, run pip install -r requirements.txt
  4. Run python publisher.py my-project-id create my-topic

On the client side it gives:

$ python publisher.py my-project-id create istio-sidecar-job-user-events-topic
E0312 07:46:45.555939390   89994 ssl_transport_security.cc:1455] Handshake failed with fatal error SSL_ERROR_SSL: error:100000f7:SSL routines:OPENSSL_internal:WRONG_VERSION_NUMBER.
E0312 07:46:46.640805601   89994 ssl_transport_security.cc:1455] Handshake failed with fatal error SSL_ERROR_SSL: error:100000f7:SSL routines:OPENSSL_internal:WRONG_VERSION_NUMBER.
E0312 07:46:48.164785007   89994 ssl_transport_security.cc:1455] Handshake failed with fatal error SSL_ERROR_SSL: error:100000f7:SSL routines:OPENSSL_internal:WRONG_VERSION_NUMBER.

On the emulator side it gives:

[pubsub] Mar 12, 2021 7:47:26 AM io.gapi.emulators.netty.HttpVersionRoutingHandler channelRead
[pubsub] INFO: Detected non-HTTP/2 connection.
[pubsub] Mar 12, 2021 7:47:26 AM io.gapi.emulators.netty.NotFoundHandler handleRequest
[pubsub] INFO: Unknown request URI: /bad-request
[pubsub] Mar 12, 2021 7:47:27 AM io.gapi.emulators.netty.HttpVersionRoutingHandler channelRead
[pubsub] INFO: Detected non-HTTP/2 connection.
[pubsub] Mar 12, 2021 7:47:27 AM io.gapi.emulators.netty.NotFoundHandler handleRequest
[pubsub] INFO: Unknown request URI: /bad-request
[pubsub] Mar 12, 2021 7:47:29 AM io.gapi.emulators.netty.HttpVersionRoutingHandler channelRead
[pubsub] INFO: Detected non-HTTP/2 connection.
[pubsub] Mar 12, 2021 7:47:29 AM io.gapi.emulators.netty.NotFoundHandler handleRequest
[pubsub] INFO: Unknown request URI: /bad-request
[pubsub] Mar 12, 2021 7:47:32 AM io.gapi.emulators.netty.HttpVersionRoutingHandler channelRead
[pubsub] INFO: Detected non-HTTP/2 connection.
@product-auto-label product-auto-label bot added the api: pubsub Issues related to the googleapis/python-pubsub API. label Mar 12, 2021
@plamut plamut added the type: question Request for information or clarification. Not an issue. label Mar 12, 2021
@plamut
Copy link
Contributor

plamut commented Mar 12, 2021

@liuhongchao Thanks for the report.

The issue is a duplicate of #290, which has been fixed in #297, but the fix has not been released yet. It is possible, though, that a new release will be made some time next week.

A temporary workaround can be to downgrade the library to google-cloud-pubsub~=2.2.0, or install the current development version.

I'm closing this, but feel free to come back if you need any more info.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api: pubsub Issues related to the googleapis/python-pubsub API. type: question Request for information or clarification. Not an issue.
Projects
None yet
Development

No branches or pull requests

2 participants