-
Notifications
You must be signed in to change notification settings - Fork 179
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
Unable to use with emulator and no/fake default credentials #1070
Comments
If you are using the Bigtable emulator, you need to specify See the docs for details. |
Sorry, I pasted the wrong one. I am indeed using BIGTABLE_EMULATOR_HOST |
Are you using the hbase layer? |
Yes |
Oh I see from the error message that you are. Perhaps there is a code path there that does something with credentials before it looks for the emulator env variable. As for the project id, the emulator needs one but it could be any arbitrary string. |
I can't think of any path that does anything with the creds. It seems to happen when creating the BigtableSession. Do you know if the emulator flag is supposed to make it route around this somehow?
|
Ah this was fixed in 0.9.3. I was on 0.9.2. Fix was 99ab4a6 by Robert The problem was in com.google.cloud.bigtable.config.BigtableOptions.Builder#applyEmulatorEnvironment |
Thanks for the help! |
Glad you sorted it out :) |
I'm trying to use this with the emulator and without providing valid (or any) gcloud default application credentials but having issues.
I am passing BIGTABLE_EMULATOR_HOST
First the lib complains of not having a project ID.
[ERROR] Failed to execute goal org.codehaus.mojo:exec-maven-plugin:1.2.1:java (default-cli) on project seeder: An exception occured while executing the Java class. null: InvocationTargetException: Could not find an appropriate constructor for com.google.cloud.bigtable.hbase1_2.BigtableConnection: Project ID must be supplied via google.bigtable.project.id -> [Help 1]
Is this relevant for the emulator? Let's plow forwards and give it that info.
Now I can see it outputs a line confirming it understood the BIGTABLE_EMULATOR_HOST.
BigtableOptions:75 - Connecting to the Bigtable emulator at bigtable:8820
but then...
[ERROR] Failed to execute goal org.codehaus.mojo:exec-maven-plugin:1.2.1:java (default-cli) on project seeder: An exception occured while executing the Java class. null: InvocationTargetException: Could not find an appropriate constructor for com.google.cloud.bigtable.hbase1_2.BigtableConnection: The Application Default Credentials are not available. They are available if running in Google Compute Engine. Otherwise, the environment variable GOOGLE_APPLICATION_CREDENTIALS must be defined pointing to a file defining the credentials. See https://developers.google.com/accounts/docs/application-default-credentials for more information. -> [Help 1]
We need application_default_credentials. Why?
If I provide real credentials things work, but if I fake them, it fails to auth. Is there some way to configure things so we deal with the emulator only and are not depending on this file and not phoning home to google cloud? It seems like once it sees BIGTABLE_EMULATOR_HOST it should understand not to do any auth stuff with gcloud.
Thanks
The text was updated successfully, but these errors were encountered: