Vagrant-Laravel-Stack icon indicating copy to clipboard operation
Vagrant-Laravel-Stack copied to clipboard

InstallKey issues when trying to install LaravelStack

Open denisatmo opened this issue 11 years ago • 6 comments

I have all the prerequisites installed, but when provisioning my box I get the following error:

Error executing action `run` on resource 'execute[install-key E5267A6C]'
================================================================================


Mixlib::ShellOut::ShellCommandFailed
------------------------------------
Expected process to exit with [0], but received '2'
---- Begin output of apt-key adv --keyserver keyserver.ubuntu.com --recv E5267A6C ----
STDOUT: Executing: gpg --ignore-time-conflict --no-options --no-default-keyring --secret-keyring /tmp/tmp.XLYdFY4oW7 --trustdb-name /etc/apt/trustdb.gpg --keyring /etc/apt/trusted.gpg --primary-keyring /etc/apt/trusted.gpg --keyserver keyserver.ubuntu.com --recv E5267A6C
STDERR: gpg: requesting key E5267A6C from hkp server keyserver.ubuntu.com
gpg: keyserver timed out
gpg: keyserver receive failed: keyserver error
---- End output of apt-key adv --keyserver keyserver.ubuntu.com --recv E5267A6C ----
Ran apt-key adv --keyserver keyserver.ubuntu.com --recv E5267A6C returned 2


Resource Declaration:
---------------------
# In /tmp/vagrant-chef-1/chef-solo-1/cookbooks/apt/providers/repository.rb

 28:   execute "install-key #{key}" do
 29:     if !node['apt']['key_proxy'].empty?
 30:       command "apt-key adv --keyserver-options http-proxy=#{node['apt']['key_proxy']} --keyserver hkp://#{keyserver}:80 --recv #{key}"
 31:     else
 32:       command "apt-key adv --keyserver #{keyserver} --recv #{key}"
 33:     end
 34:     action :run



Compiled Resource:
------------------
# Declared in /tmp/vagrant-chef-1/chef-solo-1/cookbooks/apt/providers/repository.rb:28:in `install_key_from_keyserver'

execute("install-key E5267A6C") do
  action [:run]
  retries 0
  retry_delay 2
  command "apt-key adv --keyserver keyserver.ubuntu.com --recv E5267A6C"
  backup 5
  returns 0
  cookbook_name :laravel
  not_if { #code block }
end



[2014-02-20T22:43:29+00:00] INFO: Running queued delayed notifications before re-raising exception

================================================================================
Error executing action `add` on resource 'apt_repository[php55]'
================================================================================


Mixlib::ShellOut::ShellCommandFailed
------------------------------------
execute[install-key E5267A6C] (/tmp/vagrant-chef-1/chef-solo-1/cookbooks/apt/providers/repository.rb line 28) had an error: Mixlib::ShellOut::ShellCommandFailed: Expected process to exit with [0], but received '2'
---- Begin output of apt-key adv --keyserver keyserver.ubuntu.com --recv E5267A6C ----
STDOUT: Executing: gpg --ignore-time-conflict --no-options --no-default-keyring --secret-keyring /tmp/tmp.XLYdFY4oW7 --trustdb-name /etc/apt/trustdb.gpg --keyring /etc/apt/trusted.gpg --primary-keyring /etc/apt/trusted.gpg --keyserver keyserver.ubuntu.com --recv E5267A6C
STDERR: gpg: requesting key E5267A6C from hkp server keyserver.ubuntu.com
gpg: keyserver timed out
gpg: keyserver receive failed: keyserver error
---- End output of apt-key adv --keyserver keyserver.ubuntu.com --recv E5267A6C ----
Ran apt-key adv --keyserver keyserver.ubuntu.com --recv E5267A6C returned 2


Resource Declaration:
---------------------
# In /tmp/vagrant-chef-1/chef-solo-1/cookbooks/laravel/recipes/web_server.rb

 12: apt_repository "php55" do
 13:    uri "http://ppa.launchpad.net/ondrej/php5/ubuntu"
 14:    distribution node['lsb']['codename']
 15:    components ["main"]
 16:    keyserver "keyserver.ubuntu.com"
 17:    key "E5267A6C"
 18: end
 19:



Compiled Resource:
------------------
# Declared in /tmp/vagrant-chef-1/chef-solo-1/cookbooks/laravel/recipes/web_server.rb:12:in `from_file'

apt_repository("php55") do
  action :add
  retries 0
  retry_delay 2
  cookbook_name :laravel
  recipe_name "web_server"
  uri "http://ppa.launchpad.net/ondrej/php5/ubuntu"
  distribution "precise"
  components ["main"]
  keyserver "keyserver.ubuntu.com"
  key "E5267A6C"
  cache_rebuild true
end



[2014-02-20T22:43:29+00:00] INFO: Running queued delayed notifications before re-raising exception
[2014-02-20T22:43:29+00:00] ERROR: Running exception handlers
[2014-02-20T22:43:29+00:00] ERROR: Exception handlers complete
[2014-02-20T22:43:29+00:00] FATAL: Stacktrace dumped to /var/chef/cache/chef-stacktrace.out
[2014-02-20T22:43:30+00:00] FATAL: Chef::Exceptions::ChildConvergeError: Chef run process exited unsuccessfully (exit code 1)
Chef never successfully completed! Any errors should be visible in the
output above. Please fix your recipes so that they properly complete.```

denisatmo avatar Feb 20 '14 23:02 denisatmo

SSH'd into the VM and added: sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv E5267A6C. Reloaded VM and everything installed. But not sure if this is the best method and or if this is just a temporary glitch.

denisatmo avatar Feb 21 '14 00:02 denisatmo

I wonder if it was a temporary issue with the ubuntu key server?-- Mathias Hansen

On Thu, Feb 20, 2014 at 7:45 PM, denisatmo [email protected] wrote:

SSH'd into the VM and added: sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com --recv E5267A6C.

Reloaded VM and everything installed. But not sure if this is the best method and or if this is just a temporary glitch.

Reply to this email directly or view it on GitHub: https://github.com/MiniCodeMonkey/Vagrant-Laravel-Stack/issues/15#issuecomment-35687575

MiniCodeMonkey avatar Feb 21 '14 01:02 MiniCodeMonkey

Perhaps ... but unfortunately I needed a laravel box working, hence the manual key adding. I'll keep monitoring today to see if it's no longer a glitch.

denisatmo avatar Feb 21 '14 01:02 denisatmo

Just created a new instance on a different project, I'm getting the same keyserver error.

denisatmo avatar Feb 21 '14 19:02 denisatmo

Did anyone find any solution for this? To me the funny thing is that the same Vagrant file in another folder without specifying custom shared folders works fine!

machucarro avatar Dec 17 '14 09:12 machucarro

In my case this was caused by problematic IPv6 DNS. I solved this by adding:

config.vm.customize ["modifyvm", :id, "--natdnsproxy1", "off"]
config.vm.customize ["modifyvm", :id, "--natdnshostresolver1", "off"]

to my Vagrantfile.

More info here: https://github.com/mitchellh/vagrant/issues/1172

BartVB avatar Jan 28 '15 10:01 BartVB