googleapis / google-auth-library-ruby

Google Auth Library for Ruby
Apache License 2.0
461 stars 254 forks source link

Could not load the default credentials #82

Closed ghost closed 6 years ago

ghost commented 8 years ago

Very often we have got next nessage:

Error encountered during server creation: RuntimeError: Could not load the default credentials. Browse to https://developers.google.com/accounts/docs/application-default-credentials for more information

cat chef/cookbooks/jetty/.kitchen/logs/jetty-centos-67.log
I, [2016-08-16T13:13:47.130398 #2916]  INFO -- jetty-centos-67: -----> Cleaning up any prior instances of <jetty-centos-67>
I, [2016-08-16T13:13:47.130752 #2916]  INFO -- jetty-centos-67: -----> Destroying <jetty-centos-67>...
I, [2016-08-16T13:13:47.132258 #2916]  INFO -- jetty-centos-67: Finished destroying <jetty-centos-67> (0m0.00s).
I, [2016-08-16T13:13:47.132630 #2916]  INFO -- jetty-centos-67: -----> Testing <jetty-centos-67>
I, [2016-08-16T13:13:47.132841 #2916]  INFO -- jetty-centos-67: -----> Creating <jetty-centos-67>...
E, [2016-08-16T13:13:47.341093 #2916] ERROR -- jetty-centos-67: Error encountered during server creation: RuntimeError: Could not load the default credentials. Browse to
https://developers.google.com/accounts/docs/application-default-credentials
for more information

E, [2016-08-16T13:13:47.341355 #2916] ERROR -- jetty-centos-67: Create failed on instance <jetty-centos-67>.
E, [2016-08-16T13:13:47.341449 #2916] ERROR -- jetty-centos-67: ------Exception-------
E, [2016-08-16T13:13:47.341507 #2916] ERROR -- jetty-centos-67: Class: RuntimeError
E, [2016-08-16T13:13:47.341554 #2916] ERROR -- jetty-centos-67: Message: Could not load the default credentials. Browse to
https://developers.google.com/accounts/docs/application-default-credentials
for more information

E, [2016-08-16T13:13:47.341599 #2916] ERROR -- jetty-centos-67: ------Backtrace-------
E, [2016-08-16T13:13:47.341655 #2916] ERROR -- jetty-centos-67: /opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/googleauth-0.5.1/lib/googleauth.rb:119:in `get_application_default'
E, [2016-08-16T13:13:47.341724 #2916] ERROR -- jetty-centos-67: /opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/kitchen-google-1.1.0/lib/kitchen/driver/gce.rb:193:in `authorization'
E, [2016-08-16T13:13:47.341769 #2916] ERROR -- jetty-centos-67: /opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/kitchen-google-1.1.0/lib/kitchen/driver/gce.rb:183:in `connection'
E, [2016-08-16T13:13:47.341819 #2916] ERROR -- jetty-centos-67: /opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/kitchen-google-1.1.0/lib/kitchen/driver/gce.rb:233:in `block in valid_project?'
E, [2016-08-16T13:13:47.341861 #2916] ERROR -- jetty-centos-67: /opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/kitchen-google-1.1.0/lib/kitchen/driver/gce.rb:224:in `check_api_call'
E, [2016-08-16T13:13:47.341903 #2916] ERROR -- jetty-centos-67: /opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/kitchen-google-1.1.0/lib/kitchen/driver/gce.rb:233:in `valid_project?'
E, [2016-08-16T13:13:47.341949 #2916] ERROR -- jetty-centos-67: /opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/kitchen-google-1.1.0/lib/kitchen/driver/gce.rb:162:in `validate!'
E, [2016-08-16T13:13:47.342017 #2916] ERROR -- jetty-centos-67: /opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/kitchen-google-1.1.0/lib/kitchen/driver/gce.rb:113:in `create'
E, [2016-08-16T13:13:47.342065 #2916] ERROR -- jetty-centos-67: /opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/test-kitchen-1.7.3/lib/kitchen/instance.rb:449:in `public_send'
E, [2016-08-16T13:13:47.342126 #2916] ERROR -- jetty-centos-67: /opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/test-kitchen-1.7.3/lib/kitchen/instance.rb:449:in `block in perform_action'
E, [2016-08-16T13:13:47.342175 #2916] ERROR -- jetty-centos-67: /opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/test-kitchen-1.7.3/lib/kitchen/instance.rb:513:in `call'
E, [2016-08-16T13:13:47.342231 #2916] ERROR -- jetty-centos-67: /opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/test-kitchen-1.7.3/lib/kitchen/instance.rb:513:in `synchronize_or_call'
E, [2016-08-16T13:13:47.342269 #2916] ERROR -- jetty-centos-67: /opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/test-kitchen-1.7.3/lib/kitchen/instance.rb:478:in `block in action'
E, [2016-08-16T13:13:47.342313 #2916] ERROR -- jetty-centos-67: /opt/chefdk/embedded/lib/ruby/2.1.0/benchmark.rb:279:in `measure'
E, [2016-08-16T13:13:47.342358 #2916] ERROR -- jetty-centos-67: /opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/test-kitchen-1.7.3/lib/kitchen/instance.rb:477:in `action'
E, [2016-08-16T13:13:47.342394 #2916] ERROR -- jetty-centos-67: /opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/test-kitchen-1.7.3/lib/kitchen/instance.rb:449:in `perform_action'
E, [2016-08-16T13:13:47.342451 #2916] ERROR -- jetty-centos-67: /opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/test-kitchen-1.7.3/lib/kitchen/instance.rb:359:in `create_action'
E, [2016-08-16T13:13:47.342491 #2916] ERROR -- jetty-centos-67: /opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/test-kitchen-1.7.3/lib/kitchen/instance.rb:348:in `block in transition_to'
E, [2016-08-16T13:13:47.342554 #2916] ERROR -- jetty-centos-67: /opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/test-kitchen-1.7.3/lib/kitchen/instance.rb:347:in `each'
E, [2016-08-16T13:13:47.342617 #2916] ERROR -- jetty-centos-67: /opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/test-kitchen-1.7.3/lib/kitchen/instance.rb:347:in `transition_to'
E, [2016-08-16T13:13:47.342660 #2916] ERROR -- jetty-centos-67: /opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/test-kitchen-1.7.3/lib/kitchen/instance.rb:160:in `verify'
E, [2016-08-16T13:13:47.342701 #2916] ERROR -- jetty-centos-67: /opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/test-kitchen-1.7.3/lib/kitchen/instance.rb:189:in `block in test'
E, [2016-08-16T13:13:47.342743 #2916] ERROR -- jetty-centos-67: /opt/chefdk/embedded/lib/ruby/2.1.0/benchmark.rb:279:in `measure'
E, [2016-08-16T13:13:47.342782 #2916] ERROR -- jetty-centos-67: /opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/test-kitchen-1.7.3/lib/kitchen/instance.rb:185:in `test'
E, [2016-08-16T13:13:47.342826 #2916] ERROR -- jetty-centos-67: /opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/test-kitchen-1.7.3/lib/kitchen/command.rb:176:in `public_send'
E, [2016-08-16T13:13:47.342869 #2916] ERROR -- jetty-centos-67: /opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/test-kitchen-1.7.3/lib/kitchen/command.rb:176:in `block (2 levels) in run_action'
E, [2016-08-16T13:13:47.342923 #2916] ERROR -- jetty-centos-67: ----------------------
I, [2016-08-16T13:13:47.343881 #2916]  INFO -- jetty-centos-67: -----> Destroying <jetty-centos-67>...
I, [2016-08-16T13:13:47.344810 #2916]  INFO -- jetty-centos-67: Finished destroying <jetty-centos-67> (0m0.00s).

Do you have any methods for debug this issue? How to determine what problem?

Centos 6.7
Chef Development Kit Version: 0.13.21
chef-client version: 12.9.41
berks version: 4.3.2
kitchen version: 1.7.3
chef exec gem list

*** LOCAL GEMS ***

activesupport (4.2.6)
addressable (2.4.0)
app_conf (0.4.2)
appbundler (0.9.0)
artifactory (2.3.2)
ast (2.2.0)
autoparse (0.3.3)
aws-sdk (2.2.34)
aws-sdk-core (2.2.34)
aws-sdk-resources (2.2.34)
aws-sdk-v1 (1.66.0)
berkshelf (4.3.2)
berkshelf-api-client (2.0.2)
bigdecimal (default: 1.2.4)
binding_of_caller (0.7.2)
buff-config (1.0.1)
buff-extensions (1.0.0)
buff-ignore (1.1.1)
buff-ruby_engine (0.1.0)
buff-shell_out (0.2.0)
builder (3.2.2)
bundler (1.11.2)
byebug (8.2.4)
celluloid (0.16.0)
celluloid-io (0.16.2)
CFPropertyList (2.3.2)
chef (12.9.41)
chef-config (12.9.41)
chef-dk (0.13.21)
chef-provisioning (1.7.0)
chef-provisioning-aws (1.8.0)
chef-provisioning-azure (0.5.0)
chef-provisioning-fog (0.18.0)
chef-provisioning-vagrant (0.11.0)
chef-vault (2.9.0)
chef-zero (4.5.0)
cheffish (2.0.3)
chefspec (4.6.1)
cleanroom (1.0.0)
coderay (1.1.1)
compat_resource (12.9.1)
cookbook-omnifetch (0.2.2)
cucumber-core (1.4.0)
debug_inspector (0.0.2)
dep-selector-libgecode (1.2.0)
dep_selector (1.0.3)
diff-lcs (1.2.5)
diffy (3.1.0)
docker-api (1.26.2)
erubis (2.7.0)
excon (0.49.0)
extlib (0.9.16)
faraday (0.9.2)
fauxhai (3.2.0)
ffi (1.9.10)
ffi-yajl (2.2.3)
fission (0.5.0)
fog (1.38.0)
fog-aliyun (0.1.0)
fog-atmos (0.1.0)
fog-aws (0.9.2)
fog-brightbox (0.10.1)
fog-cloudatcost (0.1.2)
fog-core (1.37.0)
fog-dynect (0.0.3)
fog-ecloud (0.3.0)
fog-google (0.1.0)
fog-json (1.0.2)
fog-local (0.3.0)
fog-openstack (0.1.2)
fog-powerdns (0.1.1)
fog-profitbricks (0.0.5)
fog-rackspace (0.1.1)
fog-radosgw (0.0.5)
fog-riakcs (0.1.0)
fog-sakuracloud (1.7.5)
fog-serverlove (0.1.2)
fog-softlayer (1.1.0)
fog-storm_on_demand (0.1.1)
fog-terremark (0.1.0)
fog-vmfusion (0.1.0)
fog-voxel (0.1.0)
fog-vsphere (0.6.3)
fog-xenserver (0.2.3)
fog-xml (0.1.2)
foodcritic (6.1.1)
formatador (0.2.5)
fuzzyurl (0.8.0)
gcewinpass (1.0.0)
gherkin (3.2.0)
git (1.3.0)
google-api-client (0.9.8, 0.8.6)
googleauth (0.5.1)
gssapi (1.2.0)
guard (2.13.0)
gyoku (1.3.1)
hashie (3.4.3)
highline (1.7.8)
hitimes (1.2.3)
httpclient (2.7.1)
hurley (0.2)
i18n (0.7.0)
inflecto (0.0.2)
inifile (3.0.0)
inspec (0.18.0)
io-console (default: 0.4.3)
ipaddress (0.8.3)
jmespath (1.2.4)
json (1.8.3, default: 1.8.1)
json_pure (1.8.3)
jwt (1.5.1)
kitchen-ec2 (1.0.0)
kitchen-google (1.1.0)
kitchen-inspec (0.12.5)
kitchen-sync (2.1.1)
kitchen-vagrant (0.20.0)
knife-spork (1.6.1)
knife-windows (1.4.0)
launchy (2.4.3)
libyajl2 (1.2.0)
listen (3.0.6)
little-plugger (1.1.4)
logging (2.1.0)
lumberjack (1.0.10)
macaddr (1.7.1)
memoist (0.14.0)
method_source (0.8.2)
mime-types (2.99.1)
mini_portile2 (2.0.0)
minitar (0.5.4)
minitest (5.8.4, default: 4.7.5)
mixlib-authentication (1.4.0)
mixlib-cli (1.5.0)
mixlib-config (2.2.1)
mixlib-install (1.0.6)
mixlib-log (1.6.0)
mixlib-shellout (2.2.6)
mixlib-versioning (1.1.0)
molinillo (0.4.4)
multi_json (1.11.2)
multipart-post (2.0.0)
nenv (0.3.0)
net-scp (1.2.1)
net-sftp (2.1.2)
net-ssh (3.1.1)
net-ssh-gateway (1.2.0)
net-ssh-multi (1.2.1)
net-telnet (0.1.1)
nio4r (1.2.1)
nokogiri (1.6.7.2)
nori (2.6.0)
notiffany (0.0.8)
octokit (4.3.0)
ohai (8.14.0)
os (0.9.6)
paint (1.0.1)
parser (2.3.0.7)
plist (3.2.0)
polyglot (0.3.5)
powerpack (0.1.1)
proxifier (1.0.3)
pry (0.10.3)
pry-byebug (3.3.0)
pry-remote (0.1.8)
pry-stack_explorer (0.4.9.2)
psych (default: 2.0.5)
r-train (0.10.4)
rack (1.6.4)
rainbow (2.1.0)
rake (11.1.2, default: 10.1.0)
rb-fsevent (0.9.7)
rb-inotify (0.9.7)
rb-readline (0.5.3)
rbvmomi (1.8.2)
rdoc (4.2.2, default: 4.1.0)
representable (2.3.0)
retriable (2.1.0, 1.4.1)
retryable (2.0.3)
ridley (4.5.0)
rspec (3.4.0)
rspec-core (3.4.4)
rspec-expectations (3.4.0)
rspec-its (1.2.0)
rspec-mocks (3.4.1)
rspec-support (3.4.1)
rspec_junit_formatter (0.2.3)
rubocop (0.37.2)
ruby-prof (0.15.9)
ruby-progressbar (1.7.5)
ruby-shadow (2.5.0)
rubygems-update (2.6.3)
rubyntlm (0.6.0)
rubyzip (1.2.0)
rufus-lru (1.0.5)
safe_yaml (1.0.4)
sawyer (0.7.0)
semverse (1.2.1)
serverspec (2.31.1)
sfl (2.2)
shellany (0.0.1)
signet (0.7.2)
slop (3.6.0)
solve (2.0.3)
specinfra (2.56.1)
stuartpreston-azure-sdk-for-ruby (0.7.1)
syslog-logger (1.6.8)
systemu (2.6.5)
test-kitchen (1.7.3)
test-unit (default: 2.1.8.0)
thor (0.19.1)
thread_safe (0.3.5)
timers (4.0.4)
treetop (1.6.5)
trollop (2.1.2)
tzinfo (1.2.2)
uber (0.0.15)
ubuntu_ami (0.4.1)
unicode-display_width (0.3.1)
uuid (2.3.8)
uuidtools (2.1.5)
varia_model (0.4.1)
winrm (1.7.3)
winrm-fs (0.4.2)
wmi-lite (1.0.0)
xml-simple (1.1.5)
yajl-ruby (1.2.1)
yard (0.8.7.6)
ghost commented 8 years ago
chef exec ruby -v
ruby 2.1.8p440 (2015-12-16 revision 53160) [x86_64-linux]
ghost commented 8 years ago
gcloud auth list
Credentialed accounts:
 - zxc@developer.gserviceaccount.com (active)

To set the active account, run:
  $ gcloud config set account ``ACCOUNT''