Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

InstallKey issues when trying to install LaravelStack #15

Open
denisatmo opened this issue Feb 20, 2014 · 6 comments
Open

InstallKey issues when trying to install LaravelStack #15

denisatmo opened this issue Feb 20, 2014 · 6 comments

Comments

@denisatmo
Copy link

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
Copy link
Author

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.

@MiniCodeMonkey
Copy link
Owner

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:
#15 (comment)

@denisatmo
Copy link
Author

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
Copy link
Author

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

@machucarro
Copy link

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!

@BartVB
Copy link

BartVB commented Jan 28, 2015

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:
hashicorp/vagrant#1172

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants