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

SSL fatal error when connection to gcloud pubsub emulator #348

Closed
rabanian opened this issue Mar 25, 2021 · 4 comments
Closed

SSL fatal error when connection to gcloud pubsub emulator #348

rabanian opened this issue Mar 25, 2021 · 4 comments
Labels
api: pubsub Issues related to the googleapis/python-pubsub API. priority: p2 Moderately-important priority. Fix may not be included in next release. type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns.

Comments

@rabanian
Copy link

rabanian commented Mar 25, 2021

Environment details

  • OS type and version: MacOS BigSur 11.2.3
  • Python version: Python 3.8.2, 3.8.8, 3.9.2
  • pip version: 21.0.1
  • google-cloud-pubsub version: 2.3.0

Steps to reproduce

  1. Install gcloud sdk.
  2. Run gcloud beta emulators pubsub start.
  3. Try to create a topic using supplied code.

Code example

    from google.cloud import pubsub_v1

    # project_id = "your-project-id"
    # topic_id = "your-topic-id"

    publisher = pubsub_v1.PublisherClient()
    topic_path = publisher.topic_path(project_id, topic_id)
    
    topic = publisher.create_topic(request={"name": topic_path})
    
    print("Created topic: {}".format(topic.name))

Stack trace

Client:

E0325 13:22:34.292382000 4347792896 ssl_transport_security.cc:1455]    Handshake failed with fatal error SSL_ERROR_SSL: error:100000f7:SSL routines:OPENSSL_internal:WRONG_VERSION_NUMBER.

PubSub Emulator:

[pubsub] This is the Google Pub/Sub fake.
[pubsub] Implementation may be incomplete or differ from the real system.
[pubsub] Mar 25, 2021 1:23:30 PM com.google.cloud.pubsub.testing.v1.Main main
[pubsub] INFO: IAM integration is disabled. IAM policy methods and ACL checks are not supported
[pubsub] SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".
[pubsub] SLF4J: Defaulting to no-operation (NOP) logger implementation
[pubsub] SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details.
[pubsub] Mar 25, 2021 1:23:31 PM com.google.cloud.pubsub.testing.v1.Main main
[pubsub] INFO: Server started, listening on 8753
[pubsub] Mar 25, 2021 1:23:41 PM io.gapi.emulators.netty.HttpVersionRoutingHandler channelRead
[pubsub] INFO: Detected non-HTTP/2 connection.
[pubsub] Mar 25, 2021 1:23:41 PM io.gapi.emulators.netty.NotFoundHandler handleRequest
[pubsub] INFO: Unknown request URI: /bad-request
[pubsub] Mar 25, 2021 1:23:42 PM io.gapi.emulators.netty.HttpVersionRoutingHandler channelRead
[pubsub] INFO: Detected non-HTTP/2 connection.
[pubsub] Mar 25, 2021 1:23:42 PM io.gapi.emulators.netty.NotFoundHandler handleRequest
[pubsub] INFO: Unknown request URI: /bad-request
[pubsub] Mar 25, 2021 1:23:44 PM io.gapi.emulators.netty.HttpVersionRoutingHandler channelRead
[pubsub] INFO: Detected non-HTTP/2 connection.
[pubsub] Mar 25, 2021 1:23:44 PM io.gapi.emulators.netty.NotFoundHandler handleRequest
[pubsub] INFO: Unknown request URI: /bad-request

I'm running on a fresh installation of MacOS BigSur, using pyenv to install python.

@product-auto-label product-auto-label bot added the api: pubsub Issues related to the googleapis/python-pubsub API. label Mar 25, 2021
@OlafMeuwese
Copy link

OlafMeuwese commented Mar 25, 2021

I have a very similar experience. I'm also not able to connect to the pubsub emulator on my mac using a similar basic setup.

In addition, the fact you have to use publisher.create_topic(request={"name": topic_path}) instead of publisher.create(topic_path), which is provided in the examples and documentation, seems like there is something off.
Created new issue -> #349

@OlafMeuwese
Copy link

OlafMeuwese commented Mar 25, 2021

I see this issue is a duplication of: Issue #290 and #325.
This should be fixed with pull-request #297.
However, 2.4.0 doesn't seemed to be published to pypi yet. -> 2.4.0 is yanked from pypi. I don't know why.
Edit 2: When I installed the specific version it gave the reason for yanking: Reason for being yanked: This release broke google-cloud-pubsublite. Specifically, the optional wait for callbacks to finish when cancelling a streaming pull future is unexpected by Pub/Sub Lite.
Edit 3: When installing 2.4.0, it also didn't work. Downgrading to 2.2.0 did work

@meredithslota meredithslota added priority: p2 Moderately-important priority. Fix may not be included in next release. type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns. labels Mar 25, 2021
@plamut
Copy link
Contributor

plamut commented Apr 1, 2021

@OlafMeuwese The issue should have been fixed with v2.4.1, can you give it a try?

It's a release similar to v2.4.0, but without breaking the PubSub Lite client, and includes a few additional fixes, such as this emulator error.

If it doesn't work for some reason, please let us know to investigate further, thanks!

@plamut
Copy link
Contributor

plamut commented Apr 30, 2021

This should have been fixed in v2.4.1, and there have been no reports claiming the opposite.

I'll close this, but if anyone still experiences the issue in v2.4.1+, please post a comment here and we'll take another look.

@plamut plamut closed this as completed Apr 30, 2021
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. priority: p2 Moderately-important priority. Fix may not be included in next release. type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns.
Projects
None yet
Development

No branches or pull requests

4 participants