2015-07-02 63 views
0

試圖讓simple-cli example在我的本地計算機上運行。它編譯好但是即使所有在hbase-site.xml上看起來正確,它也會拋出以下錯誤;BigtableConnection API失敗;從元數據服務器獲取訪問令牌時出錯

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嗎?

+0

看起來像下面的代碼不會從bach_profile'字符串serviceAccountJson = System.getenv()返回JSON文件LOC得到(SERVICE_ACCOUNT_JSON_ENV_VARIABLE);'' – East2West

+0

應該env'顯示,如果你正確定義GOOGLE_APPLICATION_CREDENTIALS - 有關更多信息,請參閱https://developers.google.com/identity/protocols/application-default-credentials。 –

+0

在mac os上,沒有bashrc文件,而bash_profile中的那些env變量僅對終端不可用。 – East2West

回答

相關問題