geoq-chef-installer
geoq-chef-installer copied to clipboard
Problem starting 'vagrant up'
Hello,
I have tried to install geoq as prescribed. However, when I start the system with 'vagrant up,' I get teh following errors. Do you have any idea how I can address this issue? Thanks.
pmallas@PALLAS ~/Sites/geoq-chef-installer (master)
$ vagrant up
Bringing machine 'default' up with 'virtualbox' provider...
C:/Users/pmallas/.vagrant.d/gems/gems/vagrant-berkshelf-1.3.7/lib/berkshelf/vagrant/env.rb:18:in initialize': undefined method
scope' for #Vagrant::UI::Colored:0x4400a90 (NoMethodError)
from C:/Users/pmallas/.vagrant.d/gems/gems/vagrant-berkshelf-1.3.7/lib/berkshelf/vagrant/action.rb:54:in new' from C:/Users/pmallas/.vagrant.d/gems/gems/vagrant-berkshelf-1.3.7/lib/berkshelf/vagrant/action.rb:54:in
block in setup'
from C:/Users/pmallas/.vagrant.d/gems/gems/vagrant-berkshelf-1.3.7/lib/berkshelf/vagrant/action.rb:53:in tap' from C:/Users/pmallas/.vagrant.d/gems/gems/vagrant-berkshelf-1.3.7/lib/berkshelf/vagrant/action.rb:53:in
setup'
from C:/Users/pmallas/.vagrant.d/gems/gems/vagrant-berkshelf-1.3.7/lib/berkshelf/vagrant/plugin.rb:15:in provision' from c:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.6.0/lib/vagrant/action/runner.rb:42:in
call'
from c:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.6.0/lib/vagrant/action/runner.rb:42:in block (2 levels) in run' from c:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.6.0/lib/vagrant/action/runner.rb:41:in
tap'
from c:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.6.0/lib/vagrant/action/runner.rb:41:in block in run' from c:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.6.0/lib/vagrant/action/runner.rb:40:in
map'
from c:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.6.0/lib/vagrant/action/runner.rb:40:in run' from c:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.6.0/lib/vagrant/machine.rb:190:in
action_raw'
from c:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.6.0/lib/vagrant/machine.rb:167:in block in action' from c:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.6.0/lib/vagrant/environment.rb:423:in
lock'
from c:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.6.0/lib/vagrant/machine.rb:155:in action' from c:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.6.0/lib/vagrant/batch_action.rb:82:in
block (2 levels) in run'
from c:/HashiCorp/Vagrant/embedded/gems/gems/logging-1.8.2/lib/logging/diagnostic_context.rb:323:in call' from c:/HashiCorp/Vagrant/embedded/gems/gems/logging-1.8.2/lib/logging/diagnostic_context.rb:323:in
block in create_with_logging_context'
I don't know how I manage to do it. I have searched and searched for a way to fix this. The moment after I post it, I find a work around:
https://github.com/sneal/vagrant-butcher/commit/80c87eaef0fa8ab17362b9eaad41033dd2cccbe7
Ok, got a bit further. Now this:
C:\Users\pmallas\Sites\geoq-chef-installer>vagrant up
Bringing machine 'default' up with 'virtualbox' provider...
C:/Users/pmallas/.vagrant.d/gems/gems/vagrant-berkshelf-1.3.7/lib/berkshelf/vagrant/env.rb:18:in initialize': undefined method
scope' for #<Vagrant::UI::Color
ed:0x4416960> (NoMethodError)
from C:/Users/pmallas/.vagrant.d/gems/gems/vagrant-berkshelf-1.3.7/lib/berkshelf/vagrant/action.rb:54:in new' from C:/Users/pmallas/.vagrant.d/gems/gems/vagrant-berkshelf-1.3.7/lib/berkshelf/vagrant/action.rb:54:in
block in setup'
from C:/Users/pmallas/.vagrant.d/gems/gems/vagrant-berkshelf-1.3.7/lib/berkshelf/vagrant/action.rb:53:in tap' from C:/Users/pmallas/.vagrant.d/gems/gems/vagrant-berkshelf-1.3.7/lib/berkshelf/vagrant/action.rb:53:in
setup'
from C:/Users/pmallas/.vagrant.d/gems/gems/vagrant-berkshelf-1.3.7/lib/berkshelf/vagrant/plugin.rb:15:in provision' from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.6.0/lib/vagrant/action/runner.rb:42:in
call'
from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.6.0/lib/vagrant/action/runner.rb:42:in block (2 levels) in run' from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.6.0/lib/vagrant/action/runner.rb:41:in
tap'
from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.6.0/lib/vagrant/action/runner.rb:41:in block in run' from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.6.0/lib/vagrant/action/runner.rb:40:in
map'
from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.6.0/lib/vagrant/action/runner.rb:40:in run' from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.6.0/lib/vagrant/machine.rb:190:in
action_raw'
from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.6.0/lib/vagrant/machine.rb:167:in block in action' from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.6.0/lib/vagrant/environment.rb:423:in
lock'
from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.6.0/lib/vagrant/machine.rb:155:in action' from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.6.0/lib/vagrant/batch_action.rb:82:in
block (2 levels) in run'
from C:/HashiCorp/Vagrant/embedded/gems/gems/logging-1.8.2/lib/logging/diagnostic_context.rb:323:in call' from C:/HashiCorp/Vagrant/embedded/gems/gems/logging-1.8.2/lib/logging/diagnostic_context.rb:323:in
block in create_with_logging_context'
@pmallas Thanks. This looks like a versioning issue.
It's working well on: Vagrant 1.4.2 and Berkshelf 2.0.10. You might try downgrading if you're using different versions.
I haven't tried the build on a Windows machine, but will try to replicate. Please let us know if you find the issue.
I ran into the same problem using Vagrant 1.6.2. It seems that by default the wrong version of vagrant-bookshelf is installed (1.3.7). The solution I found was vagrant plugin iunnstall vagrant-berkshelf vagrant plugin install vagrant-berkshelf --plugin-version '>= 2.0.1'
That gets me to the point where I start to install the cookbooks.
Thanks @jaalfaro
For me (on Windows), the command needed to be changed slightly: vagrant plugin install vagrant-berkshelf --plugin-version ">= 2.0.1" (double quotes around ">=2.0.1" )
Also, I had to add
source 'https://api.berkshelf.com'
to the top of the Berkfile in order for 'vagrant up' to work
Ok, I seem have completed the install. 'Vagrant up' starts and I seeing the virtual machine is running in virtual box. But I am unsure what is next. How do I launch the application? Or should the application launch with 'vagrant up.?' However, no window starts (like, for example, if I launched a standard virtual machine).
Now that you have the vm created, you should be running a VM server that has the app running on it (the web server, the database, etc.). You'll then need to point your browser at that machine to see the web app.
You can then log into that box from the command line be running: vagrant ssh
Or, you can get details on that box with: vagrant ssh-config
- from this, you can see the IP address that the box has. Get that, and put it in your browser. e.g. http:127.0.0.1/
- Many times (depending on configuration), the ip address will be different or things might be a bit wonky. I usually set a specific ip address I want it to use, as described in: http://my.safaribooksonline.com/book/software-engineering-and-development/9781449336103/4dot-networking-in-vagrant/_host_only_networking_htmlby adding something like this to your Vagrantfile
config.vm.network "hostonly", "192.168.33.10"
--Jay
On Tue, May 20, 2014 at 1:50 PM, pmallas [email protected] wrote:
Ok, I seem have completed the install. 'Vagrant up' starts and I seeing the virtual machine is running in virtual box. But I am unsure what is next. How do I launch the application? Or should the application launch with 'vagrant up.?' However, no window starts (like, for example, if I launched a standard virtual machine).
— Reply to this email directly or view it on GitHubhttps://github.com/ngageoint/geoq-chef-installer/issues/2#issuecomment-43660246 .
Ok, I guess my 'vagrant up' command is not completing properly. Although my VM appears to be running (I can 'vagrant ssh' in), my 'chef solo' is not completing properly:
==> default: [2014-05-21T16:29:16+00:00] INFO: service[nginx] reloaded
==> default: [2014-05-21T16:29:16+00:00] INFO: git[/usr/src/geoq] sending run action to bashsync_db
==> default: [2014-05-21T16:29:22+00:00] INFO: bash[sync_db] ran successfully
==> default: [2014-05-21T16:29:22+00:00] INFO: postgresql_database[geoq] sending run action to bashinstall_fixtures
==> default:
==> default: ================================================================================
==> default: Error executing action run
on resource 'bash[install_fixtures]'
==> default: ================================================================================
==> default:
==> default: Mixlib::ShellOut::ShellCommandFailed
==> default: ------------------------------------
==> default: Expected process to exit with [0], but received '1'
==> default: ---- Begin output of "bash" "/tmp/chef-script20140521-17986-1atdvit" ----
==> default: STDOUT: ---> pavement.delayed_fixtures
==> default: python manage.py loaddata initial_data.json
==> default:
==> default:
==> default: Captured Task Output:
==> default: ---------------------
==> default:
==> default: ---> pavement.delayed_fixtures
==> default: python manage.py loaddata initial_data.json
==> default:
==> default: Build failed running pavement.delayed_fixtures: Subprocess return code: 1
==> default: STDERR: dpkg: warning: failed to open configuration file '/root/.dpkg.cfg' for reading: Permission denied
==> default: IntegrityError: Problem installing fixtures: insert or update on table "core_job_feature_types" violates foreign key constraint "featu
s_id_5321e46a"
==> default: DETAIL: Key (featuretype_id)=(2) is not present in table "maps_featuretype".
==> default: ---- End output of "bash" "/tmp/chef-script20140521-17986-1atdvit" ----
==> default: Ran "bash" "/tmp/chef-script20140521-17986-1atdvit" returned 1
==> default:
==> default: Resource Declaration:
==> default: ---------------------
==> default: # In /tmp/vagrant-chef-3/chef-solo-1/cookbooks/geoq/recipes/default.rb
==> default:
==> default: 107: bash "install_fixtures" do
==> default: 108: code "source #{node['geoq']['virtualenv']['location']}/bin/activate && paver delayed_fixtures"
==> default: 109: cwd "#{node['geoq']['location']}"
==> default: 110: user 'postgres'
==> default: 111: action :nothing
==> default: 112: end
==> default: 113:
==> default:
==> default: Compiled Resource:
==> default: ------------------
==> default: # Declared in /tmp/vagrant-chef-3/chef-solo-1/cookbooks/geoq/recipes/default.rb:107:in `from_file'
==> default:
==> default: bash("install_fixtures") do
==> default: action [:nothing]
==> default: retries 0
==> default: retry_delay 2
==> default: command ""bash" "/tmp/chef-script20140521-17986-1atdvit""
==> default: backup 5
==> default: cwd "/usr/src/geoq"
==> default: returns 0
==> default: user "postgres"
==> default: code "source /var/lib/geoq/bin/activate && paver delayed_fixtures"
==> default: interpreter "bash"
==> default: cookbook_name :geoq
==> default: recipe_name "default"
==> default: end
==> default: [2014-05-21T16:29:25+00:00] INFO: template[geoq_uwsgi_ini] sending run action to executestart_django_server
==> default: [2014-05-21T16:29:25+00:00] INFO: execute[start_django_server] ran successfully
==> default: [2014-05-21T16:29:25+00:00] ERROR: Running exception handlers
==> default: [2014-05-21T16:29:25+00:00] ERROR: Exception handlers complete
==> default: [2014-05-21T16:29:25+00:00] FATAL: Stacktrace dumped to /var/chef/cache/chef-stacktrace.out
==> default: [2014-05-21T16:29:25+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.
Try to comment out that install_dev_fixtures, as was done in this commit:
https://github.com/ngageoint/geoq-chef-installer/blob/master/cookbooks/geoq/recipes/default.rb#L24
Let me know if that fixes it - if so, we'll try to rework that dev fixtures mechanism to something that works for everyone.
--Jay
On Wed, May 21, 2014 at 12:36 PM, pmallas [email protected] wrote:
Ok, I guess my 'vagrant up' command is not completing properly. Although my VM appears to be running (I can 'vagrant ssh' in), my 'chef solo' is not completing properly:
==> default: [2014-05-21T16:29:16+00:00] INFO: service[nginx] reloaded ==> default: [2014-05-21T16:29:16+00:00] INFO: git[/usr/src/geoq] sending run action to bashsync_db http://delayed ==> default: [2014-05-21T16:29:22+00:00] INFO: bash[sync_db] ran successfully ==> default: [2014-05-21T16:29:22+00:00] INFO: postgresql_database[geoq] sending run action to bashinstall_fixtures http://delayed ==> default:
==> default:
==> default: Error executing action run on resource 'bash[install_fixtures]'
==> default:
==> default: ==> default: Mixlib::ShellOut::ShellCommandFailed ==> default: ------------------------------------ ==> default: Expected process to exit with [0], but received '1' ==> default: ---- Begin output of "bash" "/tmp/chef-script20140521-17986-1atdvit" ---- ==> default: STDOUT: ---> pavement.delayed_fixtures ==> default: python manage.py loaddata initial_data.json ==> default: ==> default: ==> default: Captured Task Output: ==> default: --------------------- ==> default: ==> default: ---> pavement.delayed_fixtures ==> default: python manage.py loaddata initial_data.json ==> default: ==> default: Build failed running pavement.delayed_fixtures: Subprocess return code: 1 ==> default: STDERR: dpkg: warning: failed to open configuration file '/root/.dpkg.cfg' for reading: Permission denied ==> default: IntegrityError: Problem installing fixtures: insert or update on table "core_job_feature_types" violates foreign key constraint "featu s_id_5321e46a" ==> default: DETAIL: Key (featuretype_id)=(2) is not present in table "maps_featuretype". ==> default: ---- End output of "bash" "/tmp/chef-script20140521-17986-1atdvit" ---- ==> default: Ran "bash" "/tmp/chef-script20140521-17986-1atdvit" returned 1 ==> default: ==> default: Resource Declaration: ==> default: --------------------- ==> default: # In /tmp/vagrant-chef-3/chef-solo-1/cookbooks/geoq/recipes/default.rb ==> default: ==> default: 107: bash "install_fixtures" do ==> default: 108: code "source #{node['geoq']['virtualenv']['location']}/bin/activate && paver delayed_fixtures" ==> default: 109: cwd "#{node['geoq']['location']}" ==> default: 110: user 'postgres' ==> default: 111: action :nothing ==> default: 112: end ==> default: 113: ==> default: ==> default: Compiled Resource: ==> default: ------------------ ==> default: # Declared in /tmp/vagrant-chef-3/chef-solo-1/cookbooks/geoq/recipes/default.rb:107:in `from_file' ==> default: ==> default: bash("install_fixtures") do ==> default: action [:nothing] ==> default: retries 0 ==> default: retry_delay 2 ==> default: command ""bash" "/tmp/chef-script20140521-17986-1atdvit"" ==> default: backup 5 ==> default: cwd "/usr/src/geoq" ==> default: returns 0 ==> default: user "postgres" ==> default: code "source /var/lib/geoq/bin/activate && paver delayed_fixtures" ==> default: interpreter "bash" ==> default: cookbook_name :geoq ==> default: recipe_name "default" ==> default: end ==> default: [2014-05-21T16:29:25+00:00] INFO: template[geoq_uwsgi_ini] sending run action to executestart_django_server http://delayed ==> default: [2014-05-21T16:29:25+00:00] INFO: execute[start_django_server] ran successfully ==> default: [2014-05-21T16:29:25+00:00] ERROR: Running exception handlers ==> default: [2014-05-21T16:29:25+00:00] ERROR: Exception handlers complete ==> default: [2014-05-21T16:29:25+00:00] FATAL: Stacktrace dumped to /var/chef/cache/chef-stacktrace.out ==> default: [2014-05-21T16:29:25+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.
— Reply to this email directly or view it on GitHubhttps://github.com/ngageoint/geoq-chef-installer/issues/2#issuecomment-43782198 .
Actually, that line is already commented out in the default.rb file.