René's URL Explorer Experiment


Title: Can't reach GCP PubSub Emulator · Issue #825 · googleapis/python-pubsub · GitHub

Open Graph Title: Can't reach GCP PubSub Emulator · Issue #825 · googleapis/python-pubsub

X Title: Can't reach GCP PubSub Emulator · Issue #825 · googleapis/python-pubsub

Description: I have setup the PubSub emulator to run a Python script locally pointing to it. The emulator is run following the tutorial and it seems to be working fine: ➜ gcloud beta emulators pubsub start --project=tokyo-rain-123 --host-port=127.0.0...

Open Graph Description: I have setup the PubSub emulator to run a Python script locally pointing to it. The emulator is run following the tutorial and it seems to be working fine: ➜ gcloud beta emulators pubsub start --pr...

X Description: I have setup the PubSub emulator to run a Python script locally pointing to it. The emulator is run following the tutorial and it seems to be working fine: ➜ gcloud beta emulators pubsub start --pr...

Opengraph URL: https://github.com/googleapis/python-pubsub/issues/825

X: @github

direct link

Domain: github.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Can't reach GCP PubSub Emulator","articleBody":"I have setup the PubSub emulator to run a Python script locally pointing to it.   \r\nThe emulator is run following the tutorial and it seems to be working fine:   \r\n``` \r\n➜ gcloud beta emulators pubsub start --project=tokyo-rain-123 --host-port=127.0.0.1:8085\r\nExecuting: /Users/pabloruiz/Downloads/google-cloud-sdk/platform/pubsub-emulator/bin/cloud-pubsub-emulator --host=127.0.0.1 --port=8085\r\n[pubsub] This is the Google Pub/Sub fake.\r\n[pubsub] Implementation may be incomplete or differ from the real system.\r\n[pubsub] Nov 17, 2022 3:32:04 PM com.google.cloud.pubsub.testing.v1.Main main\r\n[pubsub] INFO: IAM integration is disabled. IAM policy methods and ACL checks are not supported\r\n[pubsub] SLF4J: Failed to load class \"org.slf4j.impl.StaticLoggerBinder\".\r\n[pubsub] SLF4J: Defaulting to no-operation (NOP) logger implementation\r\n[pubsub] SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details.\r\n[pubsub] Nov 17, 2022 3:32:04 PM com.google.cloud.pubsub.testing.v1.Main main\r\n[pubsub] INFO: Server started, listening on 8085\r\n```\r\n\r\n**It is working fine using curl:**\r\n```\r\n➜ curl -X PUT http://localhost:8085/v1/projects/tokyo-rain-123/topics/topic-data1\r\n{\r\n  \"name\": \"projects/tokyo-rain-123/topics/topic-data1\"\r\n}\r\n```\r\nAlthough it is displaying this warning on the emulator:\r\n```\r\n[pubsub] INFO: Server started, listening on 8085\r\n[pubsub] Nov 17, 2022 4:00:57 PM io.gapi.emulators.netty.HttpVersionRoutingHandler channelRead\r\n[pubsub] INFO: Detected non-HTTP/2 connection.\r\n[pubsub] Nov 17, 2022 4:00:57 PM io.gapi.emulators.netty.HttpVersionRoutingHandler channelRead\r\n[pubsub] INFO: Detected HTTP/2 connection.\r\n```\r\n\r\nIf I try it with **the Python client, it just never reaches the server,** since I can't see anything in the logs. This is the Python scripts:\r\n\r\n```\r\nimport logging\r\nimport os\r\nfrom dotenv import load_dotenv\r\nfrom google.cloud import pubsub_v1\r\n\r\nload_dotenv()\r\nlogger = logging.getLogger(__name__)\r\n\r\nHOST, PROJECT_ID = os.environ.get(\"PUBSUB_EMULATOR_HOST\"), os.environ.get(\"PUBSUB_PROJECT_ID\")\r\nprint(f\"Host: {HOST}, Project ID: {PROJECT_ID}\")\r\n\r\npublisher = pubsub_v1.PublisherClient()\r\n\r\ndef list_topics(project_id):\r\n    project_path = f\"projects/{project_id}\"\r\n    all_topics = list(publisher.list_topics(\r\n        request={\"project\": project_path},\r\n        timeout=5\r\n    ))\r\n    print(f\"Found {len(all_topics)}\")\r\n    return all_topics\r\n\r\n\r\nlogger.info(\"Listing topics for project:\")\r\ntopics = list_topics(project_id=PROJECT_ID)\r\nfor topic in topics:\r\n    logger.info(topics)\r\n```\r\n\r\nwhich is just printing the correct env variables, but the client never gets a response for the rpc call. \r\n```\r\nHost: [::1]:8085, Project ID: tokyo-rain-123\r\n```\r\n\r\nAny idea why this is happening ?\r\n\r\nThanks in advance !","author":{"url":"https://github.com/PabloRR100","@type":"Person","name":"PabloRR100"},"datePublished":"2022-11-17T16:25:59.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":1},"url":"https://github.com/825/python-pubsub/issues/825"}

route-pattern/_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format)
route-controllervoltron_issues_fragments
route-actionissue_layout
fetch-noncev2:584a226e-767c-2910-7381-05470bbddfea
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-idE75E:259068:E348E:138C00:6A4D0578
html-safe-nonce08dd675cd92937c3678f5ae4c24aa97fd07a8d8d87ee5d34ab204fac2d999b9d
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJFNzVFOjI1OTA2ODpFMzQ4RToxMzhDMDA6NkE0RDA1NzgiLCJ2aXNpdG9yX2lkIjoiODA0MDIxMDczMDE1NzE0NzUxMiIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9
visitor-hmac7243d32e32f671e5a66dbb7ec9a0b1aa3cb321c8fcf465639c5fec483476cede
hovercard-subject-tagissue:1453630812
github-keyboard-shortcutsrepository,issues,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///voltron/issues_fragments/issue_layout
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/googleapis/python-pubsub/825/issue_layout
twitter:imagehttps://opengraph.githubassets.com/df5e9081fa98996f6987f95c4de10893410eff519cbe957c37039bc1756fdde6/googleapis/python-pubsub/issues/825
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/df5e9081fa98996f6987f95c4de10893410eff519cbe957c37039bc1756fdde6/googleapis/python-pubsub/issues/825
og:image:altI have setup the PubSub emulator to run a Python script locally pointing to it. The emulator is run following the tutorial and it seems to be working fine: ➜ gcloud beta emulators pubsub start --pr...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernamePabloRR100
hostnamegithub.com
expected-hostnamegithub.com
None31e4db13a9e20081f2fac78f441659a6576e582bbb15e153f9c7fb6473aa29f5
turbo-cache-controlno-preview
go-importgithub.com/googleapis/python-pubsub git https://github.com/googleapis/python-pubsub.git
octolytics-dimension-user_id16785467
octolytics-dimension-user_logingoogleapis
octolytics-dimension-repository_id226992581
octolytics-dimension-repository_nwogoogleapis/python-pubsub
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id226992581
octolytics-dimension-repository_network_root_nwogoogleapis/python-pubsub
turbo-body-classeslogged-out env-production page-responsive
disable-turbofalse
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
releasefb70bd3c4b2bec429781b65419e912c66e2d5581
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/googleapis/python-pubsub/issues/825#start-of-content
https://github.com/
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fgoogleapis%2Fpython-pubsub%2Fissues%2F825
GitHub CopilotWrite better code with AIhttps://github.com/features/copilot
GitHub Copilot appDirect agents from issue to mergehttps://github.com/features/ai/github-app
MCP RegistryNewIntegrate external toolshttps://github.com/mcp
ActionsAutomate any workflowhttps://github.com/features/actions
CodespacesInstant dev environmentshttps://github.com/features/codespaces
IssuesPlan and track workhttps://github.com/features/issues
Code ReviewManage code changeshttps://github.com/features/code-review
GitHub Advanced SecurityFind and fix vulnerabilitieshttps://github.com/security/advanced-security
Code securitySecure your code as you buildhttps://github.com/security/advanced-security/code-security
Secret protectionStop leaks before they starthttps://github.com/security/advanced-security/secret-protection
Why GitHubhttps://github.com/why-github
Documentationhttps://docs.github.com
Bloghttps://github.blog
Changeloghttps://github.blog/changelog
Marketplacehttps://github.com/marketplace
View all featureshttps://github.com/features
Enterpriseshttps://github.com/enterprise
Small and medium teamshttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
App Modernizationhttps://github.com/solutions/use-case/app-modernization
DevSecOpshttps://github.com/solutions/use-case/devsecops
DevOpshttps://github.com/solutions/use-case/devops
CI/CDhttps://github.com/solutions/use-case/ci-cd
View all use caseshttps://github.com/solutions/use-case
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
View all industrieshttps://github.com/solutions/industry
View all solutionshttps://github.com/solutions
AIhttps://github.com/resources/articles?topic=ai
Software Developmenthttps://github.com/resources/articles?topic=software-development
DevOpshttps://github.com/resources/articles?topic=devops
Securityhttps://github.com/resources/articles?topic=security
View all topicshttps://github.com/resources/articles
Customer storieshttps://github.com/customer-stories
Events & webinarshttps://github.com/resources/events
Ebooks & reportshttps://github.com/resources/whitepapers
Business insightshttps://github.com/solutions/executive-insights
GitHub Skillshttps://skills.github.com
Documentationhttps://docs.github.com
Customer supporthttps://support.github.com
Community forumhttps://github.com/orgs/community/discussions
Trust centerhttps://github.com/trust-center
Partnershttps://github.com/partners
View all resourceshttps://github.com/resources
GitHub SponsorsFund open source developershttps://github.com/sponsors
Security Labhttps://securitylab.github.com
Maintainer Communityhttps://maintainers.github.com
Acceleratorhttps://github.com/accelerator
GitHub Starshttps://stars.github.com
Archive Programhttps://archiveprogram.github.com
Topicshttps://github.com/topics
Trendinghttps://github.com/trending
Collectionshttps://github.com/collections
Enterprise platformAI-powered developer platformhttps://github.com/enterprise
GitHub Advanced SecurityEnterprise-grade security featureshttps://github.com/security/advanced-security
Copilot for BusinessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/premium-support
Pricinghttps://github.com/pricing
Search syntax tipshttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
documentationhttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fgoogleapis%2Fpython-pubsub%2Fissues%2F825
Sign up https://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fvoltron%2Fissues_fragments%2Fissue_layout&source=header-repo&source_repo=googleapis%2Fpython-pubsub
Reloadhttps://github.com/googleapis/python-pubsub/issues/825
Reloadhttps://github.com/googleapis/python-pubsub/issues/825
Reloadhttps://github.com/googleapis/python-pubsub/issues/825
Please reload this pagehttps://github.com/googleapis/python-pubsub/issues/825
googleapis https://github.com/googleapis
python-pubsubhttps://github.com/googleapis/python-pubsub
Notifications https://github.com/login?return_to=%2Fgoogleapis%2Fpython-pubsub
Fork 214 https://github.com/login?return_to=%2Fgoogleapis%2Fpython-pubsub
Star 430 https://github.com/login?return_to=%2Fgoogleapis%2Fpython-pubsub
Code https://github.com/googleapis/python-pubsub
Issues 0 https://github.com/googleapis/python-pubsub/issues
Pull requests 0 https://github.com/googleapis/python-pubsub/pulls
Actions https://github.com/googleapis/python-pubsub/actions
Projects https://github.com/googleapis/python-pubsub/projects
Security and quality 0 https://github.com/googleapis/python-pubsub/security
Insights https://github.com/googleapis/python-pubsub/pulse
Code https://github.com/googleapis/python-pubsub
Issues https://github.com/googleapis/python-pubsub/issues
Pull requests https://github.com/googleapis/python-pubsub/pulls
Actions https://github.com/googleapis/python-pubsub/actions
Projects https://github.com/googleapis/python-pubsub/projects
Security and quality https://github.com/googleapis/python-pubsub/security
Insights https://github.com/googleapis/python-pubsub/pulse
Can't reach GCP PubSub Emulatorhttps://github.com/googleapis/python-pubsub/issues/825#top
https://github.com/acocuzzo
api: pubsubIssues related to the googleapis/python-pubsub API.https://github.com/googleapis/python-pubsub/issues?q=state%3Aopen%20label%3A%22api%3A%20pubsub%22
type: questionRequest for information or clarification. Not an issue.https://github.com/googleapis/python-pubsub/issues?q=state%3Aopen%20label%3A%22type%3A%20question%22
https://github.com/PabloRR100
PabloRR100https://github.com/PabloRR100
on Nov 17, 2022https://github.com/googleapis/python-pubsub/issues/825#issue-1453630812
acocuzzohttps://github.com/acocuzzo
api: pubsubIssues related to the googleapis/python-pubsub API.https://github.com/googleapis/python-pubsub/issues?q=state%3Aopen%20label%3A%22api%3A%20pubsub%22
type: questionRequest for information or clarification. Not an issue.https://github.com/googleapis/python-pubsub/issues?q=state%3Aopen%20label%3A%22type%3A%20question%22
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.