-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Closed
Labels
Description
When running inside of GCE, it seems to be picking up machine credentials. I have credentials set via the env var GOOGLE_APPLICATION_CREDENTIALS
root@6a740ead3d2c:/# export
declare -x GOOGLE_APPLICATION_CREDENTIALS="/var/secrets/wise-coyote-827.json"
root@6a740ead3d2c:/# ls -lh $GOOGLE_APPLICATION_CREDENTIALS
-rw------- 1 1001 1001 2.3K Apr 6 17:47 /var/secrets/wise-coyote-827.json
root@6a740ead3d2c:/# cat $GOOGLE_APPLICATION_CREDENTIALS
{
"type": "service_account",
...
When I start my app, it complains:
Apr 06, 2016 6:08:29 PM com.google.datastore.v1beta3.client.DatastoreFactory makeClient
INFO: Not using any credentials
18:08:29.859 [main] ERROR c.s.apollo.httpservice.HttpService - Uncaught exception on thread Thread[main,5,main], exiting
com.spotify.apollo.httpservice.LoadingException: Something went wrong
at com.spotify.apollo.httpservice.HttpService.failure(HttpService.java:149) ~[apollo-http-service-1.0.4.jar:1.0.4]
at com.spotify.apollo.httpservice.HttpService.boot(HttpService.java:142) ~[apollo-http-service-1.0.4.jar:1.0.4]
at com.spotify.apollo.httpservice.HttpService.boot(HttpService.java:90) ~[apollo-http-service-1.0.4.jar:1.0.4]
at com.spotify.apollo.httpservice.HttpService.boot(HttpService.java:80) ~[apollo-http-service-1.0.4.jar:1.0.4]
at com.spotify.apollo.httpservice.HttpService.boot(HttpService.java:71) ~[apollo-http-service-1.0.4.jar:1.0.4]
at com.example.apollo.books.BooksService.main(BooksService.java:25) ~[books-service.jar:na]
Caused by: com.google.gcloud.datastore.DatastoreException: Not authorized.
at com.google.gcloud.datastore.spi.DefaultDatastoreRpc.translate(DefaultDatastoreRpc.java:102) ~[gcloud-java-datastore-0.1.7.jar:0.1.7]
at com.google.gcloud.datastore.spi.DefaultDatastoreRpc.lookup(DefaultDatastoreRpc.java:139) ~[gcloud-java-datastore-0.1.7.jar:0.1.7]
at com.google.gcloud.datastore.DatastoreOptions.normalize(DatastoreOptions.java:116) ~[gcloud-java-datastore-0.1.7.jar:0.1.7]
at com.google.gcloud.datastore.DatastoreOptions.access$300(DatastoreOptions.java:34) ~[gcloud-java-datastore-0.1.7.jar:0.1.7]
at com.google.gcloud.datastore.DatastoreOptions$Builder.build(DatastoreOptions.java:81) ~[gcloud-java-datastore-0.1.7.jar:0.1.7]
at com.google.gcloud.datastore.DatastoreOptions.defaultInstance(DatastoreOptions.java:167) ~[gcloud-java-datastore-0.1.7.jar:0.1.7]
at com.example.apollo.books.BooksService.init(BooksService.java:29) ~[books-service.jar:na]
at com.spotify.apollo.environment.ApolloEnvironmentModule$ApolloEnvironmentImpl.initialize(ApolloEnvironmentModule.java:155) ~[apollo-environment-1.0.4.jar:1.0.4]
at com.spotify.apollo.httpservice.HttpServiceModule.lambda$bindAppInit$1(HttpServiceModule.java:52) ~[apollo-http-service-1.0.4.jar:1.0.4]
at com.spotify.apollo.httpservice.HttpServiceModule.requestHandler(HttpServiceModule.java:58) ~[apollo-http-service-1.0.4.jar:1.0.4]
at com.spotify.apollo.httpservice.HttpService.boot(HttpService.java:116) ~[apollo-http-service-1.0.4.jar:1.0.4]
... 4 common frames omitted
Caused by: com.google.datastore.v1beta3.client.DatastoreException: Not authorized.
at com.google.datastore.v1beta3.client.RemoteRpc.makeException(RemoteRpc.java:126) ~[datastore-v1beta3-proto-client-1.0.0-beta.jar:na]
at com.google.datastore.v1beta3.client.RemoteRpc.makeException(RemoteRpc.java:169) ~[datastore-v1beta3-proto-client-1.0.0-beta.jar:na]
at com.google.datastore.v1beta3.client.RemoteRpc.call(RemoteRpc.java:89) ~[datastore-v1beta3-proto-client-1.0.0-beta.jar:na]
at com.google.datastore.v1beta3.client.Datastore.lookup(Datastore.java:92) ~[datastore-v1beta3-proto-client-1.0.0-beta.jar:na]
at com.google.gcloud.datastore.spi.DefaultDatastoreRpc.lookup(DefaultDatastoreRpc.java:137) ~[gcloud-java-datastore-0.1.7.jar:0.1.7]
... 13 common frames omitted