0

Is there anyway to connect to a Bigtable emulator running on localhost using the node.js client? I get this if I try to do so

Handshake failed with fatal error SSL_ERROR_SS

Is there a similar configuration like the one in java?

conf.set(BigtableOptionsFactory.BIGTABLE_USE_PLAINTEXT_NEGOTIATION, true);
Pepperoni Papaya
  • 113
  • 3
  • 14
  • Did you run `BIGTABLE_EMULATOR_HOST=$(gcloud beta emulators bigtable env-init)` before as explained in [here](https://cloud.google.com/bigtable/docs/emulator#using_the_emulator) and [here](https://cloud.google.com/nodejs/docs/reference/bigtable/0.11.x/Bigtable#Bigtable)? – Guillem Xercavins Feb 28 '18 at 13:00
  • @GuillemXercavins I did manually set the system's environment variable BIGTABLE_EMULATOR_HOST to localhost:8086 (or 127.0.0.1:8086). I'm on Windows so the above command is not availablle. – Pepperoni Papaya Mar 01 '18 at 01:11

1 Answers1

1

On Windows, you should use the following command:

set BIGTABLE_EMULATOR_HOST=localhost:8086

from the same command prompt window where you intend to run Bigtable client code.

To set this environment variable globally, use:

setx BIGTABLE_EMULATOR_HOST "localhost:8086"

close the command prompt, open again and run Bigtable client code.

Misha Brukman
  • 12,938
  • 4
  • 61
  • 78
Ajay
  • 11
  • 1
  • I did set the environment variable correctly because I could use cbt command with the emulator instance. The problem is most likely with how the client is demanding an SSL connection from the emulator. – Pepperoni Papaya Mar 02 '18 at 23:36
  • 1
    when bigtable client connects to emulator it dont use SSL. Can you paste sample code that you are using? – Ajay Mar 04 '18 at 18:01