BigtableConnection API 失败;从元数据服务器获取访问令牌时出错
BigtableConnection API failure;Error getting access token from metadata server at
正在尝试在我的本地计算机上获取 simple-cli example 运行。它编译得很好,但是即使在 hbase-site.xml 上一切看起来都是正确的,它也会抛出以下错误;
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)
这意味着我们无法从本地访问hbase?
您可以按照以下问题的概述在系统级别设置环境变量,以便 eclipse 获取环境变量;
Set environment variables on Mac OS X Lion
正在尝试在我的本地计算机上获取 simple-cli example 运行。它编译得很好,但是即使在 hbase-site.xml 上一切看起来都是正确的,它也会抛出以下错误;
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)
这意味着我们无法从本地访问hbase?
您可以按照以下问题的概述在系统级别设置环境变量,以便 eclipse 获取环境变量;
Set environment variables on Mac OS X Lion