Search code examples
bigtablegoogle-cloud-bigtable

BigtableConnection API failure;Error getting access token from metadata server at


Trying to get that simple-cli example running on my local machine. It compiles fine however even though all looks correct on hbase-site.xml, it throws the following errors;

2015-07-02 13:46:19,184 ERROR [main] hbase1_1.BigtableConnection: Error loading BigtableOptions from Configuration.
java.io.IOException: Error getting access token from metadata server at: http://metadata/computeMetadata/v1/instance/service-accounts/default/token
at com.google.cloud.bigtable.config.CredentialFactory.getCredentialFromMetadataServiceAccount(CredentialFactory.java:100)
........
Caused by: java.io.IOException: ComputeEngineCredentials cannot find the metadata server. This is likely because code is not running on Google Compute Engine.
    at com.google.auth.oauth2.ComputeEngineCredentials.refreshAccessToken(ComputeEngineCredentials.java:63)

This means that we can't access to hbase from our local?


Solution

  • you can set environment variables on the system level as outlined for the following question so that eclipse gets the env variables;

    Set environment variables on Mac OS X Lion