ert78gb / google-pubsub-emulator

Google PubSub Emulator wrapper to nodejs
32 stars 5 forks source link

Emulator start not detected properly #14

Closed rev42 closed 5 years ago

rev42 commented 5 years ago

Description

When executing await pubsubEmulator.start(); on my machine, the process is stuck. After investigation, the event "EmulatorStates.RUNNING" is not emitted because the value of PUBSUB_EMULATOR_RUNNING_KEY is not the same as the expected one.

I got: [pubsub] INFOS: Server started, listening on The expected value is : [pubsub] INFO: Server started, listening on.

Possible solution

Log:

stderr: DEBUG: Running [gcloud.beta.emulators.pubsub.start] with arguments: [--host-port: "<googlecloudsdk.calliope.arg_parsers.HostPort object at 0x7ffa961d4650>", --log-http: "true", --user-output-enabled: "true", --verbosity: "debug"]
stderr: DEBUG: Found Cloud SDK root: /home/oc/google-cloud-sdk-215.0.0-linux-x86_64/google-cloud-sdk
stderr: Executing: /home/oc/google-cloud-sdk-215.0.0-linux-x86_64/google-cloud-sdk/platform/pubsub-emulator/bin/cloud-pubsub-emulator --host=localhost --port=12202
stderr: [pubsub] This is the Google Pub/Sub fake.
stderr: [pubsub] Implementation may be incomplete or differ from the real system.
stderr: [pubsub] mai 30, 2019 11:12:10 AM com.google.cloud.pubsub.testing.v1.Main main
stderr: [pubsub] INFOS: IAM integration is disabled. IAM policy methods and ACL checks are not supported
stderr: [pubsub] mai 30, 2019 11:12:11 AM io.gapi.emulators.netty.NettyUtil applyJava7LongHostnameWorkaround
stderr: [pubsub] INFOS: Applied Java 7 long hostname workaround.
stderr: [pubsub] mai 30, 2019 11:12:11 AM com.google.cloud.pubsub.testing.v1.Main main
stderr: [pubsub] INFOS: Server started, listening on 12202

Environment: Ubuntu 18.04

Gcloud tools installed:

Tool Version
Google Cloud SDK 248.0.0
beta 2019.05.17
bq 2.0.43
cloud-datastore-emulator 2.1.0
core 2019.05.24
gsutil 4.38
pubsub-emulator 2019.04.26

Dependencies in the project: "@google-cloud/pubsub": "^0.28.1",

Dev-dependencies: "google-pubsub-emulator": "^3.0.0",

ert78gb commented 5 years ago

Hi @rev42 I am very curious about what kind of Linux is your OS? How did you install gcloud? because if you check the latest Travis build passed?

I can add the "INFOS" version to the emulator, but I would like to know what cause the differences

rev42 commented 5 years ago

Thanks for the reply.

I'm on ubuntu (French language)

Description:    Ubuntu 18.04.2 LTS
Release:    18.04
Codename:   bionic

I think I followed the quickstart procedure: https://cloud.google.com/sdk/docs/quickstart-linux

ert78gb commented 5 years ago

Thx, today I will add this modification

ert78gb commented 5 years ago

landed in 3.0.1